NativeMethods.ThrowOnFailure Method (Int32)
Determines whether a result is a success or failure HRESULT and throws an exception in the case of failure.
Namespace: Microsoft.VisualStudio
Assembly: Microsoft.VisualStudio.Data.Schema.Project (in Microsoft.VisualStudio.Data.Schema.Project.dll)
Syntax
'Declaration
Public Shared Function ThrowOnFailure ( _
hr As Integer _
) As Integer
'Usage
Dim hr As Integer
Dim returnValue As Integer
returnValue = NativeMethods.ThrowOnFailure(hr)
public static int ThrowOnFailure(
int hr
)
public:
static int ThrowOnFailure(
int hr
)
public static function ThrowOnFailure(
hr : int
) : int
static member ThrowOnFailure :
hr:int -> int
Parameters
- hr
Type: System.Int32
The result to test
Return Value
Type: System.Int32
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.