xtd 0.2.0
Loading...
Searching...
No Matches
h_result.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "int32.hpp"
6#include "static.hpp"
7#define __XTD_CORE_INTERNAL__
10#undef __XTD_CORE_INTERNAL__
11#include <unordered_map>
12#include <system_error>
13#include <vector>
14
15// See [Interpreting HRESULTS returned from .NET/CLR: 0x8013XXXX](https://learn.microsoft.com/en-gb/archive/blogs/yizhang/interpreting-hresults-returned-from-netclr-0x8013xxxx)
16
18#if defined(_WIN32)
19# undef S_OK
20# undef S_FALSE
21# undef CO_E_NOTINITIALIZED
22# undef DISP_E_PARAMNOTFOUND
23# undef DISP_E_TYPEMISMATCH
24# undef DISP_E_BADVARTYPE
25# undef DISP_E_OVERFLOW
26# undef DISP_E_DIVBYZERO
27# undef E_ABORT
28# undef E_BOUNDS
29# undef E_CHANGED_STATE
30# undef E_FAIL
31# undef E_HANDLE
32# undef E_INVALIDARG
33# undef E_NOTIMPL
34# undef E_POINTER
35# undef E_UNEXPECTED
36# undef ERROR_MRM_MAP_NOT_FOUND
37# undef ERROR_TIMEOUT
38# undef RO_E_CLOSED
39# undef RPC_E_CHANGED_MODE
40# undef TYPE_E_TYPEMISMATCH
41# undef STG_E_PATHNOTFOUND
42# undef ERROR_TOO_MANY_OPEN_FILES
43# undef ERROR_SHARING_VIOLATION
44# undef ERROR_LOCK_VIOLATION
45# undef ERROR_OPEN_FAILED
46# undef ERROR_DISK_CORRUPT
47# undef ERROR_UNRECOGNIZED_VOLUME
48# undef ERROR_DLL_INIT_FAILED
49# undef ERROR_FILE_INVALID
50#endif
52
54namespace xtd {
95 public:
97
100 static constexpr int32 S_OK = static_cast<int32>(0x00000000);
102 static constexpr int32 S_FALSE = static_cast<int32>(0x00000001);
104 static constexpr int32 COR_E_ABANDONEDMUTEX = static_cast<int32>(0x8013152D);
106 static constexpr int32 COR_E_AMBIGUOUSIMPLEMENTATION = static_cast<int32>(0x8013106A);
108 static constexpr int32 COR_E_AMBIGUOUSMATCH = static_cast<int32>(0x8000211D);
110 static constexpr int32 COR_E_APPDOMAINUNLOADED = static_cast<int32>(0x80131014);
112 static constexpr int32 COR_E_APPLICATION = static_cast<int32>(0x80131600);
114 static constexpr int32 COR_E_ARGUMENT = static_cast<int32>(0x80070057); // Duplicate with E_INVALIDARG
116 static constexpr int32 COR_E_ARGUMENTOUTOFRANGE = static_cast<int32>(0x80131502);
118 static constexpr int32 COR_E_ARITHMETIC = static_cast<int32>(0x80070216);
120 static constexpr int32 COR_E_ARRAYTYPEMISMATCH = static_cast<int32>(0x80131503);
122 static constexpr int32 COR_E_BADEXEFORMAT = static_cast<int32>(0x800700C1);
124 static constexpr int32 COR_E_BADIMAGEFORMAT = static_cast<int32>(0x8007000B);
126 static constexpr int32 COR_E_CANNOTUNLOADAPPDOMAIN = static_cast<int32>(0x80131015);
128 static constexpr int32 COR_E_CODECONTRACTFAILED = static_cast<int32>(0x80131542);
130 static constexpr int32 COR_E_CONTEXTMARSHAL = static_cast<int32>(0x80131504);
132 static constexpr int32 COR_E_CUSTOMATTRIBUTEFORMAT = static_cast<int32>(0x80131605);
134 static constexpr int32 COR_E_DATAMISALIGNED = static_cast<int32>(0x80131541);
136 static constexpr int32 COR_E_DIRECTORYNOTFOUND = static_cast<int32>(0x80070003);
138 static constexpr int32 COR_E_DIVIDEBYZERO = static_cast<int32>(0x80020012); // Duplicate with DISP_E_DIVBYZERO
140 static constexpr int32 COR_E_DLLNOTFOUND = static_cast<int32>(0x80131524);
142 static constexpr int32 COR_E_DRIVENOTFOUND = static_cast<int32>(0x80070007);
144 static constexpr int32 COR_E_DUPLICATEWAITOBJECT = static_cast<int32>(0x80131529);
146 static constexpr int32 COR_E_ENDOFSTREAM = static_cast<int32>(0x80070026);
148 static constexpr int32 COR_E_ENTRYPOINTNOTFOUND = static_cast<int32>(0x80131523);
150 static constexpr int32 COR_E_EXCEPTION = static_cast<int32>(0x80131500);
152 static constexpr int32 COR_E_EXECUTIONENGINE = static_cast<int32>(0x80131506);
154 static constexpr int32 COR_E_FAILFAST = static_cast<int32>(0x80131623);
156 static constexpr int32 COR_E_FIELDACCESS = static_cast<int32>(0x80131507);
158 static constexpr int32 COR_E_FILELOAD = static_cast<int32>(0x80131621);
160 static constexpr int32 COR_E_FILENOTFOUND = static_cast<int32>(0x80070002); // Duplicate with E_FILENOTFOUND
162 static constexpr int32 COR_E_FORMAT = static_cast<int32>(0x80131537);
164 static constexpr int32 COR_E_INDEXOUTOFRANGE = static_cast<int32>(0x80131508);
166 static constexpr int32 COR_E_INSUFFICIENTEXECUTIONSTACK = static_cast<int32>(0x80131578);
168 static constexpr int32 COR_E_INSUFFICIENTMEMORY = static_cast<int32>(0x8013153D);
170 static constexpr int32 COR_E_INVALIDCAST = static_cast<int32>(0x80004002);
172 static constexpr int32 COR_E_INVALIDCOMOBJECT = static_cast<int32>(0x80131527);
174 static constexpr int32 COR_E_INVALIDFILTERCRITERIA = static_cast<int32>(0x80131601);
176 static constexpr int32 COR_E_INVALIDOLEVARIANTTYPE = static_cast<int32>(0x80131531);
178 static constexpr int32 COR_E_INVALIDOPERATION = static_cast<int32>(0x80131509);
180 static constexpr int32 COR_E_INVALIDPROGRAM = static_cast<int32>(0x8013153A);
182 static constexpr int32 COR_E_IO = static_cast<int32>(0x80131620);
184 static constexpr int32 COR_E_KEYNOTFOUND = static_cast<int32>(0x80131577);
186 static constexpr int32 COR_E_MARSHALDIRECTIVE = static_cast<int32>(0x80131535);
188 static constexpr int32 COR_E_MEMBERACCESS = static_cast<int32>(0x8013151A);
190 static constexpr int32 COR_E_METHODACCESS = static_cast<int32>(0x80131510);
192 static constexpr int32 COR_E_MISSINGFIELD = static_cast<int32>(0x80131511);
194 static constexpr int32 COR_E_MISSINGMANIFESTRESOURCE = static_cast<int32>(0x80131532);
196 static constexpr int32 COR_E_MISSINGMEMBER = static_cast<int32>(0x80131512);
198 static constexpr int32 COR_E_MISSINGMETHOD = static_cast<int32>(0x80131513);
200 static constexpr int32 COR_E_MISSINGSATELLITEASSEMBLY = static_cast<int32>(0x80131536);
202 static constexpr int32 COR_E_MULTICASTNOTSUPPORTED = static_cast<int32>(0x80131514);
204 static constexpr int32 COR_E_NOTFINITENUMBER = static_cast<int32>(0x80131528);
206 static constexpr int32 COR_E_NOTSUPPORTED = static_cast<int32>(0x80131515);
208 static constexpr int32 COR_E_OBJECTCLOSED = static_cast<int32>(0x80131622);
210 static constexpr int32 COR_E_OPERATIONCANCELED = static_cast<int32>(0x8013153B);
212 static constexpr int32 COR_E_OUTOFMEMORY = static_cast<int32>(0x8007000E);
214 static constexpr int32 COR_E_OVERFLOW = static_cast<int32>(0x80131516);
216 static constexpr int32 COR_E_PATHTOOLONG = static_cast<int32>(0x800700CE);
218 static constexpr int32 COR_E_PLATFORMNOTSUPPORTED = static_cast<int32>(0x80131539);
220 static constexpr int32 COR_E_RANK = static_cast<int32>(0x80131517);
222 static constexpr int32 COR_E_REFLECTIONTYPELOAD = static_cast<int32>(0x80131602);
224 static constexpr int32 COR_E_RUNTIMEWRAPPED = static_cast<int32>(0x8013153E);
226 static constexpr int32 COR_E_SAFEARRAYRANKMISMATCH = static_cast<int32>(0x80131538);
228 static constexpr int32 COR_E_SAFEARRAYTYPEMISMATCH = static_cast<int32>(0x80131533);
230 static constexpr int32 COR_E_SECURITY = static_cast<int32>(0x8013150A);
232 static constexpr int32 COR_E_SERIALIZATION = static_cast<int32>(0x8013150C);
234 static constexpr int32 COR_E_STACKOVERFLOW = static_cast<int32>(0x800703E9);
236 static constexpr int32 COR_E_SYNCHRONIZATIONLOCK = static_cast<int32>(0x80131518);
238 static constexpr int32 COR_E_SYSTEM = static_cast<int32>(0x80131501);
240 static constexpr int32 COR_E_TARGET = static_cast<int32>(0x80131603);
242 static constexpr int32 COR_E_TARGETINVOCATION = static_cast<int32>(0x80131604);
244 static constexpr int32 COR_E_TARGETPARAMCOUNT = static_cast<int32>(0x8002000E);
246 static constexpr int32 COR_E_THREADABORTED = static_cast<int32>(0x80131530);
248 static constexpr int32 COR_E_THREADINTERRUPTED = static_cast<int32>(0x80131519);
250 static constexpr int32 COR_E_THREADSTART = static_cast<int32>(0x80131525);
252 static constexpr int32 COR_E_THREADSTATE = static_cast<int32>(0x80131520);
254 static constexpr int32 COR_E_TIMEOUT = static_cast<int32>(0x80131505);
256 static constexpr int32 COR_E_TYPEACCESS = static_cast<int32>(0x80131543);
258 static constexpr int32 COR_E_TYPEINITIALIZATION = static_cast<int32>(0x80131534);
260 static constexpr int32 COR_E_TYPELOAD = static_cast<int32>(0x80131522);
262 static constexpr int32 COR_E_TYPEUNLOADED = static_cast<int32>(0x80131013);
264 static constexpr int32 COR_E_UNAUTHORIZEDACCESS = static_cast<int32>(0x80070005);
266 static constexpr int32 COR_E_VERIFICATION = static_cast<int32>(0x8013150D);
268 static constexpr int32 COR_E_WAITHANDLECANNOTBEOPENED = static_cast<int32>(0x8013152C);
270 static constexpr int32 CO_E_NOTINITIALIZED = static_cast<int32>(0x800401F0);
272 static constexpr int32 DISP_E_PARAMNOTFOUND = static_cast<int32>(0x80020004);
274 static constexpr int32 DISP_E_TYPEMISMATCH = static_cast<int32>(0x80020005);
276 static constexpr int32 DISP_E_BADVARTYPE = static_cast<int32>(0x80020008);
278 static constexpr int32 DISP_E_OVERFLOW = static_cast<int32>(0x8002000A);
280 static constexpr int32 DISP_E_DIVBYZERO = static_cast<int32>(0x80020012); // Duplicate with COR_E_DIVIDEBYZERO
282 static constexpr int32 E_ABORT = static_cast<int32>(0x80004004);
284 static constexpr int32 E_BOUNDS = static_cast<int32>(0x8000000B);
286 static constexpr int32 E_CHANGED_STATE = static_cast<int32>(0x8000000C);
288 static constexpr int32 E_FILENOTFOUND = static_cast<int32>(0x80070002); // Duplicate with COR_E_FILENOTFOUND
290 static constexpr int32 E_FAIL = static_cast<int32>(0x80004005);
292 static constexpr int32 E_HANDLE = static_cast<int32>(0x80070006);
294 static constexpr int32 E_INVALIDARG = static_cast<int32>(0x80070057); // Duplicate with COR_E_ARGUMENT
296 static constexpr int32 E_NOTIMPL = static_cast<int32>(0x80004001);
298 static constexpr int32 E_POINTER = static_cast<int32>(0x80004003);
300 static constexpr int32 E_UNEXPECTED = static_cast<int32>(0x8000FFFF);
302 static constexpr int32 ERROR_MRM_MAP_NOT_FOUND = static_cast<int32>(0x80073B1F);
304 static constexpr int32 ERROR_TIMEOUT = static_cast<int32>(0x800705B4);
306 static constexpr int32 RO_E_CLOSED = static_cast<int32>(0x80000013);
308 static constexpr int32 RPC_E_CHANGED_MODE = static_cast<int32>(0x80010106);
310 static constexpr int32 TYPE_E_TYPEMISMATCH = static_cast<int32>(0x80028CA0);
312 static constexpr int32 STG_E_PATHNOTFOUND = static_cast<int32>(0x80030003);
314 static constexpr int32 CTL_E_PATHNOTFOUND = static_cast<int32>(0x800A004C);
316 static constexpr int32 CTL_E_FILENOTFOUND = static_cast<int32>(0x800A0035);
318 static constexpr int32 FUSION_E_INVALID_NAME = static_cast<int32>(0x80131047);
320 static constexpr int32 FUSION_E_REF_DEF_MISMATCH = static_cast<int32>(0x80131040);
322 static constexpr int32 ERROR_TOO_MANY_OPEN_FILES = static_cast<int32>(0x80070004);
324 static constexpr int32 ERROR_SHARING_VIOLATION = static_cast<int32>(0x80070020);
326 static constexpr int32 ERROR_LOCK_VIOLATION = static_cast<int32>(0x80070021);
328 static constexpr int32 ERROR_OPEN_FAILED = static_cast<int32>(0x8007006E);
330 static constexpr int32 ERROR_DISK_CORRUPT = static_cast<int32>(0x80070571);
332 static constexpr int32 ERROR_UNRECOGNIZED_VOLUME = static_cast<int32>(0x800703ED);
334 static constexpr int32 ERROR_DLL_INIT_FAILED = static_cast<int32>(0x8007045A);
336 static constexpr int32 MSEE_E_ASSEMBLYLOADINPROGRESS = static_cast<int32>(0x80131016);
338 static constexpr int32 ERROR_FILE_INVALID = static_cast<int32>(0x800703EE);
340
342
347 static bool failed(int32 h_result) noexcept;
348
352 static int32 get_code(int32 h_result) noexcept;
353
489
492 static const xtd::array<int32>& get_h_results() noexcept;
493
497 static string get_message(int32 h_result) noexcept;
498
501 static const std::unordered_map<int32, string>& get_messages() noexcept;
502
506 static string get_name(int32 h_result) noexcept;
507
510 static const std::unordered_map<int32, string>& get_names() noexcept;
511
521
524 static const std::error_category& h_result_category() noexcept;
525
529 static bool is_error(int32 h_result) noexcept;
530
534 static std::error_code make_error_code(int h_result) noexcept;
535
539 static bool succeeded(int32 h_result) noexcept;
540
544 static string to_string(int32 h_result) noexcept;
546 };
547}
Contains array definitions.
Contains string definitions.
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:58
Contains the HRESULT values used by xtd.
Definition h_result.hpp:94
static constexpr int32 COR_E_STACKOVERFLOW
Operation caused a stack overflow.
Definition h_result.hpp:234
static constexpr int32 COR_E_THREADSTART
Thread start failure.
Definition h_result.hpp:250
static constexpr int32 COR_E_TYPEINITIALIZATION
The type initializer for 'value' threw an exception.
Definition h_result.hpp:258
static constexpr int32 COR_E_SECURITY
Security error.
Definition h_result.hpp:230
static bool is_error(int32 h_result) noexcept
Provides a generic is error test for the specified HRESULT.
static constexpr int32 RPC_E_CHANGED_MODE
Cannot change the current thread mode.
Definition h_result.hpp:308
static constexpr int32 COR_E_METHODACCESS
Attempt to access the method failed.
Definition h_result.hpp:190
static const std::unordered_map< int32, string > & get_messages() noexcept
Gets The HRESULT messages.
static constexpr int32 COR_E_TARGETINVOCATION
Exception has been thrown by the target of an invocation.
Definition h_result.hpp:242
static constexpr int32 E_POINTER
Attempted to read or write protected memory. This is often an indication that other memory is corrupt...
Definition h_result.hpp:298
static constexpr int32 E_BOUNDS
Bounds exception.
Definition h_result.hpp:284
static constexpr int32 COR_E_OVERFLOW
Arithmetic operation resulted in an overflow.
Definition h_result.hpp:214
static constexpr int32 COR_E_MEMBERACCESS
Cannot access member.
Definition h_result.hpp:188
static constexpr int32 COR_E_DRIVENOTFOUND
Could not find the drive. The drive might not be ready or might not be mapped.
Definition h_result.hpp:142
static constexpr int32 ERROR_DISK_CORRUPT
Disk corrupt.
Definition h_result.hpp:330
static constexpr int32 COR_E_FILELOAD
Could not load the specified file.
Definition h_result.hpp:158
static constexpr int32 COR_E_KEYNOTFOUND
The given key was not present in the dictionary.
Definition h_result.hpp:184
static constexpr int32 TYPE_E_TYPEMISMATCH
Incompatible type.
Definition h_result.hpp:310
static constexpr int32 COR_E_UNAUTHORIZEDACCESS
Attempted to perform an unauthorized operation.
Definition h_result.hpp:264
static constexpr int32 COR_E_MARSHALDIRECTIVE
Marshaling directives are invalid.
Definition h_result.hpp:186
static constexpr int32 COR_E_THREADINTERRUPTED
Thread was interrupted from a waiting state.
Definition h_result.hpp:248
static constexpr int32 COR_E_AMBIGUOUSMATCH
Ambiguous match found.
Definition h_result.hpp:108
static std::error_code make_error_code(int h_result) noexcept
Creates error code value for the specified HRESULT.
static constexpr int32 COR_E_SERIALIZATION
Serialization error.
Definition h_result.hpp:232
static constexpr int32 COR_E_FILENOTFOUND
Unable to find the specified file.
Definition h_result.hpp:160
static constexpr int32 DISP_E_BADVARTYPE
Invalid variable type.
Definition h_result.hpp:276
static constexpr int32 COR_E_INVALIDOLEVARIANTTYPE
Specified OLE variant was invalid.
Definition h_result.hpp:176
static constexpr int32 COR_E_OBJECTCLOSED
Cannot access a closed object.
Definition h_result.hpp:208
static constexpr int32 COR_E_TARGETPARAMCOUNT
Number of parameters specified does not match the expected number.
Definition h_result.hpp:244
static constexpr int32 COR_E_BADEXEFORMAT
Format of the executable (.exe) cannot be run.
Definition h_result.hpp:122
static constexpr int32 COR_E_APPLICATION
Error in the application.
Definition h_result.hpp:112
static constexpr int32 COR_E_ARGUMENT
Value does not fall within the expected range.
Definition h_result.hpp:114
static int32 get_severity(int32 h_result) noexcept
The severity of the specified HRESULT, which indicates what API or framework originated this error.
static constexpr int32 COR_E_MULTICASTNOTSUPPORTED
Attempted to add multiple callbacks to a delegate that does not support multicast.
Definition h_result.hpp:202
static string get_name(int32 h_result) noexcept
Gets the name of the specified HRESULT.
static constexpr int32 COR_E_TYPELOAD
Failure has occurred while loading a type.
Definition h_result.hpp:260
static constexpr int32 CO_E_NOTINITIALIZED
Not initialized.
Definition h_result.hpp:270
static constexpr int32 COR_E_MISSINGSATELLITEASSEMBLY
Resource lookup fell back to the ultimate fallback resources in a satellite assembly,...
Definition h_result.hpp:200
static constexpr int32 COR_E_TARGET
Exception of type 'xtd::reflection::target_exception' was thrown.
Definition h_result.hpp:240
static constexpr int32 COR_E_EXECUTIONENGINE
Internal error in the runtime.
Definition h_result.hpp:152
static constexpr int32 COR_E_FAILFAST
Fail fast.
Definition h_result.hpp:154
static constexpr int32 COR_E_DUPLICATEWAITOBJECT
Duplicate objects in argument.
Definition h_result.hpp:144
static constexpr int32 FUSION_E_REF_DEF_MISMATCH
Fusion the reference definition is incompatible.
Definition h_result.hpp:320
static constexpr int32 COR_E_SYSTEM
System error.
Definition h_result.hpp:238
static constexpr int32 MSEE_E_ASSEMBLYLOADINPROGRESS
Assembly load in progress.
Definition h_result.hpp:336
static constexpr int32 DISP_E_OVERFLOW
Arithmetic operation resulted in an overflow.
Definition h_result.hpp:278
static constexpr int32 ERROR_MRM_MAP_NOT_FOUND
Resource map not found.
Definition h_result.hpp:302
static constexpr int32 COR_E_NOTSUPPORTED
Specified method is not supported.
Definition h_result.hpp:206
static constexpr int32 COR_E_MISSINGMETHOD
Attempted to access a missing method.
Definition h_result.hpp:198
static string get_message(int32 h_result) noexcept
Gets the message of the specified HRESULT.
static constexpr int32 COR_E_AMBIGUOUSIMPLEMENTATION
Ambiguous implementation found.
Definition h_result.hpp:106
static constexpr int32 E_CHANGED_STATE
The state has been modified.
Definition h_result.hpp:286
static constexpr int32 ERROR_LOCK_VIOLATION
Lock violations.
Definition h_result.hpp:326
static constexpr int32 COR_E_DATAMISALIGNED
A datatype misalignment was detected in a load or store instruction.
Definition h_result.hpp:134
static constexpr int32 COR_E_SAFEARRAYTYPEMISMATCH
Specified array was not of the expected type.
Definition h_result.hpp:228
static const std::unordered_map< int32, string > & get_names() noexcept
Gets The HRESULT names.
static constexpr int32 COR_E_ARITHMETIC
Overflow or underflow in the arithmetic operation.
Definition h_result.hpp:118
static constexpr int32 ERROR_OPEN_FAILED
Open failed.
Definition h_result.hpp:328
static constexpr int32 COR_E_ABANDONEDMUTEX
The wait completed due to an abandoned mutex.
Definition h_result.hpp:104
static constexpr int32 COR_E_CONTEXTMARSHAL
Attempted to marshal an object across a context boundary.
Definition h_result.hpp:130
static constexpr int32 COR_E_TYPEACCESS
Attempt to access the type failed.
Definition h_result.hpp:256
static constexpr int32 FUSION_E_INVALID_NAME
Fusion invalid name exception.
Definition h_result.hpp:318
static constexpr int32 COR_E_OUTOFMEMORY
Insufficient memory to continue the execution of the program.
Definition h_result.hpp:212
static constexpr int32 COR_E_FIELDACCESS
Attempted to access a field that is not accessible by the caller.
Definition h_result.hpp:156
static constexpr int32 COR_E_INVALIDOPERATION
Operation is not valid due to the current state of the object.
Definition h_result.hpp:178
static bool succeeded(int32 h_result) noexcept
Provides a generic success test for the specified HRESULT.
static constexpr int32 COR_E_ARRAYTYPEMISMATCH
Attempted to access an element as a type incompatible with the array.
Definition h_result.hpp:120
static constexpr int32 ERROR_TIMEOUT
The operation has timed out.
Definition h_result.hpp:304
static constexpr int32 COR_E_CANNOTUNLOADAPPDOMAIN
Attempt to unload the AppDomain failed.
Definition h_result.hpp:126
static string to_string(int32 h_result) noexcept
Gets the name of the specified HRESULT.
static constexpr int32 COR_E_INVALIDCAST
Specified cast is not valid.
Definition h_result.hpp:170
static constexpr int32 COR_E_SAFEARRAYRANKMISMATCH
Specified array was not of the expected rank.
Definition h_result.hpp:226
static constexpr int32 COR_E_CUSTOMATTRIBUTEFORMAT
Binary format of the specified custom attribute was invalid.
Definition h_result.hpp:132
static constexpr int32 COR_E_INVALIDCOMOBJECT
Attempt has been made to use a COM object that does not have a backing class factory.
Definition h_result.hpp:172
static constexpr int32 COR_E_MISSINGMANIFESTRESOURCE
Attempted to access a missing manifest resource.
Definition h_result.hpp:194
static bool failed(int32 h_result) noexcept
Provides a generic fail test for 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 constexpr int32 ERROR_FILE_INVALID
File invalid.
Definition h_result.hpp:338
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.
Definition h_result.hpp:216
static constexpr int32 COR_E_DIRECTORYNOTFOUND
Attempted to access a path that is not on the disk.
Definition h_result.hpp:136
static constexpr int32 ERROR_TOO_MANY_OPEN_FILES
Too many open files.
Definition h_result.hpp:322
static constexpr int32 COR_E_INDEXOUTOFRANGE
Index was outside the bounds of the array.
Definition h_result.hpp:164
static constexpr int32 E_FILENOTFOUND
Unable to find the specified file.
Definition h_result.hpp:288
static constexpr int32 COR_E_INSUFFICIENTMEMORY
Insufficient memory to continue the execution of the program.
Definition h_result.hpp:168
static int32 get_code(int32 h_result) noexcept
Gets the code portion of the specified HRESULT.
static constexpr int32 COR_E_SYNCHRONIZATIONLOCK
Object synchronization method was called from an unsynchronized block of code.
Definition h_result.hpp:236
static constexpr int32 COR_E_NOTFINITENUMBER
Number encountered was not a finite quantity.
Definition h_result.hpp:204
static constexpr int32 COR_E_BADIMAGEFORMAT
Format of the executable (.exe) or library (.dll) is invalid.
Definition h_result.hpp:124
static constexpr int32 COR_E_INVALIDPROGRAM
xtd detected an invalid program.
Definition h_result.hpp:180
static constexpr int32 COR_E_ENTRYPOINTNOTFOUND
Entry point was not found.
Definition h_result.hpp:148
static constexpr int32 COR_E_MISSINGFIELD
Attempted to access a non-existing field.
Definition h_result.hpp:192
static constexpr int32 ERROR_DLL_INIT_FAILED
DLL init failed.
Definition h_result.hpp:334
static constexpr int32 COR_E_CODECONTRACTFAILED
A code contract (ie, precondition, postcondition, invariant, or assert) failed.
Definition h_result.hpp:128
static constexpr int32 COR_E_THREADABORTED
Thread was aborted.
Definition h_result.hpp:246
static constexpr int32 S_FALSE
Operation successful but returned no results.
Definition h_result.hpp:102
static constexpr int32 ERROR_SHARING_VIOLATION
Sharing violation.
Definition h_result.hpp:324
static constexpr int32 RO_E_CLOSED
The object has been closed.
Definition h_result.hpp:306
static constexpr int32 E_HANDLE
The handle is invalid.
Definition h_result.hpp:292
static constexpr int32 DISP_E_DIVBYZERO
Attempted to divide by zero.
Definition h_result.hpp:280
static constexpr int32 COR_E_EXCEPTION
Exception of type 'xtd::exception' was thrown.
Definition h_result.hpp:150
static constexpr int32 COR_E_PLATFORMNOTSUPPORTED
Operation is not supported on this platform.
Definition h_result.hpp:218
static constexpr int32 S_OK
Operation successful.
Definition h_result.hpp:100
static constexpr int32 COR_E_VERIFICATION
Operation could destabilize the runtime.
Definition h_result.hpp:266
static constexpr int32 COR_E_THREADSTATE
Thread was in an invalid state for the operation being executed.
Definition h_result.hpp:252
static constexpr int32 COR_E_RUNTIMEWRAPPED
An object that does not derive from xtd:oobject has been wrapped in a runtime_wrapped_exception.
Definition h_result.hpp:224
static constexpr int32 CTL_E_FILENOTFOUND
Unable to find the specified file.
Definition h_result.hpp:316
static constexpr int32 COR_E_RANK
Attempted to operate on an array with the incorrect number of dimensions.
Definition h_result.hpp:220
static constexpr int32 COR_E_TYPEUNLOADED
Type had been unloaded.
Definition h_result.hpp:262
static constexpr int32 COR_E_WAITHANDLECANNOTBEOPENED
No handle of the given name exists.
Definition h_result.hpp:268
static constexpr int32 STG_E_PATHNOTFOUND
Attempted to access a path that is not on the disk.
Definition h_result.hpp:312
static constexpr int32 DISP_E_TYPEMISMATCH
Attempt to access a variable with an incompatible type.
Definition h_result.hpp:274
static constexpr int32 COR_E_IO
I/O error occurred.
Definition h_result.hpp:182
static constexpr int32 E_FAIL
Unspecified failure.
Definition h_result.hpp:290
static constexpr int32 COR_E_MISSINGMEMBER
Attempted to access a missing member.
Definition h_result.hpp:196
static constexpr int32 E_UNEXPECTED
Unexpected failure.
Definition h_result.hpp:300
static constexpr int32 DISP_E_PARAMNOTFOUND
Could not find the parameter.
Definition h_result.hpp:272
static constexpr int32 COR_E_APPDOMAINUNLOADED
Attempted to access an unloaded AppDomain.
Definition h_result.hpp:110
static constexpr int32 COR_E_OPERATIONCANCELED
The operation was canceled.
Definition h_result.hpp:210
static constexpr int32 E_NOTIMPL
The method or operation is not implemented.
Definition h_result.hpp:296
static constexpr int32 E_ABORT
Operation aborted.
Definition h_result.hpp:282
static constexpr int32 COR_E_REFLECTIONTYPELOAD
Exception of type 'xtd::reflection::reflection_type_load_exception' was thrown.
Definition h_result.hpp:222
static const xtd::array< int32 > & get_h_results() noexcept
Gets an array of HRESULT.
static constexpr int32 CTL_E_PATHNOTFOUND
Attempted to access a path that is not on the disk.
Definition h_result.hpp:314
static constexpr int32 COR_E_ARGUMENTOUTOFRANGE
Specified argument was out of the range of valid values.
Definition h_result.hpp:116
static constexpr int32 COR_E_DLLNOTFOUND
Dll was not found.
Definition h_result.hpp:140
static constexpr int32 COR_E_ENDOFSTREAM
Attempted to read past the end of the stream.
Definition h_result.hpp:146
static constexpr int32 COR_E_INSUFFICIENTEXECUTIONSTACK
Insufficient stack to continue executing the program safely. This can happen from having too many fun...
Definition h_result.hpp:166
static constexpr int32 COR_E_FORMAT
One of the identified items was in an invalid format.
Definition h_result.hpp:162
static constexpr int32 COR_E_TIMEOUT
The operation has timed out.
Definition h_result.hpp:254
static constexpr int32 E_INVALIDARG
Value does not fall within the expected range.
Definition h_result.hpp:294
static constexpr int32 COR_E_DIVIDEBYZERO
Attempted to divide by zero.
Definition h_result.hpp:138
static constexpr int32 COR_E_INVALIDFILTERCRITERIA
Specified filter criteria was invalid.
Definition h_result.hpp:174
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...
static constexpr int32 ERROR_UNRECOGNIZED_VOLUME
Unrecognized volume.
Definition h_result.hpp:332
#define static_
This keyword is use to represent a static object. A static object can't be instantiated (constructors...
Definition static.hpp:37
int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
Contains xtd::int32 type.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10
Contains xtd::static_object class.