Hresult Error Codes Msdn
Contents |
resources Windows Server 2012 resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners ISV Startups TechRewards Events Community Magazine Forums Blogs Channel 9 Documentation APIs and reference Dev centers hresult values win32 error codes Samples Retired content We’re sorry. The content you requested has been removed. hresult c# You’ll be auto redirected in 1 second. Export (0) Print Expand All MSDN Library Open Specifications Protocols Windows Protocols hresult c++ References [MS-ERREF]: Windows Error Codes 2 Structures 2.1 HRESULT 2.1.1 HRESULT Values 2.1.2 HRESULT From WIN32 Error Code Macro Collapse the table of content Expand the table of content This documentation is
Decode Hresult
archived and is not being maintained. 2.1.1 HRESULT Values Combining the fields of an HRESULT into a single, 32-bit numbering space, the following HRESULT values are defined, in addition to those derived from NTSTATUS values (section 2.3.1) and Win32 error codes (section 2.2). This document provides the common usage details of the HRESULTs; individual protocol specifications provide expanded or modified definitions. Most values also hresult 0x80131500 have a default message defined, which can be used to map the value to a human-readable text message; when this is done, the HRESULT value is also known as a message identifier. Note: In the following descriptions, a percentage sign (%) followed by one or more alphanumeric characters (for example, "%1" or "%hs") indicates a variable that is replaced by text at the time the value is returned. Return value/code Description 0x00030200 STG_S_CONVERTED The underlying file was converted to compound file format. 0x00030201 STG_S_BLOCK The storage operation should block until more data is available. 0x00030202 STG_S_RETRYNOW The storage operation should retry immediately. 0x00030203 STG_S_MONITORING The notified event sink will not influence the storage operation. 0x00030204 STG_S_MULTIPLEOPENS Multiple opens prevent consolidated (commit succeeded). 0x00030205 STG_S_CONSOLIDATIONFAILED Consolidation of the storage file failed (commit succeeded). 0x00030206 STG_S_CANNOTCONSOLIDATE Consolidation of the storage file is inappropriate (commit succeeded). 0x00040000 OLE_S_USEREG Use the registry database to provide the requested information. 0x00040001 OLE_S_STATIC Success, but static. 0x00040002 OLE_S_MAC_CLIPFORMAT Macintosh clipboard format. 0x00040100 DRAGDROP_S_DROP Successful drop took place. 0x00040101 DRAGDROP_S_CANCEL Drag-drop operation canceled. 0x00040102 DRAGDROP_S_USEDEFAULTCURSORS Use the default cursor. 0x00040130 DATA_S_SAMEFORMATETC Data has same FORMATETC. 0x00040140 VIEW_S_AL
resources Windows Server 2012 resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners ISV Startups TechRewards Events Community Magazine Forums Blogs Channel 9 Documentation APIs hresult msdn and reference Dev centers Samples Retired content We’re sorry. The content
What Is Hresult
you requested has been removed. You’ll be auto redirected in 1 second. Export (0) Print Expand All MSDN
Hresult 80004005
Library Open Specifications Protocols Windows Protocols References [MS-ERREF]: Windows Error Codes 2 Structures 2.1 HRESULT 2.1.1 HRESULT Values 2.1.2 HRESULT From WIN32 Error Code Macro Collapse the table of content https://msdn.microsoft.com/en-us/library/cc704587.aspx Expand the table of content This documentation is archived and is not being maintained. 2.1 HRESULT The HRESULT numbering space is vendor-extensible. Vendors can supply their own values for this field, as long as the C bit (0x20000000) is set, indicating it is a customer code. The HRESULT numbering space has the following internal structure. Any protocol that uses NTSTATUS https://msdn.microsoft.com/en-us/library/cc231198.aspx values on the wire is responsible for stating the order in which the bytes are placed on the wire. 01234567891012345678920123456789301 S R C N X Facility Code S (1 bit): Severity. If set, indicates a failure result. If clear, indicates a success result. R (1 bit): Reserved. If the N bit is clear, this bit MUST be set to 0. If the N bit is set, this bit is defined by the NTSTATUS numbering space (as specified in section 2.3). C (1 bit): 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.<1> N (1 bit): If set, indicates that the error code is an NTSTATUS value (as specified in section 2.3), except that this bit is set. X (1 bit): Reserved. SHOULD be set to 0. <2> Facility (11 bits): An indicator of the source of the error. New facilities are occasionally added by Microsoft. The following table lists the currently defined facility codes: Value Meaning FACILITY_NULL 0 The default facility code. FAC
and removed. (September 2016) (Learn how and when to remove this template message) 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 https://en.wikipedia.org/wiki/HRESULT 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. HRESULTs are numerical error codes. Various http://resources.esri.com/help/9.3/arcgisengine/dotnet/a3bd05c8-64a6-4dd4-acb3-0d10b021f2f8.htm bits within an HRESULT encode information about the nature of the error code, and where it came from. HRESULT error codes are most commonly encountered in COM programming, where they form the basis for a standardized COM error handling convention. error codes Contents 1 HRESULT format 1.1 Format details 2 How HRESULTs work 3 Using HRESULTs 4 Examples 5 References 6 External links HRESULT format[edit] An HRESULT value has 32 bits divided into three fields: a severity code, a facility code, and an error code. The severity code indicates whether the return value represents information, warning, or error. The facility code identifies the area of the system responsible for the error. The error code is a unique number that is assigned to hresult error codes represent the exception. Each exception is mapped to a distinct HRESULT. HRESULTs are organized as follows:[1] Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Field S R C N X Facility Code Format details[edit] S - Severity - indicates success/fail 0 - Success 1 - Failure R - Reserved portion of the facility code, corresponds to NT's second severity bit. 1 - Severe Failure C - Customer. This bit specifies if the value is customer-defined or Microsoft-defined. 0 - Microsoft-defined 1 - Customer-defined N - Reserved portion of the facility code. Used to indicate a mapped NT status value. X - 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 - indicates the system service that is responsible for the error. Example facility codes are shown below (for the full list see [1]). 1 - RPC 2 - Dispatch (COM dispatch) 3 - Storage (OLE storage) 4 - ITF (COM/OLE Interface management) 7 - Win32 (raw Win32 error codes) 8 - Windows 9 - SSPI 10 - Control 11 - CERT (Client or server certificate) ... Code - is the facility's status code The ITF facility code has subsequently been recycled a
while developing and programming. This topic also shows what an HRESULT is and how to locate information on these error codes in the ArcGIS .NET software development kits (SDKs). Detailed instructions for the number conversions that are often necessary when working with HRESULTs is also provided. In this topic HRESULT error codes Locating HRESULTs ArcObjects HRESULT error codes Converting eight-digit hexadecimal value to 10-digit decimal value Converting 10-digit decimal value to three-digit enumeration value Converting error codes without the Error Lookup utility HRESULT error codes When programming with ArcObjects in .NET, you can make calls to Component Object Model (COM) components and therefore, receive errors from COM components. All COM methods return an unsigned integer (HRESULT). HRESULT is essentially a structure that shows whether the method succeeded or failed and contains additional detailed information about the outcome of the operation. HRESULT values are often used to return error information that is not specifically considered error codes. The .NET runtime handling of errors from COM components is similar to the way Visual Basic 6 handled COM errors. If a .NET program calls a function in a COM component, and returns an error condition as the HRESULT, the HRESULT is used to populate an instance of the COMException. This exception is thrown by the .NET runtime, where it can be handled by using a Try, Catch, Finally block. For more information on implementing Try, Catch, Finally blocks and the COMException, see How to implement error handling. Most HRESULT error constants for ArcObjects libraries are documented throughout the ArcGIS .NET SDK help system (see ArcObjects HRESULT error codes in this topic), which is available as part of your SDK installed help or in the Documentation Library on the ESRI Developer Network (EDN) Web site. HRESULTs that are not specific to ArcObjects can be found on the Microsoft Developer Network (MSDN) Web site. For a list of common MSDN HRESULT values, see Comm