Error Codes

Common error codes, causes and solutions.

Error Id Error Text HRESULT (hex) HRESULT (dec) Description Solutions More Info
E_FAIL Unspecified error 0×80004005 -2147467259      
REGDB_E_CLASSNOTREG Class not registered 0×80040154   Class not registered The COM library is not registered. Find what DLL defines the class ID in the rest of the error message, and register it.  
    800700c1     Mixing 32/64 problem? Compile to x86 instead of All Platforms for .NET assembly  
E_OUTOFMEMORY   8007000e        
TYPE_E_CANTLOADLIBRARY   80029c4a   The type library or DLL could not be loaded Type library not found, or maybe missing dependency loaded using LoadLibrary?  
    800a005e   Invalid use of Null Probably coming from a VB6 COM DLL, where a Null value is being used improperly (i.e., something is Null that shouldn’t be)  
    80070005     Permissions problem when registering DLL? Make sure you are in an elevated command prompt when trying to register (Administrator in the command window)  
TYPE_E_REGISTRYACCESS   8002801c   Error accessing the OLE registry    
    900a005e     A VB6 result error code (more info needed)  

When searching for the decimal code, be aware most search engines will exclude that term from search results because of the negative sign. Instead, surround the term with speech marks to prevent that: "-2147467259"
Try various searches for the hex code, decimal code and constant to find various results
Sometimes the error code will be from another platform or framework, for example, 900a005e is from VB6.

Example

REGDB_E_CLASSNOTREG

The error code will look like this in .NET: 0×80040154 (word) or 0xFFFFFFFF80040154 (dword), or a decimal value of 2147746132 (1 word) or –2147221164 (dword)

Here’s how it looks defined in winerror.h:

#define REGDB_E_CLASSNOTREG _HRESULT_TYPEDEF_(0x80040154L)

References

Online version of winerror.h @ msdn.microsoft.com – Contains a bunch of error codes, from which you can get the constant name, and possibly some more information

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>