Verify.HResult(Int32, Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Throws an exception if the given value is negative.
[System.Diagnostics.DebuggerStepThrough]
[System.Security.SecurityCritical]
public static void HResult (int hresult, bool ignorePreviousComCalls = false);
[<System.Diagnostics.DebuggerStepThrough>]
[<System.Security.SecurityCritical>]
static member HResult : int * bool -> unit
Public Shared Sub HResult (hresult As Integer, Optional ignorePreviousComCalls As Boolean = false)
Parameters
- hresult
- Int32
The HRESULT corresponding to the desired exception.
- ignorePreviousComCalls
- Boolean
If true, prevents ThrowExceptionForHR
from returning an exception from a previous COM call and instead always use the HRESULT specified.
- Attributes
Remarks
No exception is thrown for S_FALSE.