Freigeben über


Common COM HRESULTs...

It's so annoying to look for HRESULT codes... I remember some, but not all. So, why not to list them here? At least they will be easy to find.

Well, actually it's easy in VS too -- the codes are declared in WinError.h, it's just it is never opened and hard to open with one click. So, here they are (just S_*, E_* and CLASS_E_* -- class factories codes):

Name Hex Decimal
S_OK 00000000 0
S_FALSE 00000001 1
E_PENDING 8000000A 2147483658
E_NOTIMPL 80004001 2147500033
E_NOINTERFACE 80004002 2147500034
E_POINTER 80004003 2147500035
E_ABORT 80004004 2147500036
E_FAIL 80004005 2147500037
E_UNEXPECTED 8000FFFF 2147549183
CLASS_E_NOAGGREGATION 80040110 2147746064
CLASS_E_CLASSNOTAVAILABLE 80040111 2147746065
CLASS_E_NOTLICENSED 80040112 2147746066
E_ACCESSDENIED 80070005 2147942405
E_HANDLE 80070006 2147942406
E_OUTOFMEMORY 8007000E 2147942414
E_INVALIDARG 80070057 2147942487

Comments

  • Anonymous
    July 07, 2006
    Errlook.exe is only 2 keystrokes away in the default installation of VS 2005 (Alt-T, K)...
  • Anonymous
    July 21, 2006
    True. Unless you are on a test machine without VS and see it in the log...
  • Anonymous
    July 17, 2007
    Please provide how to create our own HRESULT, error code.