Thread: Hresult

  1. #1

    Unhappy Hresult


  2. #2
    Registered User sean345's Avatar
    Join Date
    Mar 2002
    According to the Win32 Reference
    HRESULT is a data type that is a 32-bit error or warning value.

    typedef LONG HRESULT;


    An HRESULT data type is made up of a 1-bit severity flag, an 11-bit handle, a 4-bit facility code indicating status code (SCODE) group, and a 16-bit SCODE information code. A value of zero for the severity flag indicates the success of the operation for which the HRESULT was returned.
    An HRESULT type returned as an error value for a function can provide the application that called the function information on the error and how to recover from it. To obtain this information, the application uses the handle of the HRESULT. The HRESULT and SCODE types are not equivalent. OLE includes functions and macros to convert between error values of these two types. To create an HRESULT value from an SCODE value, use ResultFromScode(SCODE). To convert an HRESULT form to SCODE value, use GetScode(HRESULT). For details about ResultFromScode and GetScode and for faster ways of making the conversions just mentioned, see the OLE Programmerís Reference. For a description of the OLE implementation of HRESULT, see Inside OLE, Second Edition, by Kraig Brockschmidt.
    - Sean
    If cities were built like software is built, the first woodpecker to come along would level civilization.
    Black Frog Studios

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. E_OUTOFMEMORY hResult with DirectX 10
    By DarkMasterBosel in forum Game Programming
    Replies: 3
    Last Post: 01-04-2009, 01:43 PM
  2. Animated GIF Encoding Library
    By Tonto in forum C++ Programming
    Replies: 3
    Last Post: 01-08-2008, 01:57 PM
    By George2 in forum C Programming
    Replies: 2
    Last Post: 07-27-2007, 02:17 AM
  4. errors initializing D3D
    By Vacation Guy in forum C++ Programming
    Replies: 3
    Last Post: 08-07-2005, 12:20 PM
  5. My DirectInput solution
    By VirtualAce in forum Game Programming
    Replies: 3
    Last Post: 04-21-2004, 08:06 PM