Share via


Verify.HResult(Int32, Boolean) Method

Definition

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.

Applies to