{"id":529,"date":"2022-02-02T09:27:47","date_gmt":"2022-02-02T09:27:47","guid":{"rendered":"https:\/\/efmsoft.com\/?page_id=529"},"modified":"2022-02-06T06:32:30","modified_gmt":"2022-02-06T06:32:30","slug":"hresult","status":"publish","type":"page","link":"https:\/\/efmsoft.com\/hresult\/","title":{"rendered":"HRESULT"},"content":{"rendered":"

In the field of computer programming, the HRESULT is a data type<\/a> used in Windows operating systems, and the earlier IBM\/Microsoft OS\/2 operating system, to represent error conditions, and warning conditions.<\/p>\n

The original purpose of HRESULTs was to formally lay out ranges of error codes for both public and Microsoft internal use in order to prevent collisions between error codes in different subsystems of the OS\/2 operating system.<\/p>\n

HRESULTs are numerical error codes. Various bits within an HRESULT encode information about the nature of the error code, and where it came from.<\/p>\n

HRESULT error codes are most commonly encountered in COM programming, where they form the basis for a standardized COM error handling convention.<\/p>\n

The HRESULT numbering space is vendor-extensible. Vendors can supply their own values for this field, as long as the\u00a0C<\/b>\u00a0bit (0x20000000) is set, indicating it is a customer code.<\/p>\n

The HRESULT numbering space has the following internal structure. Any protocol that uses NTSTATUS values on the wire is responsible for stating the order in which the bytes are placed on the wire.<\/p>\n

\"HRESULT\"<\/p>\n

S (1 bit):\u00a0<\/b>Severity. If set, indicates a failure result. If clear, indicates a success result.<\/p>\n

R (1 bit):\u00a0<\/b>Reserved. If the\u00a0N<\/b>\u00a0bit is clear, this bit MUST be set to 0. If the\u00a0N<\/b> bit is set, this bit is defined by the NTSTATUS numbering space.<\/p>\n

C (1 bit):\u00a0<\/b>Customer. This bit specifies if the value is customer-defined or Microsoft-defined. The bit is set for customer-defined values and clear for Microsoft-defined values.<\/p>\n

N (1 bit):\u00a0<\/b>If set, indicates that the error code is an NTSTATUS value (as specified in section 2.3), except that this bit is set.<\/p>\n

X (1 bit):\u00a0<\/b> Reserved.\u00a0 SHOULD be set to 0.<\/p>\n

Facility (11 bits):\u00a0<\/b>An indicator of the source of the error. New facilities are occasionally added by Microsoft.<\/p>\n

The following table lists the currently defined facility
\ncodes:<\/p>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Value<\/th>\nMeaning<\/th>\n<\/tr>\n<\/thead>\n
FACILITY_NULL<\/p>\n

0<\/td>\n

The default facility code.<\/td>\n<\/tr>\n
FACILITY_RPC<\/p>\n

1<\/td>\n

The source of the error code is an RPC subsystem.<\/td>\n<\/tr>\n
FACILITY_DISPATCH<\/p>\n

2<\/td>\n

The source of the error code is a COM Dispatch.<\/td>\n<\/tr>\n
FACILITY_STORAGE<\/p>\n

3<\/td>\n

The source of the error code is OLE Storage.<\/td>\n<\/tr>\n
FACILITY_ITF<\/p>\n

4<\/td>\n

The source of the error code is COM\/OLE Interface management.<\/td>\n<\/tr>\n
FACILITY_WIN32<\/p>\n

7<\/td>\n

This region is reserved to map undecorated error codes
\ninto HRESULTs.<\/td>\n<\/tr>\n
FACILITY_WINDOWS<\/p>\n

8<\/td>\n

The source of the error code is the Windows subsystem.<\/td>\n<\/tr>\n
FACILITY_SECURITY<\/p>\n

9<\/td>\n

The source of the error code is the Security API
\nlayer.<\/td>\n<\/tr>\n
FACILITY_SSPI<\/p>\n

9<\/td>\n

The source of the error code is the Security API
\nlayer.<\/td>\n<\/tr>\n
FACILITY_CONTROL<\/p>\n

10<\/td>\n

The source of the error code is the control mechanism.<\/td>\n<\/tr>\n
FACILITY_CERT<\/p>\n

11<\/td>\n

The source of the error code is a certificate client
\nor server?<\/td>\n<\/tr>\n
FACILITY_INTERNET<\/p>\n

12<\/td>\n

The source of the error code is Wininet related.<\/td>\n<\/tr>\n
FACILITY_MEDIASERVER<\/p>\n

13<\/td>\n

The source of the error code is the Windows Media
\nServer.<\/td>\n<\/tr>\n
FACILITY_MSMQ<\/p>\n

14<\/td>\n

The source of the error code is the Microsoft Message
\nQueue.<\/td>\n<\/tr>\n
FACILITY_SETUPAPI<\/p>\n

15<\/td>\n

The source of the error code is the Setup API.<\/td>\n<\/tr>\n
FACILITY_SCARD<\/p>\n

16<\/td>\n

The source of the error code is the Smart-card
\nsubsystem.<\/td>\n<\/tr>\n
FACILITY_COMPLUS<\/p>\n

17<\/td>\n

The source of the error code is COM+.<\/td>\n<\/tr>\n
FACILITY_AAF<\/p>\n

18<\/td>\n

The source of the error code is the Microsoft agent.<\/td>\n<\/tr>\n
FACILITY_URT<\/p>\n

19<\/td>\n

The source of the error code is .NET CLR.<\/td>\n<\/tr>\n
FACILITY_ACS<\/p>\n

20<\/td>\n

The source of the error code is the audit collection
\nservice.<\/td>\n<\/tr>\n
FACILITY_DPLAY<\/p>\n

21<\/td>\n

The source of the error code is Direct Play.<\/td>\n<\/tr>\n
FACILITY_UMI<\/p>\n

22<\/td>\n

The source of the error code is the ubiquitous memoryintrospection
\nservice.<\/td>\n<\/tr>\n
FACILITY_SXS<\/p>\n

23<\/td>\n

The source of the error code is Side-by-side
\nservicing.<\/td>\n<\/tr>\n
FACILITY_WINDOWS_CE<\/p>\n

24<\/td>\n

The error code is specific to Windows CE.<\/td>\n<\/tr>\n
FACILITY_HTTP<\/p>\n

25<\/td>\n

The source of the error code is HTTP support.<\/td>\n<\/tr>\n
FACILITY_USERMODE_COMMONLOG<\/p>\n

26<\/td>\n

The source of the error code is common Logging
\nsupport.<\/td>\n<\/tr>\n
FACILITY_USERMODE_FILTER_MANAGER<\/p>\n

31<\/td>\n

The source of the error code is the user mode filter
\nmanager.<\/td>\n<\/tr>\n
FACILITY_BACKGROUNDCOPY<\/p>\n

32<\/td>\n

The source of the error code is background copy
\ncontrol<\/td>\n<\/tr>\n
FACILITY_CONFIGURATION<\/p>\n

33<\/td>\n

The source of the error code is configuration
\nservices.<\/td>\n<\/tr>\n
FACILITY_STATE_MANAGEMENT<\/p>\n

34<\/td>\n

The source of the error code is state management
\nservices.<\/td>\n<\/tr>\n
FACILITY_METADIRECTORY<\/p>\n

35<\/td>\n

The source of the error code is the Microsoft Identity
\nServer.<\/td>\n<\/tr>\n
FACILITY_WINDOWSUPDATE<\/p>\n

36<\/td>\n

The source of the error code is a Windows update.<\/td>\n<\/tr>\n
FACILITY_DIRECTORYSERVICE<\/p>\n

37<\/td>\n

The source of the error code is Active Directory.<\/td>\n<\/tr>\n
FACILITY_GRAPHICS<\/p>\n

38<\/td>\n

The source of the error code is the graphics drivers.<\/td>\n<\/tr>\n
FACILITY_SHELL<\/p>\n

39<\/td>\n

The source of the error code is the user Shell.<\/td>\n<\/tr>\n
FACILITY_TPM_SERVICES<\/p>\n

40<\/td>\n

The source of the error code is the Trusted Platform
\nModule services.<\/td>\n<\/tr>\n
FACILITY_TPM_SOFTWARE<\/p>\n

41<\/td>\n

The source of the error code is the Trusted Platform
\nModule applications.<\/td>\n<\/tr>\n
FACILITY_PLA<\/p>\n

48<\/td>\n

The source of the error code is Performance Logs and
\nAlerts<\/td>\n<\/tr>\n
FACILITY_FVE<\/p>\n

49<\/td>\n

The source of the error code is Full volume
\nencryption.<\/td>\n<\/tr>\n
FACILITY_FWP<\/p>\n

50<\/td>\n

The source of the error code is the Firewall Platform.<\/td>\n<\/tr>\n
FACILITY_WINRM<\/p>\n

51<\/td>\n

The source of the error code is the Windows Resource
\nManager.<\/td>\n<\/tr>\n
FACILITY_NDIS<\/p>\n

52<\/td>\n

The source of the error code is the Network Driver
\nInterface.<\/td>\n<\/tr>\n
FACILITY_USERMODE_HYPERVISOR<\/p>\n

53<\/td>\n

The source of the error code is the Usermode
\nHypervisor components.<\/td>\n<\/tr>\n
FACILITY_CMI<\/p>\n

54<\/td>\n

The source of the error code is the Configuration
\nManagement Infrastructure.<\/td>\n<\/tr>\n
FACILITY_USERMODE_VIRTUALIZATION<\/p>\n

55<\/td>\n

The source of the error code is the user mode
\nvirtualization subsystem.<\/td>\n<\/tr>\n
FACILITY_USERMODE_VOLMGR<\/p>\n

56<\/td>\n

The source of the error code is the user mode volume manager<\/td>\n<\/tr>\n
FACILITY_BCD<\/p>\n

57<\/td>\n

The source of the error code is the Boot Configuration
\nDatabase.<\/td>\n<\/tr>\n
FACILITY_USERMODE_VHD<\/p>\n

58<\/td>\n

The source of the error code is user mode virtual hard
\ndisk support.<\/td>\n<\/tr>\n
FACILITY_SDIAG<\/p>\n

60<\/td>\n

The source of the error code is System Diagnostics.<\/td>\n<\/tr>\n
FACILITY_WEBSERVICES<\/p>\n

61<\/td>\n

The source of the error code is the Web Services.<\/td>\n<\/tr>\n
FACILITY_WINDOWS_DEFENDER<\/p>\n

80<\/td>\n

The source of the error code is a Windows Defender
\ncomponent.<\/td>\n<\/tr>\n
FACILITY_OPC<\/p>\n

81<\/td>\n

The source of the error code is the open connectivity
\nservice.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

Code (2 bytes):\u00a0<\/b>The remainder of the error code.<\/p>\n

HRESULT status codes are supported by our What Is<\/a>\u00a0service.<\/p>\n","protected":false},"excerpt":{"rendered":"

In the field of computer programming, the HRESULT is a data type used in Windows operating systems, and the earlier IBM\/Microsoft OS\/2 operating system, to represent error conditions, and warning conditions. The original purpose of HRESULTs was to formally lay… Continue Reading →<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-529","page","type-page","status-publish","hentry"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/efmsoft.com\/wp-json\/wp\/v2\/pages\/529","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/efmsoft.com\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/efmsoft.com\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/efmsoft.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/efmsoft.com\/wp-json\/wp\/v2\/comments?post=529"}],"version-history":[{"count":2,"href":"https:\/\/efmsoft.com\/wp-json\/wp\/v2\/pages\/529\/revisions"}],"predecessor-version":[{"id":618,"href":"https:\/\/efmsoft.com\/wp-json\/wp\/v2\/pages\/529\/revisions\/618"}],"wp:attachment":[{"href":"https:\/\/efmsoft.com\/wp-json\/wp\/v2\/media?parent=529"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}