roger's picture

A list of HRESULT codes

...because every time I search for a given HRESULT, all I get is yet another frigging VB website regurgitating the contents of WinError.h

ERROR_BAD_IMPERSONATION_LEVEL (1364 or 0x80070542)
Usually means that you've forgotten to call CoInitializeSecurity or CoSetProxyBlanket with the RPC_C_IMP_LEVEL_IMPERSONATE parameter.
Oddly, I've seen CoImpersonateClient succeed, but a later call to RegOpenKeyEx fail with this error. I'd have been expecting ERROR_ACCESS_DENIED myself.
E_NOINTERFACE (0x80004002)
When attempting to marshal an interface pointer, COM couldn't figure out how to create the proxy and stub. Check under HKEY_CLASSES_ROOT\Interface\{iid}\ProxyStubClsid32. The value given here is a CLSID, so you should chase that down as well.
TYPE_E_CANTLOADLIBRARY (0x80029C4A)
When attempting to use typelib-based marshalling, COM couldn't load the .TLB file. Check in HKEY_CLASSES_ROOT\Typelib\{typelib-id}\x.y\0\win32 to verify that the path to the .TLB file is correct. In particular, note that relative paths in this key are a bad idea.

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <b> <br> <code> <dd> <dl> <dt> <hr> <h1> <h2> <h3> <i> <img> <li> <ol> <p> <pre> <table> <td> <th> <tr> <tt> <u> <ul>
  • Images can be added to this post.

More information about formatting options