Struct VBRuntimeHResult
The runtime value of a call that yields no value: an HRESULT, the result code every COM method returns.
public readonly record struct VBRuntimeHResult : IRuntimeValue<int>, IRuntimeValue, IEquatable<VBRuntimeHResult>
- Implements
- Inherited Members
Remarks
👉 This is what is under the Void value (VBVoidValue), the "not a real value" of a Sub: the language
gives the call no value to use, the runtime still has the result code of the call. 0 is S_OK; like any HRESULT,
a negative code is a failure.
Constructors
VBRuntimeHResult(int)
The runtime value of a call that yields no value: an HRESULT, the result code every COM method returns.
public VBRuntimeHResult(int Code)
Parameters
CodeintThe 32-bit
HRESULT.
Remarks
👉 This is what is under the Void value (VBVoidValue), the "not a real value" of a Sub: the language
gives the call no value to use, the runtime still has the result code of the call. 0 is S_OK; like any HRESULT,
a negative code is a failure.
Properties
BoxedValue
public object BoxedValue { get; }
Property Value
Code
The 32-bit HRESULT.
public int Code { get; init; }
Property Value
IsFailure
Gets whether the code is a failure (FAILED): it is negative.
public bool IsFailure { get; }
Property Value
IsSuccess
Gets whether the code is a success (SUCCEEDED): it is not negative.
public bool IsSuccess { get; }
Property Value
Ok
S_OK: the operation succeeded.
public static VBRuntimeHResult Ok { get; }
Property Value
StoredValue
public int StoredValue { get; }