xtd 0.2.0
Loading...
Searching...
No Matches
xtd::h_result Class Reference
Inheritance diagram for xtd::h_result:
xtd::static_object

Definition

Contains the HRESULT values used by xtd.

Namespace
xtd
Library
xtd.core
Remarks
For more information, see Winerror.h from Micorosft's Win32 API.
HRESULTs are 32 bit values laid out as follows:
3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+-+-+-+-+-+---------------------+-------------------------------+
|S|R|C|N|r| Facility | Code |
+-+-+-+-+-+---------------------+-------------------------------+
where
S - Severity - indicates success/fail
0 - Success
1 - Fail (COERROR)
R - reserved portion of the facility code, corresponds to NT's
second severity bit.
C - reserved portion of the facility code, corresponds to NT's
C field.
N - reserved portion of the facility code. Used to indicate a
mapped NT status value.
r - reserved portion of the facility code. Reserved for internal
use. Used to indicate HRESULT values that are not status
values, but are instead message ids for display strings.
Facility - is the facility code
Code - is the facility's status code
bool is(std::any value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:365
@ success
Successful execution of a program. Is equal to EXIT_SUCCESS.
@ s
The S key.
@ a
The A key.
@ r
The R key.

Public Static Fields

static constexpr int32 S_OK
 Operation successful.
 
static constexpr int32 S_FALSE
 Operation successful but returned no results.
 
static constexpr int32 COR_E_ABANDONEDMUTEX
 The wait completed due to an abandoned mutex.
 
static constexpr int32 COR_E_AMBIGUOUSIMPLEMENTATION
 Ambiguous implementation found.
 
static constexpr int32 COR_E_AMBIGUOUSMATCH
 Ambiguous match found.
 
static constexpr int32 COR_E_APPDOMAINUNLOADED
 Attempted to access an unloaded AppDomain.
 
static constexpr int32 COR_E_APPLICATION
 Error in the application.
 
static constexpr int32 COR_E_ARGUMENT
 Value does not fall within the expected range.
 
static constexpr int32 COR_E_ARGUMENTOUTOFRANGE
 Specified argument was out of the range of valid values.
 
static constexpr int32 COR_E_ARITHMETIC
 Overflow or underflow in the arithmetic operation.
 
static constexpr int32 COR_E_ARRAYTYPEMISMATCH
 Attempted to access an element as a type incompatible with the array.
 
static constexpr int32 COR_E_BADEXEFORMAT
 Format of the executable (.exe) cannot be run.
 
static constexpr int32 COR_E_BADIMAGEFORMAT
 Format of the executable (.exe) or library (.dll) is invalid.
 
static constexpr int32 COR_E_CANNOTUNLOADAPPDOMAIN
 Attempt to unload the AppDomain failed.
 
static constexpr int32 COR_E_CODECONTRACTFAILED
 A code contract (ie, precondition, postcondition, invariant, or assert) failed.
 
static constexpr int32 COR_E_CONTEXTMARSHAL
 Attempted to marshal an object across a context boundary.
 
static constexpr int32 COR_E_CUSTOMATTRIBUTEFORMAT
 Binary format of the specified custom attribute was invalid.
 
static constexpr int32 COR_E_DATAMISALIGNED
 A datatype misalignment was detected in a load or store instruction.
 
static constexpr int32 COR_E_DIRECTORYNOTFOUND
 Attempted to access a path that is not on the disk.
 
static constexpr int32 COR_E_DIVIDEBYZERO
 Attempted to divide by zero.
 
static constexpr int32 COR_E_DLLNOTFOUND
 Dll was not found.
 
static constexpr int32 COR_E_DRIVENOTFOUND
 Could not find the drive. The drive might not be ready or might not be mapped.
 
static constexpr int32 COR_E_DUPLICATEWAITOBJECT
 Duplicate objects in argument.
 
static constexpr int32 COR_E_ENDOFSTREAM
 Attempted to read past the end of the stream.
 
static constexpr int32 COR_E_ENTRYPOINTNOTFOUND
 Entry point was not found.
 
static constexpr int32 COR_E_EXCEPTION
 Exception of type 'xtd::exception' was thrown.
 
static constexpr int32 COR_E_EXECUTIONENGINE
 Internal error in the runtime.
 
static constexpr int32 COR_E_FAILFAST
 Fail fast.
 
static constexpr int32 COR_E_FIELDACCESS
 Attempted to access a field that is not accessible by the caller.
 
static constexpr int32 COR_E_FILELOAD
 Could not load the specified file.
 
static constexpr int32 COR_E_FILENOTFOUND
 Unable to find the specified file.
 
static constexpr int32 COR_E_FORMAT
 One of the identified items was in an invalid format.
 
static constexpr int32 COR_E_INDEXOUTOFRANGE
 Index was outside the bounds of the array.
 
static constexpr int32 COR_E_INSUFFICIENTEXECUTIONSTACK
 Insufficient stack to continue executing the program safely. This can happen from having too many functions on the call stack or function on the stack using too much stack space.
 
static constexpr int32 COR_E_INSUFFICIENTMEMORY
 Insufficient memory to continue the execution of the program.
 
static constexpr int32 COR_E_INVALIDCAST
 Specified cast is not valid.
 
static constexpr int32 COR_E_INVALIDCOMOBJECT
 Attempt has been made to use a COM object that does not have a backing class factory.
 
static constexpr int32 COR_E_INVALIDFILTERCRITERIA
 Specified filter criteria was invalid.
 
static constexpr int32 COR_E_INVALIDOLEVARIANTTYPE
 Specified OLE variant was invalid.
 
static constexpr int32 COR_E_INVALIDOPERATION
 Operation is not valid due to the current state of the object.
 
static constexpr int32 COR_E_INVALIDPROGRAM
 xtd detected an invalid program.
 
static constexpr int32 COR_E_IO
 I/O error occurred.
 
static constexpr int32 COR_E_KEYNOTFOUND
 The given key was not present in the dictionary.
 
static constexpr int32 COR_E_MARSHALDIRECTIVE
 Marshaling directives are invalid.
 
static constexpr int32 COR_E_MEMBERACCESS
 Cannot access member.
 
static constexpr int32 COR_E_METHODACCESS
 Attempt to access the method failed.
 
static constexpr int32 COR_E_MISSINGFIELD
 Attempted to access a non-existing field.
 
static constexpr int32 COR_E_MISSINGMANIFESTRESOURCE
 Attempted to access a missing manifest resource.
 
static constexpr int32 COR_E_MISSINGMEMBER
 Attempted to access a missing member.
 
static constexpr int32 COR_E_MISSINGMETHOD
 Attempted to access a missing method.
 
static constexpr int32 COR_E_MISSINGSATELLITEASSEMBLY
 Resource lookup fell back to the ultimate fallback resources in a satellite assembly, but that satellite either was not found or could not be loaded. Please consider reinstalling or repairing the application.
 
static constexpr int32 COR_E_MULTICASTNOTSUPPORTED
 Attempted to add multiple callbacks to a delegate that does not support multicast.
 
static constexpr int32 COR_E_NOTFINITENUMBER
 Number encountered was not a finite quantity.
 
static constexpr int32 COR_E_NOTSUPPORTED
 Specified method is not supported.
 
static constexpr int32 COR_E_OBJECTCLOSED
 Cannot access a closed object.
 
static constexpr int32 COR_E_OPERATIONCANCELED
 The operation was canceled.
 
static constexpr int32 COR_E_OUTOFMEMORY
 Insufficient memory to continue the execution of the program.
 
static constexpr int32 COR_E_OVERFLOW
 Arithmetic operation resulted in an overflow.
 
static constexpr int32 COR_E_PATHTOOLONG
 The specified file name or path is too long, or a component of the specified path is too long.
 
static constexpr int32 COR_E_PLATFORMNOTSUPPORTED
 Operation is not supported on this platform.
 
static constexpr int32 COR_E_RANK
 Attempted to operate on an array with the incorrect number of dimensions.
 
static constexpr int32 COR_E_REFLECTIONTYPELOAD
 Exception of type 'xtd::reflection::reflection_type_load_exception' was thrown.
 
static constexpr int32 COR_E_RUNTIMEWRAPPED
 An object that does not derive from xtd:oobject has been wrapped in a runtime_wrapped_exception.
 
static constexpr int32 COR_E_SAFEARRAYRANKMISMATCH
 Specified array was not of the expected rank.
 
static constexpr int32 COR_E_SAFEARRAYTYPEMISMATCH
 Specified array was not of the expected type.
 
static constexpr int32 COR_E_SECURITY
 Security error.
 
static constexpr int32 COR_E_SERIALIZATION
 Serialization error.
 
static constexpr int32 COR_E_STACKOVERFLOW
 Operation caused a stack overflow.
 
static constexpr int32 COR_E_SYNCHRONIZATIONLOCK
 Object synchronization method was called from an unsynchronized block of code.
 
static constexpr int32 COR_E_SYSTEM
 System error.
 
static constexpr int32 COR_E_TARGET
 Exception of type 'xtd::reflection::target_exception' was thrown.
 
static constexpr int32 COR_E_TARGETINVOCATION
 Exception has been thrown by the target of an invocation.
 
static constexpr int32 COR_E_TARGETPARAMCOUNT
 Number of parameters specified does not match the expected number.
 
static constexpr int32 COR_E_THREADABORTED
 Thread was aborted.
 
static constexpr int32 COR_E_THREADINTERRUPTED
 Thread was interrupted from a waiting state.
 
static constexpr int32 COR_E_THREADSTART
 Thread start failure.
 
static constexpr int32 COR_E_THREADSTATE
 Thread was in an invalid state for the operation being executed.
 
static constexpr int32 COR_E_TIMEOUT
 The operation has timed out.
 
static constexpr int32 COR_E_TYPEACCESS
 Attempt to access the type failed.
 
static constexpr int32 COR_E_TYPEINITIALIZATION
 The type initializer for 'value' threw an exception.
 
static constexpr int32 COR_E_TYPELOAD
 Failure has occurred while loading a type.
 
static constexpr int32 COR_E_TYPEUNLOADED
 Type had been unloaded.
 
static constexpr int32 COR_E_UNAUTHORIZEDACCESS
 Attempted to perform an unauthorized operation.
 
static constexpr int32 COR_E_VERIFICATION
 Operation could destabilize the runtime.
 
static constexpr int32 COR_E_WAITHANDLECANNOTBEOPENED
 No handle of the given name exists.
 
static constexpr int32 CO_E_NOTINITIALIZED
 Not initialized.
 
static constexpr int32 DISP_E_PARAMNOTFOUND
 Could not find the parameter.
 
static constexpr int32 DISP_E_TYPEMISMATCH
 Attempt to access a variable with an incompatible type.
 
static constexpr int32 DISP_E_BADVARTYPE
 Invalid variable type.
 
static constexpr int32 DISP_E_OVERFLOW
 Arithmetic operation resulted in an overflow.
 
static constexpr int32 DISP_E_DIVBYZERO
 Attempted to divide by zero.
 
static constexpr int32 E_ABORT
 Operation aborted.
 
static constexpr int32 E_BOUNDS
 Bounds exception.
 
static constexpr int32 E_CHANGED_STATE
 The state has been modified.
 
static constexpr int32 E_FILENOTFOUND
 Unable to find the specified file.
 
static constexpr int32 E_FAIL
 Unspecified failure.
 
static constexpr int32 E_HANDLE
 The handle is invalid.
 
static constexpr int32 E_INVALIDARG
 Value does not fall within the expected range.
 
static constexpr int32 E_NOTIMPL
 The method or operation is not implemented.
 
static constexpr int32 E_POINTER
 Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
 
static constexpr int32 E_UNEXPECTED
 Unexpected failure.
 
static constexpr int32 ERROR_MRM_MAP_NOT_FOUND
 Resource map not found.
 
static constexpr int32 ERROR_TIMEOUT
 The operation has timed out.
 
static constexpr int32 RO_E_CLOSED
 The object has been closed.
 
static constexpr int32 RPC_E_CHANGED_MODE
 Cannot change the current thread mode.
 
static constexpr int32 TYPE_E_TYPEMISMATCH
 Incompatible type.
 
static constexpr int32 STG_E_PATHNOTFOUND
 Attempted to access a path that is not on the disk.
 
static constexpr int32 CTL_E_PATHNOTFOUND
 Attempted to access a path that is not on the disk.
 
static constexpr int32 CTL_E_FILENOTFOUND
 Unable to find the specified file.
 
static constexpr int32 FUSION_E_INVALID_NAME
 Fusion invalid name exception.
 
static constexpr int32 FUSION_E_REF_DEF_MISMATCH
 Fusion the reference definition is incompatible.
 
static constexpr int32 ERROR_TOO_MANY_OPEN_FILES
 Too many open files.
 
static constexpr int32 ERROR_SHARING_VIOLATION
 Sharing violation.
 
static constexpr int32 ERROR_LOCK_VIOLATION
 Lock violations.
 
static constexpr int32 ERROR_OPEN_FAILED
 Open failed.
 
static constexpr int32 ERROR_DISK_CORRUPT
 Disk corrupt.
 
static constexpr int32 ERROR_UNRECOGNIZED_VOLUME
 Unrecognized volume.
 
static constexpr int32 ERROR_DLL_INIT_FAILED
 DLL init failed.
 
static constexpr int32 MSEE_E_ASSEMBLYLOADINPROGRESS
 Assembly load in progress.
 
static constexpr int32 ERROR_FILE_INVALID
 File invalid.
 

Public Static Methods

static bool failed (int32 h_result) noexcept
 Provides a generic fail test for the specified HRESULT.
 
static int32 get_code (int32 h_result) noexcept
 Gets the code portion of the specified HRESULT.
 
static int32 get_facility (int32 h_result) noexcept
 The facility of the specified HRESULT, which indicates what API or framework originated this error.
 
static const xtd::array< int32 > & get_h_results () noexcept
 Gets an array of HRESULT.
 
static string get_message (int32 h_result) noexcept
 Gets the message of the specified HRESULT.
 
static const std::unordered_map< int32, string > & get_messages () noexcept
 Gets The HRESULT messages.
 
static string get_name (int32 h_result) noexcept
 Gets the name of the specified HRESULT.
 
static const std::unordered_map< int32, string > & get_names () noexcept
 Gets The HRESULT names.
 
static int32 get_severity (int32 h_result) noexcept
 The severity of the specified HRESULT, which indicates what API or framework originated this error.
 
static const std::error_category & h_result_category () noexcept
 Obtains a reference to the static error category object for HRESULT errors. The object is required to override the virtual function error_category::name() to return a pointer to the string "h_result_category". It is used to identify error conditions that correspond to the HRESULT error codes.
 
static bool is_error (int32 h_result) noexcept
 Provides a generic is error test for the specified HRESULT.
 
static std::error_code make_error_code (int h_result) noexcept
 Creates error code value for the specified HRESULT.
 
static bool succeeded (int32 h_result) noexcept
 Provides a generic success test for the specified HRESULT.
 
static string to_string (int32 h_result) noexcept
 Gets the name of the specified HRESULT.
 

Member Function Documentation

◆ failed()

static bool xtd::h_result::failed ( int32  h_result)
staticnoexcept

Provides a generic fail test for the specified HRESULT.

Parameters
h_resultThe HRESULT value.
Returns
true is failed; otherwise false.

◆ get_code()

static int32 xtd::h_result::get_code ( int32  h_result)
staticnoexcept

Gets the code portion of the specified HRESULT.

Parameters
h_resultThe HRESULT value.
Returns
The code portion of h_result.

◆ get_facility()

static int32 xtd::h_result::get_facility ( int32  h_result)
staticnoexcept

The facility of the specified HRESULT, which indicates what API or framework originated this error.

Parameters
h_resultThe HRESULT value.
Returns
The facility of h_result.
Remarks
The facility of an HRESULT is stored in bits 16-26 of the HRESULT.
Possible values
FACILITY Decimal Hex
FACILITY_NULL 0 0x0
FACILITY_RPC 1 0x1
FACILITY_DISPATCH 2 0x2
FACILITY_STORAGE 3 0x3
FACILITY_ITF 4 0x4
FACILITY_WIN32 7 0x7
FACILITY_WINDOWS 8 0x8
FACILITY_SECURITY 9 0x9
FACILITY_SSPI 9 0x9
FACILITY_CONTROL 10 0xA
FACILITY_CERT 11 0xB
FACILITY_INTERNET 12 0xC
FACILITY_MEDIASERVER 13 0xD
FACILITY_MSMQ 14 0xE
FACILITY_SETUPAPI 15 0xF
FACILITY_SCARD 16 0x10
FACILITY_COMPLUS 17 0x11
FACILITY_AAF 18 0x12
FACILITY_URT 19 0x13
FACILITY_ACS 20 0x14
FACILITY_DPLAY 21 0x15
FACILITY_UMI 22 0x16
FACILITY_SXS 23 0x17
FACILITY_WINDOWS_CE 24 0x18
FACILITY_HTTP 25 0x19
FACILITY_USERMODE_COMMONLOG 26 0x1A
FACILITY_WER 27 0x1B
FACILITY_USERMODE_FILTER_MANAGER 31 0x1F
FACILITY_BACKGROUNDCOPY 32 0x20
FACILITY_CONFIGURATION 33 0x21
FACILITY_WIA 33 0x21
FACILITY_STATE_MANAGEMENT 34 0x22
FACILITY_METADIRECTORY 35 0x23
FACILITY_WINDOWSUPDATE 36 0x24
FACILITY_DIRECTORYSERVICE 37 0x25
FACILITY_GRAPHICS 38 0x26
FACILITY_NAP 39 0x27
FACILITY_SHELL 39 0x27
FACILITY_TPM_SERVICES 40 0x28
FACILITY_TPM_SOFTWARE 41 0x29
FACILITY_UI 42 0x2A
FACILITY_XAML 43 0x2B
FACILITY_ACTION_QUEUE 44 0x2C
FACILITY_PLA 48 0x30
FACILITY_WINDOWS_SETUP 48 0x30
FACILITY_FVE 49 0x31
FACILITY_FWP 50 0x32
FACILITY_WINRM 51 0x33
FACILITY_NDIS 52 0x34
FACILITY_USERMODE_HYPERVISOR 53 0x35
FACILITY_CMI 54 0x36
FACILITY_USERMODE_VIRTUALIZATION 55 0x37
FACILITY_USERMODE_VOLMGR 56 0x38
FACILITY_BCD 57 0x39
FACILITY_USERMODE_VHD 58 0x3A
FACILITY_SDIAG 60 0x3C
FACILITY_WEBSERVICES 61 0x3D
FACILITY_WINPE 61 0x3D
FACILITY_WPN 62 0x3E
FACILITY_WINDOWS_STORE 63 0x3F
FACILITY_INPUT 64 0x40
FACILITY_EAP 66 0x42
FACILITY_WINDOWS_DEFENDER 80 0x50
FACILITY_OPC 81 0x51
FACILITY_XPS 82 0x52
FACILITY_RAS 83 0x53
FACILITY_MBN 84 0x54
FACILITY_POWERSHELL 84 0x54
FACILITY_EAS 85 0x55
FACILITY_P2P_INT 98 0x62
FACILITY_P2P 99 0x63
FACILITY_DAF 100 0x64
FACILITY_BLUETOOTH_ATT 101 0x65
FACILITY_AUDIO 102 0x66
FACILITY_VISUALCPP 109 0x6D
FACILITY_SCRIPT 112 0x70
FACILITY_PARSE 113 0x71
FACILITY_BLB 120 0x78
FACILITY_BLB_CLI 121 0x79
FACILITY_WSBAPP 122 0x7A
FACILITY_BLBUI 128 0x80
FACILITY_USN 129 0x81
FACILITY_USERMODE_VOLSNAP 130 0x82
FACILITY_TIERING 131 0x83
FACILITY_WSB_ONLINE 133 0x85
FACILITY_ONLINE_ID 134 0x86
FACILITY_DLS 153 0x99
FACILITY_SOS 160 0xA0
FACILITY_DEBUGGERS 176 0xB0
FACILITY_USERMODE_SPACES 231 0xE7
FACILITY_DMSERVER 256 0x100
FACILITY_RESTORE 256 0x100
FACILITY_SPP 256 0x100
FACILITY_DEPLOYMENT_SERVICES_SERVER 257 0x101
FACILITY_DEPLOYMENT_SERVICES_IMAGING 258 0x102
FACILITY_DEPLOYMENT_SERVICES_MANAGEMENT 259 0x103
FACILITY_DEPLOYMENT_SERVICES_UTIL 260 0x104
FACILITY_DEPLOYMENT_SERVICES_BINLSVC 261 0x105
FACILITY_DEPLOYMENT_SERVICES_PXE 263 0x107
FACILITY_DEPLOYMENT_SERVICES_TFTP 264 0x108
FACILITY_DEPLOYMENT_SERVICES_TRANSPORT_MANAGEMENT 272 0x110
FACILITY_DEPLOYMENT_SERVICES_DRIVER_PROVISIONING 278 0x116
FACILITY_DEPLOYMENT_SERVICES_MULTICAST_SERVER 289 0x121
FACILITY_DEPLOYMENT_SERVICES_MULTICAST_CLIENT 290 0x122
FACILITY_DEPLOYMENT_SERVICES_CONTENT_PROVIDER 293 0x125
FACILITY_LINGUISTIC_SERVICES 305 0x131
FACILITY_WEB 885 0x375
FACILITY_WEB_SOCKET 886 0x376
FACILITY_AUDIOSTREAMING 1094 0x446
FACILITY_ACCELERATOR 1536 0x600
FACILITY_MOBILE 1793 0x701
FACILITY_WMAAECMA 1996 0x7CC
FACILITY_WEP 2049 0x801
FACILITY_SYNCENGINE 2050 0x802
FACILITY_DIRECTMUSIC 2168 0x878
FACILITY_DIRECT3D10 2169 0x879
FACILITY_DXGI 2170 0x87A
FACILITY_DXGI_DDI 2171 0x87B
FACILITY_DIRECT3D11 2172 0x87C
FACILITY_LEAP 2184 0x888
FACILITY_AUDCLNT 2185 0x889
FACILITY_WINCODEC_DWRITE_DWM 2200 0x898
FACILITY_DIRECT2D 2201 0x899
FACILITY_DEFRAG 2304 0x900
FACILITY_USERMODE_SDBUS 2305 0x901
FACILITY_JSCRIPT 2306 0x902
FACILITY_PIDGENX 2561 0xA01

◆ get_h_results()

static const xtd::array< int32 > & xtd::h_result::get_h_results ( )
staticnoexcept

Gets an array of HRESULT.

Returns
An array of HRESULT.

◆ get_message()

static string xtd::h_result::get_message ( int32  h_result)
staticnoexcept

Gets the message of the specified HRESULT.

Parameters
h_resultThe HRESULT value.
Returns
The message of h_result.

◆ get_messages()

static const std::unordered_map< int32, string > & xtd::h_result::get_messages ( )
staticnoexcept

Gets The HRESULT messages.

Returns
The h_result messages.

◆ get_name()

static string xtd::h_result::get_name ( int32  h_result)
staticnoexcept

Gets the name of the specified HRESULT.

Parameters
h_resultThe HRESULT value.
Returns
The name of h_result.

◆ get_names()

static const std::unordered_map< int32, string > & xtd::h_result::get_names ( )
staticnoexcept

Gets The HRESULT names.

Returns
The h_result names.

◆ get_severity()

static int32 xtd::h_result::get_severity ( int32  h_result)
staticnoexcept

The severity of the specified HRESULT, which indicates what API or framework originated this error.

Parameters
h_resultThe HRESULT value.
Returns
The severity of h_result.
Possible values
SEVERIFY Decimal Hex
 SEVERITY_SUCCESS 0 0x0
 SEVERITY_ERROR 1 0x1

◆ h_result_category()

static const std::error_category & xtd::h_result::h_result_category ( )
staticnoexcept

Obtains a reference to the static error category object for HRESULT errors. The object is required to override the virtual function error_category::name() to return a pointer to the string "h_result_category". It is used to identify error conditions that correspond to the HRESULT error codes.

Returns
A reference to the static object of unspecified runtime type, derived from std::error_category.

◆ is_error()

static bool xtd::h_result::is_error ( int32  h_result)
staticnoexcept

Provides a generic is error test for the specified HRESULT.

Parameters
h_resultThe HRESULT value.
Returns
true is error; otherwise false.

◆ make_error_code()

static std::error_code xtd::h_result::make_error_code ( int  h_result)
staticnoexcept

Creates error code value for the specified HRESULT.

Parameters
h_resultThe HRESULT value.
Returns
Error code corresponding to h_result.

◆ succeeded()

static bool xtd::h_result::succeeded ( int32  h_result)
staticnoexcept

Provides a generic success test for the specified HRESULT.

Parameters
h_resultThe HRESULT value.
Returns
true is secceeded; otherwise false.

◆ to_string()

static string xtd::h_result::to_string ( int32  h_result)
staticnoexcept

Gets the name of the specified HRESULT.

Parameters
h_resultThe HRESULT value.
Returns
The name of h_result.

Member Data Documentation

◆ S_OK

constexpr int32 xtd::h_result::S_OK
staticconstexpr

Operation successful.

◆ S_FALSE

constexpr int32 xtd::h_result::S_FALSE
staticconstexpr

Operation successful but returned no results.

◆ COR_E_ABANDONEDMUTEX

constexpr int32 xtd::h_result::COR_E_ABANDONEDMUTEX
staticconstexpr

The wait completed due to an abandoned mutex.

◆ COR_E_AMBIGUOUSIMPLEMENTATION

constexpr int32 xtd::h_result::COR_E_AMBIGUOUSIMPLEMENTATION
staticconstexpr

Ambiguous implementation found.

◆ COR_E_AMBIGUOUSMATCH

constexpr int32 xtd::h_result::COR_E_AMBIGUOUSMATCH
staticconstexpr

Ambiguous match found.

◆ COR_E_APPDOMAINUNLOADED

constexpr int32 xtd::h_result::COR_E_APPDOMAINUNLOADED
staticconstexpr

Attempted to access an unloaded AppDomain.

◆ COR_E_APPLICATION

constexpr int32 xtd::h_result::COR_E_APPLICATION
staticconstexpr

Error in the application.

◆ COR_E_ARGUMENT

constexpr int32 xtd::h_result::COR_E_ARGUMENT
staticconstexpr

Value does not fall within the expected range.

◆ COR_E_ARGUMENTOUTOFRANGE

constexpr int32 xtd::h_result::COR_E_ARGUMENTOUTOFRANGE
staticconstexpr

Specified argument was out of the range of valid values.

◆ COR_E_ARITHMETIC

constexpr int32 xtd::h_result::COR_E_ARITHMETIC
staticconstexpr

Overflow or underflow in the arithmetic operation.

◆ COR_E_ARRAYTYPEMISMATCH

constexpr int32 xtd::h_result::COR_E_ARRAYTYPEMISMATCH
staticconstexpr

Attempted to access an element as a type incompatible with the array.

◆ COR_E_BADEXEFORMAT

constexpr int32 xtd::h_result::COR_E_BADEXEFORMAT
staticconstexpr

Format of the executable (.exe) cannot be run.

◆ COR_E_BADIMAGEFORMAT

constexpr int32 xtd::h_result::COR_E_BADIMAGEFORMAT
staticconstexpr

Format of the executable (.exe) or library (.dll) is invalid.

◆ COR_E_CANNOTUNLOADAPPDOMAIN

constexpr int32 xtd::h_result::COR_E_CANNOTUNLOADAPPDOMAIN
staticconstexpr

Attempt to unload the AppDomain failed.

◆ COR_E_CODECONTRACTFAILED

constexpr int32 xtd::h_result::COR_E_CODECONTRACTFAILED
staticconstexpr

A code contract (ie, precondition, postcondition, invariant, or assert) failed.

◆ COR_E_CONTEXTMARSHAL

constexpr int32 xtd::h_result::COR_E_CONTEXTMARSHAL
staticconstexpr

Attempted to marshal an object across a context boundary.

◆ COR_E_CUSTOMATTRIBUTEFORMAT

constexpr int32 xtd::h_result::COR_E_CUSTOMATTRIBUTEFORMAT
staticconstexpr

Binary format of the specified custom attribute was invalid.

◆ COR_E_DATAMISALIGNED

constexpr int32 xtd::h_result::COR_E_DATAMISALIGNED
staticconstexpr

A datatype misalignment was detected in a load or store instruction.

◆ COR_E_DIRECTORYNOTFOUND

constexpr int32 xtd::h_result::COR_E_DIRECTORYNOTFOUND
staticconstexpr

Attempted to access a path that is not on the disk.

◆ COR_E_DIVIDEBYZERO

constexpr int32 xtd::h_result::COR_E_DIVIDEBYZERO
staticconstexpr

Attempted to divide by zero.

◆ COR_E_DLLNOTFOUND

constexpr int32 xtd::h_result::COR_E_DLLNOTFOUND
staticconstexpr

Dll was not found.

◆ COR_E_DRIVENOTFOUND

constexpr int32 xtd::h_result::COR_E_DRIVENOTFOUND
staticconstexpr

Could not find the drive. The drive might not be ready or might not be mapped.

◆ COR_E_DUPLICATEWAITOBJECT

constexpr int32 xtd::h_result::COR_E_DUPLICATEWAITOBJECT
staticconstexpr

Duplicate objects in argument.

◆ COR_E_ENDOFSTREAM

constexpr int32 xtd::h_result::COR_E_ENDOFSTREAM
staticconstexpr

Attempted to read past the end of the stream.

◆ COR_E_ENTRYPOINTNOTFOUND

constexpr int32 xtd::h_result::COR_E_ENTRYPOINTNOTFOUND
staticconstexpr

Entry point was not found.

◆ COR_E_EXCEPTION

constexpr int32 xtd::h_result::COR_E_EXCEPTION
staticconstexpr

Exception of type 'xtd::exception' was thrown.

◆ COR_E_EXECUTIONENGINE

constexpr int32 xtd::h_result::COR_E_EXECUTIONENGINE
staticconstexpr

Internal error in the runtime.

◆ COR_E_FAILFAST

constexpr int32 xtd::h_result::COR_E_FAILFAST
staticconstexpr

Fail fast.

◆ COR_E_FIELDACCESS

constexpr int32 xtd::h_result::COR_E_FIELDACCESS
staticconstexpr

Attempted to access a field that is not accessible by the caller.

◆ COR_E_FILELOAD

constexpr int32 xtd::h_result::COR_E_FILELOAD
staticconstexpr

Could not load the specified file.

◆ COR_E_FILENOTFOUND

constexpr int32 xtd::h_result::COR_E_FILENOTFOUND
staticconstexpr

Unable to find the specified file.

◆ COR_E_FORMAT

constexpr int32 xtd::h_result::COR_E_FORMAT
staticconstexpr

One of the identified items was in an invalid format.

◆ COR_E_INDEXOUTOFRANGE

constexpr int32 xtd::h_result::COR_E_INDEXOUTOFRANGE
staticconstexpr

Index was outside the bounds of the array.

◆ COR_E_INSUFFICIENTEXECUTIONSTACK

constexpr int32 xtd::h_result::COR_E_INSUFFICIENTEXECUTIONSTACK
staticconstexpr

Insufficient stack to continue executing the program safely. This can happen from having too many functions on the call stack or function on the stack using too much stack space.

◆ COR_E_INSUFFICIENTMEMORY

constexpr int32 xtd::h_result::COR_E_INSUFFICIENTMEMORY
staticconstexpr

Insufficient memory to continue the execution of the program.

◆ COR_E_INVALIDCAST

constexpr int32 xtd::h_result::COR_E_INVALIDCAST
staticconstexpr

Specified cast is not valid.

◆ COR_E_INVALIDCOMOBJECT

constexpr int32 xtd::h_result::COR_E_INVALIDCOMOBJECT
staticconstexpr

Attempt has been made to use a COM object that does not have a backing class factory.

◆ COR_E_INVALIDFILTERCRITERIA

constexpr int32 xtd::h_result::COR_E_INVALIDFILTERCRITERIA
staticconstexpr

Specified filter criteria was invalid.

◆ COR_E_INVALIDOLEVARIANTTYPE

constexpr int32 xtd::h_result::COR_E_INVALIDOLEVARIANTTYPE
staticconstexpr

Specified OLE variant was invalid.

◆ COR_E_INVALIDOPERATION

constexpr int32 xtd::h_result::COR_E_INVALIDOPERATION
staticconstexpr

Operation is not valid due to the current state of the object.

◆ COR_E_INVALIDPROGRAM

constexpr int32 xtd::h_result::COR_E_INVALIDPROGRAM
staticconstexpr

xtd detected an invalid program.

◆ COR_E_IO

constexpr int32 xtd::h_result::COR_E_IO
staticconstexpr

I/O error occurred.

◆ COR_E_KEYNOTFOUND

constexpr int32 xtd::h_result::COR_E_KEYNOTFOUND
staticconstexpr

The given key was not present in the dictionary.

◆ COR_E_MARSHALDIRECTIVE

constexpr int32 xtd::h_result::COR_E_MARSHALDIRECTIVE
staticconstexpr

Marshaling directives are invalid.

◆ COR_E_MEMBERACCESS

constexpr int32 xtd::h_result::COR_E_MEMBERACCESS
staticconstexpr

Cannot access member.

◆ COR_E_METHODACCESS

constexpr int32 xtd::h_result::COR_E_METHODACCESS
staticconstexpr

Attempt to access the method failed.

◆ COR_E_MISSINGFIELD

constexpr int32 xtd::h_result::COR_E_MISSINGFIELD
staticconstexpr

Attempted to access a non-existing field.

◆ COR_E_MISSINGMANIFESTRESOURCE

constexpr int32 xtd::h_result::COR_E_MISSINGMANIFESTRESOURCE
staticconstexpr

Attempted to access a missing manifest resource.

◆ COR_E_MISSINGMEMBER

constexpr int32 xtd::h_result::COR_E_MISSINGMEMBER
staticconstexpr

Attempted to access a missing member.

◆ COR_E_MISSINGMETHOD

constexpr int32 xtd::h_result::COR_E_MISSINGMETHOD
staticconstexpr

Attempted to access a missing method.

◆ COR_E_MISSINGSATELLITEASSEMBLY

constexpr int32 xtd::h_result::COR_E_MISSINGSATELLITEASSEMBLY
staticconstexpr

Resource lookup fell back to the ultimate fallback resources in a satellite assembly, but that satellite either was not found or could not be loaded. Please consider reinstalling or repairing the application.

◆ COR_E_MULTICASTNOTSUPPORTED

constexpr int32 xtd::h_result::COR_E_MULTICASTNOTSUPPORTED
staticconstexpr

Attempted to add multiple callbacks to a delegate that does not support multicast.

◆ COR_E_NOTFINITENUMBER

constexpr int32 xtd::h_result::COR_E_NOTFINITENUMBER
staticconstexpr

Number encountered was not a finite quantity.

◆ COR_E_NOTSUPPORTED

constexpr int32 xtd::h_result::COR_E_NOTSUPPORTED
staticconstexpr

Specified method is not supported.

◆ COR_E_OBJECTCLOSED

constexpr int32 xtd::h_result::COR_E_OBJECTCLOSED
staticconstexpr

Cannot access a closed object.

◆ COR_E_OPERATIONCANCELED

constexpr int32 xtd::h_result::COR_E_OPERATIONCANCELED
staticconstexpr

The operation was canceled.

◆ COR_E_OUTOFMEMORY

constexpr int32 xtd::h_result::COR_E_OUTOFMEMORY
staticconstexpr

Insufficient memory to continue the execution of the program.

◆ COR_E_OVERFLOW

constexpr int32 xtd::h_result::COR_E_OVERFLOW
staticconstexpr

Arithmetic operation resulted in an overflow.

◆ COR_E_PATHTOOLONG

constexpr int32 xtd::h_result::COR_E_PATHTOOLONG
staticconstexpr

The specified file name or path is too long, or a component of the specified path is too long.

◆ COR_E_PLATFORMNOTSUPPORTED

constexpr int32 xtd::h_result::COR_E_PLATFORMNOTSUPPORTED
staticconstexpr

Operation is not supported on this platform.

◆ COR_E_RANK

constexpr int32 xtd::h_result::COR_E_RANK
staticconstexpr

Attempted to operate on an array with the incorrect number of dimensions.

◆ COR_E_REFLECTIONTYPELOAD

constexpr int32 xtd::h_result::COR_E_REFLECTIONTYPELOAD
staticconstexpr

Exception of type 'xtd::reflection::reflection_type_load_exception' was thrown.

◆ COR_E_RUNTIMEWRAPPED

constexpr int32 xtd::h_result::COR_E_RUNTIMEWRAPPED
staticconstexpr

An object that does not derive from xtd:oobject has been wrapped in a runtime_wrapped_exception.

◆ COR_E_SAFEARRAYRANKMISMATCH

constexpr int32 xtd::h_result::COR_E_SAFEARRAYRANKMISMATCH
staticconstexpr

Specified array was not of the expected rank.

◆ COR_E_SAFEARRAYTYPEMISMATCH

constexpr int32 xtd::h_result::COR_E_SAFEARRAYTYPEMISMATCH
staticconstexpr

Specified array was not of the expected type.

◆ COR_E_SECURITY

constexpr int32 xtd::h_result::COR_E_SECURITY
staticconstexpr

Security error.

◆ COR_E_SERIALIZATION

constexpr int32 xtd::h_result::COR_E_SERIALIZATION
staticconstexpr

Serialization error.

◆ COR_E_STACKOVERFLOW

constexpr int32 xtd::h_result::COR_E_STACKOVERFLOW
staticconstexpr

Operation caused a stack overflow.

◆ COR_E_SYNCHRONIZATIONLOCK

constexpr int32 xtd::h_result::COR_E_SYNCHRONIZATIONLOCK
staticconstexpr

Object synchronization method was called from an unsynchronized block of code.

◆ COR_E_SYSTEM

constexpr int32 xtd::h_result::COR_E_SYSTEM
staticconstexpr

System error.

◆ COR_E_TARGET

constexpr int32 xtd::h_result::COR_E_TARGET
staticconstexpr

Exception of type 'xtd::reflection::target_exception' was thrown.

◆ COR_E_TARGETINVOCATION

constexpr int32 xtd::h_result::COR_E_TARGETINVOCATION
staticconstexpr

Exception has been thrown by the target of an invocation.

◆ COR_E_TARGETPARAMCOUNT

constexpr int32 xtd::h_result::COR_E_TARGETPARAMCOUNT
staticconstexpr

Number of parameters specified does not match the expected number.

◆ COR_E_THREADABORTED

constexpr int32 xtd::h_result::COR_E_THREADABORTED
staticconstexpr

Thread was aborted.

◆ COR_E_THREADINTERRUPTED

constexpr int32 xtd::h_result::COR_E_THREADINTERRUPTED
staticconstexpr

Thread was interrupted from a waiting state.

◆ COR_E_THREADSTART

constexpr int32 xtd::h_result::COR_E_THREADSTART
staticconstexpr

Thread start failure.

◆ COR_E_THREADSTATE

constexpr int32 xtd::h_result::COR_E_THREADSTATE
staticconstexpr

Thread was in an invalid state for the operation being executed.

◆ COR_E_TIMEOUT

constexpr int32 xtd::h_result::COR_E_TIMEOUT
staticconstexpr

The operation has timed out.

◆ COR_E_TYPEACCESS

constexpr int32 xtd::h_result::COR_E_TYPEACCESS
staticconstexpr

Attempt to access the type failed.

◆ COR_E_TYPEINITIALIZATION

constexpr int32 xtd::h_result::COR_E_TYPEINITIALIZATION
staticconstexpr

The type initializer for 'value' threw an exception.

◆ COR_E_TYPELOAD

constexpr int32 xtd::h_result::COR_E_TYPELOAD
staticconstexpr

Failure has occurred while loading a type.

◆ COR_E_TYPEUNLOADED

constexpr int32 xtd::h_result::COR_E_TYPEUNLOADED
staticconstexpr

Type had been unloaded.

◆ COR_E_UNAUTHORIZEDACCESS

constexpr int32 xtd::h_result::COR_E_UNAUTHORIZEDACCESS
staticconstexpr

Attempted to perform an unauthorized operation.

◆ COR_E_VERIFICATION

constexpr int32 xtd::h_result::COR_E_VERIFICATION
staticconstexpr

Operation could destabilize the runtime.

◆ COR_E_WAITHANDLECANNOTBEOPENED

constexpr int32 xtd::h_result::COR_E_WAITHANDLECANNOTBEOPENED
staticconstexpr

No handle of the given name exists.

◆ CO_E_NOTINITIALIZED

constexpr int32 xtd::h_result::CO_E_NOTINITIALIZED
staticconstexpr

Not initialized.

◆ DISP_E_PARAMNOTFOUND

constexpr int32 xtd::h_result::DISP_E_PARAMNOTFOUND
staticconstexpr

Could not find the parameter.

◆ DISP_E_TYPEMISMATCH

constexpr int32 xtd::h_result::DISP_E_TYPEMISMATCH
staticconstexpr

Attempt to access a variable with an incompatible type.

◆ DISP_E_BADVARTYPE

constexpr int32 xtd::h_result::DISP_E_BADVARTYPE
staticconstexpr

Invalid variable type.

◆ DISP_E_OVERFLOW

constexpr int32 xtd::h_result::DISP_E_OVERFLOW
staticconstexpr

Arithmetic operation resulted in an overflow.

◆ DISP_E_DIVBYZERO

constexpr int32 xtd::h_result::DISP_E_DIVBYZERO
staticconstexpr

Attempted to divide by zero.

◆ E_ABORT

constexpr int32 xtd::h_result::E_ABORT
staticconstexpr

Operation aborted.

◆ E_BOUNDS

constexpr int32 xtd::h_result::E_BOUNDS
staticconstexpr

Bounds exception.

◆ E_CHANGED_STATE

constexpr int32 xtd::h_result::E_CHANGED_STATE
staticconstexpr

The state has been modified.

◆ E_FILENOTFOUND

constexpr int32 xtd::h_result::E_FILENOTFOUND
staticconstexpr

Unable to find the specified file.

◆ E_FAIL

constexpr int32 xtd::h_result::E_FAIL
staticconstexpr

Unspecified failure.

◆ E_HANDLE

constexpr int32 xtd::h_result::E_HANDLE
staticconstexpr

The handle is invalid.

◆ E_INVALIDARG

constexpr int32 xtd::h_result::E_INVALIDARG
staticconstexpr

Value does not fall within the expected range.

◆ E_NOTIMPL

constexpr int32 xtd::h_result::E_NOTIMPL
staticconstexpr

The method or operation is not implemented.

◆ E_POINTER

constexpr int32 xtd::h_result::E_POINTER
staticconstexpr

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

◆ E_UNEXPECTED

constexpr int32 xtd::h_result::E_UNEXPECTED
staticconstexpr

Unexpected failure.

◆ ERROR_MRM_MAP_NOT_FOUND

constexpr int32 xtd::h_result::ERROR_MRM_MAP_NOT_FOUND
staticconstexpr

Resource map not found.

◆ ERROR_TIMEOUT

constexpr int32 xtd::h_result::ERROR_TIMEOUT
staticconstexpr

The operation has timed out.

◆ RO_E_CLOSED

constexpr int32 xtd::h_result::RO_E_CLOSED
staticconstexpr

The object has been closed.

◆ RPC_E_CHANGED_MODE

constexpr int32 xtd::h_result::RPC_E_CHANGED_MODE
staticconstexpr

Cannot change the current thread mode.

◆ TYPE_E_TYPEMISMATCH

constexpr int32 xtd::h_result::TYPE_E_TYPEMISMATCH
staticconstexpr

Incompatible type.

◆ STG_E_PATHNOTFOUND

constexpr int32 xtd::h_result::STG_E_PATHNOTFOUND
staticconstexpr

Attempted to access a path that is not on the disk.

◆ CTL_E_PATHNOTFOUND

constexpr int32 xtd::h_result::CTL_E_PATHNOTFOUND
staticconstexpr

Attempted to access a path that is not on the disk.

◆ CTL_E_FILENOTFOUND

constexpr int32 xtd::h_result::CTL_E_FILENOTFOUND
staticconstexpr

Unable to find the specified file.

◆ FUSION_E_INVALID_NAME

constexpr int32 xtd::h_result::FUSION_E_INVALID_NAME
staticconstexpr

Fusion invalid name exception.

◆ FUSION_E_REF_DEF_MISMATCH

constexpr int32 xtd::h_result::FUSION_E_REF_DEF_MISMATCH
staticconstexpr

Fusion the reference definition is incompatible.

◆ ERROR_TOO_MANY_OPEN_FILES

constexpr int32 xtd::h_result::ERROR_TOO_MANY_OPEN_FILES
staticconstexpr

Too many open files.

◆ ERROR_SHARING_VIOLATION

constexpr int32 xtd::h_result::ERROR_SHARING_VIOLATION
staticconstexpr

Sharing violation.

◆ ERROR_LOCK_VIOLATION

constexpr int32 xtd::h_result::ERROR_LOCK_VIOLATION
staticconstexpr

Lock violations.

◆ ERROR_OPEN_FAILED

constexpr int32 xtd::h_result::ERROR_OPEN_FAILED
staticconstexpr

Open failed.

◆ ERROR_DISK_CORRUPT

constexpr int32 xtd::h_result::ERROR_DISK_CORRUPT
staticconstexpr

Disk corrupt.

◆ ERROR_UNRECOGNIZED_VOLUME

constexpr int32 xtd::h_result::ERROR_UNRECOGNIZED_VOLUME
staticconstexpr

Unrecognized volume.

◆ ERROR_DLL_INIT_FAILED

constexpr int32 xtd::h_result::ERROR_DLL_INIT_FAILED
staticconstexpr

DLL init failed.

◆ MSEE_E_ASSEMBLYLOADINPROGRESS

constexpr int32 xtd::h_result::MSEE_E_ASSEMBLYLOADINPROGRESS
staticconstexpr

Assembly load in progress.

◆ ERROR_FILE_INVALID

constexpr int32 xtd::h_result::ERROR_FILE_INVALID
staticconstexpr

File invalid.


The documentation for this class was generated from the following file: