Msdn Hresult Error
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
Hresult Values
Documentation APIs and reference Dev centers Samples Retired content We’re sorry. hresult values win32 error codes The content you requested has been removed. You’ll be auto redirected in 1 second. Export (0) Print
Hresult C#
Expand All MSDN 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 decode hresult the table of content Expand the table of content This documentation is 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 hresult c++ the common usage details of the HRESULTs; individual protocol specifications provide expanded or modified definitions. Most values also 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 reques
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
Hresult 0x80131500
APIs and reference Dev centers Samples Retired content We’re sorry. The content hresult msdn you requested has been removed. You’ll be auto redirected in 1 second. Export (0) Print Expand All MSDN
What Is Hresult
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 https://msdn.microsoft.com/en-us/library/cc704587.aspx content 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 https://msdn.microsoft.com/en-us/library/cc231198.aspx NTSTATUS 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
Chen - MSFTNovember 3, 200632 Share 0 0 Everybody knows that you can use the HRESULT_FROM_WIN32 macro to convert a Win32 error code to an HRESULT, https://blogs.msdn.microsoft.com/oldnewthing/20061103-07/?p=29133 but how do you do the reverse? Let's look at the definition of HRESULT_FROM_WIN32: #define HRESULT_FROM_WIN32(x) \ ((HRESULT)(x) <= 0 ? ((HRESULT)(x)) \ : ((HRESULT) (((x) & 0x0000FFFF) | http://stackoverflow.com/questions/22493524/decode-hresult-2147467259 (FACILITY_WIN32 << 16) | 0x80000000))) If the value is less than or equal to zero, then the macro returns the value unchanged. Otherwise, it takes the lower sixteen bits hresult values and combines them with FACILITY_WIN32 and SEVERITY_ERROR. How do you reverse this process? How do you write the function WIN32_FROM_HRESULT? It's impossible to write that function since the mapping provided by the HRESULT_FROM_WIN32 function is not one-to-one. I leave as an execise to draw the set-to-set mapping diagram from DWORD to HRESULT. (Original diagram removed since people msdn hresult error hate VML so much, and I can't use SVG since it requies XHTML.) If you do it correctly, you'll have a single line which maps 0to S_OK, and a series of blocks that map blocks of 65536 error codes into the same HRESULT space. Notice that the values in the range 1 through 0x7FFFFFFFF are impossible results from the HRESULT_FROM_WIN32 macro. Furthermore, values in the range 0x80070000 through 0x8007FFFF could have come from quite a few original Win32 codes; you can't pick just one. But let's try to write the reverse function anyway: BOOL WIN32_FROM_HRESULT(HRESULT hr, OUT DWORD *pdwWin32) { if ((hr & 0xFFFF0000) == MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32)) { // Could have come from many values, but we choose this one *pdwWin32 = HRESULT_CODE(hr); return TRUE; } if (hr == S_OK) { *pdwWin32 = HRESULT_CODE(hr); return TRUE; } // otherwise, we got an impossible value return FALSE; } Of course, we could have been petulant and just written BOOL WIN32_FROM_HRESULT_alternate(HRESULT hr, OUT DWORD *pdwWin32) { if (hr < 0) { *pdwWin32
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Decode HResult = -2147467259 up vote 16 down vote favorite 7 Can someone help me decode this HResult? What does it mean? Thank you. I know the negative stands for a failure. How about the rest of the 10 bits? I referenced msdn HResult article here, but I am not sure how to determine what my facility and code bits are. Thanks. More info: _message: "External component has thrown an exception." Data: {System.Collections.ListDictionaryInternal} hresult share|improve this question edited Mar 18 '14 at 23:59 asked Mar 18 '14 at 23:53 CYC0616 1302414 I got this error when I attempted to post back some data which is more than usual. Can this be the source of error? Too much data? –CYC0616 Mar 19 '14 at 0:14 Maybe. Hard to say. Can you post a small, self-contained example that reproduces the problem? If so, post it here. Better yet, post a different question with that information. –Michael Petrotta Mar 19 '14 at 0:17 Thank you all for answering my question. I dug in further i found out the error was due to exceeding the maximium number of aspnet:MaxHttpCollectionKeys. Increasing this number will fix the error. –CYC0616 Mar 19 '14 at 0:50 For future use, I wrote an HRESULT decoder that explains how to decode this value (and any others). –Stephen Cleary Jun 20 at 9:10 add a comment| 4 Answers 4 active oldest votes up vote 41 down vote accepted I'll show you how to do it. Paste the negative number into Calcula