42

Can someone help me decode this HResult? What does it mean? 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.

More info:

_message: "External component has thrown an exception."
Data: {System.Collections.ListDictionaryInternal}

Micha Wiedenmann
  • 19,979
  • 21
  • 92
  • 137
CYC0616
  • 645
  • 3
  • 9
  • 14
  • 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 00:14
  • Maybe. Hard to say. Can you post a [small, self-contained example that reproduces the problem](http://stackoverflow.com/help/mcve)? If so, post it here. Better yet, post a different question with that information. – Michael Petrotta Mar 19 '14 at 00: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 00:50
  • 4
    For future use, I wrote an [HRESULT decoder](https://errorcodelookup.com/?q=-2147467259) that explains [how to decode this value](https://errorcodelookup.com/?type=hresult&code=80004005) (and any others). – Stephen Cleary Jun 20 '16 at 09:10

4 Answers4

85

I'll show you how to do it. Paste the negative number into Calculator (Windows) in programmer mode "Dec" setting. Then convert to "Hex" setting. You get the number: FFFFFFFF80004005. The error is 80004005 which is:

0x80004005
E_FAIL
Unspecified 

Unfortunately the provider of the function that gave you this error did not categorize the error.

Useful links:

  1. MSDN - HRESULT Format
  2. MSDN - HRESULT Error List
Chris
  • 2,655
  • 2
  • 18
  • 22
  • 1
    +1. A couple of notes for readers: (1) Make sure to include the minus sign, easiest way is to subtract the number from 0 and press `=` (2) If you have DWORD selected, it will strip out the redundant `FFFFFFFF` part for you. – Ohad Schneider Nov 21 '16 at 16:53
  • 1
    Also, an even easier option for whoever missed Stephen Cleary's comment on the the question: https://errorcodelookup.com/?type=hresult&code=80004005 – Ohad Schneider Nov 21 '16 at 17:41
  • Very nice answer! :-) – GTAVLover Jul 20 '17 at 02:44
4

Print it as an hexadecimal number, then, use for instance, VisualStudio ErrorLookup, to get the message.

BenjaminB
  • 1,809
  • 3
  • 18
  • 32
4

Another way to do it is as follows. An HRESULT should contain a System Error Code in its first 32 bits. Using an AND operation will retrieve the error code from the HRESULT:

int result = (-2147467259 & 0xFFFF)

result is 16389, which is not a part of the System Error Codes list, and as a result, is unspecified.

Alexandru
  • 12,264
  • 17
  • 113
  • 208
3

-2147467259 in decimal is 80004005 in hexadecimal (usually rendered as 0x80004005). That's "E_FAIL (Unspecified error)" in Win32.

Not a very helpful error code, but maybe it'll get you a half-step closer to a solution.

Michael Petrotta
  • 59,888
  • 27
  • 145
  • 179