[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.HResult

Struct HResult

Namespace
GrapeCity.Documents.DX
Assembly
GcDocs.DX.Windows.dll

Result structure for COM methods.

public struct HResult : IEquatable<HResult>
Implements
System.IEquatable<T><HResult>
Inherited Members
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()

Constructors

HResult(int)

Initializes a new instance of the HResult struct.

public HResult(int code)

Parameters

code int

The HRESULT error code.

HResult(uint)

Initializes a new instance of the HResult struct.

[CLSCompliant(false)]
public HResult(uint code)

Parameters

code uint

The HRESULT error code.

Fields

Abort

Result code Abort.

public static HResult Abort

Field Value

HResult

AccessDenied

Result code AccessDenied.

public static HResult AccessDenied

Field Value

HResult

Fail

Result code Fail.

public static HResult Fail

Field Value

HResult

False

Result code False.

public static HResult False

Field Value

HResult

Handle

Result code Handle.

public static HResult Handle

Field Value

HResult

InsufficientBuffer

The data area passed to a system call is too small.

public static HResult InsufficientBuffer

Field Value

HResult

InvalidArg

Result code invalid argument.

public static HResult InvalidArg

Field Value

HResult

InvalidPointer

Result code Invalid pointer.

public static HResult InvalidPointer

Field Value

HResult

NoInterface

Result code no interface.

public static HResult NoInterface

Field Value

HResult

NotImplemented

Result code not implemented.

public static HResult NotImplemented

Field Value

HResult

Ok

Result code Ok.

public static HResult Ok

Field Value

HResult

OutOfMemory

Result code out of memory.

public static HResult OutOfMemory

Field Value

HResult

UnexpectedFailure

Unexpected failure.

public static HResult UnexpectedFailure

Field Value

HResult

WaitAbandoned

Result of a wait abandonned.

public static HResult WaitAbandoned

Field Value

HResult

WaitTimeout

Result of a wait timeout.

public static HResult WaitTimeout

Field Value

HResult

Properties

Code

Gets the HRESULT error code.

public int Code { get; }

Property Value

int

The HRESULT error code.

Failure

Gets a value indicating whether this HResult is failure.

public bool Failure { get; }

Property Value

bool

true if failure; otherwise, false.

Success

Gets a value indicating whether this HResult is success.

public bool Success { get; }

Property Value

bool

true if success; otherwise, false.

Methods

CheckError()

Checks the error.

public void CheckError()

Equals(HResult)

Equalses the specified other.

public bool Equals(HResult other)

Parameters

other HResult

The other.

Returns

bool

Equals(object)

Determines whether the specified object is equal to this instance.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with this instance.

Returns

bool

true if the specified object is equal to this instance; otherwise, false.

GetHashCode()

Returns a hash code for this instance.

public override int GetHashCode()

Returns

int

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

GetResultFromException(Exception)

Gets a HResult from an System.Exception.

public static HResult GetResultFromException(Exception ex)

Parameters

ex System.Exception

The exception

Returns

HResult

The associated result code

GetResultFromWin32Error(int)

Gets the result from win32 error.

public static HResult GetResultFromWin32Error(int win32Error)

Parameters

win32Error int

The win32Error.

Returns

HResult

A HRESULT.

ToString()

Returns a string that represents this instance.

public override string ToString()

Returns

string

A string that represents this instance.

Operators

operator ==(HResult, HResult)

Implements the operator ==.

public static bool operator ==(HResult left, HResult right)

Parameters

left HResult

The left.

right HResult

The right.

Returns

bool

The result of the operator.

explicit operator int(HResult)

Performs an implicit conversion from HResult to int.

public static explicit operator int(HResult result)

Parameters

result HResult

The result.

Returns

int

The result of the conversion.

explicit operator uint(HResult)

Performs an implicit conversion from HResult to uint.

[CLSCompliant(false)]
public static explicit operator uint(HResult result)

Parameters

result HResult

The result.

Returns

uint

The result of the conversion.

implicit operator HResult(int)

Performs an implicit conversion from int to HResult.

public static implicit operator HResult(int result)

Parameters

result int

The result.

Returns

HResult

The result of the conversion.

implicit operator HResult(uint)

Performs an implicit conversion from uint to HResult.

[CLSCompliant(false)]
public static implicit operator HResult(uint result)

Parameters

result uint

The result.

Returns

HResult

The result of the conversion.

operator !=(HResult, HResult)

Implements the operator !=.

public static bool operator !=(HResult left, HResult right)

Parameters

left HResult

The left.

right HResult

The right.

Returns

bool

The result of the operator.