Table of Contents

Struct HResult

Namespace
Hi3Helper.Plugin.Core.Utility
Assembly
Hi3Helper.Plugin.Core.dll
public readonly struct HResult : IEquatable<HResult>
Implements
Inherited Members
Extension Methods

Fields

False

public static readonly HResult False

Field Value

HResult

Ok

public static readonly HResult Ok

Field Value

HResult

Methods

Equals(HResult)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(HResult other)

Parameters

other HResult

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

ThrowOnFailure(nint)

Throws an exception with a specific failure HRESULT, based on the specified IErrorInfo interface.

public HResult ThrowOnFailure(nint errorInfo = 0)

Parameters

errorInfo nint

A pointer to the IErrorInfo interface that provides more information about the error. You can specify IntPtr(0) to use the current IErrorInfo interface, or IntPtr(-1) to ignore the current IErrorInfo interface and construct the exception just from the error code.

Returns

HResult

thisHResult, if it does not reflect an error.

See Also

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

ToString(string, IFormatProvider)

public string ToString(string format, IFormatProvider formatProvider)

Parameters

format string
formatProvider IFormatProvider

Returns

string

Operators

operator ==(HResult, HResult)

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

Parameters

left HResult
right HResult

Returns

bool

implicit operator bool(HResult)

public static implicit operator bool(HResult value)

Parameters

value HResult

Returns

bool

implicit operator int(HResult)

public static implicit operator int(HResult value)

Parameters

value HResult

Returns

int

implicit operator uint(HResult)

public static implicit operator uint(HResult value)

Parameters

value HResult

Returns

uint

implicit operator HResult(bool)

public static implicit operator HResult(bool value)

Parameters

value bool

Returns

HResult

implicit operator HResult(int)

public static implicit operator HResult(int value)

Parameters

value int

Returns

HResult

implicit operator HResult(uint)

public static implicit operator HResult(uint value)

Parameters

value uint

Returns

HResult

operator !=(HResult, HResult)

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

Parameters

left HResult
right HResult

Returns

bool