|Are you sure about the returned
According to the CoInitialize Function (COM)[^], the possible results could be the ones below (see A lot of HRESULT codes...[^] for their numeric values):
E_INVALIDARG = 0x80070057 = -2147024809
E_OUTOFMEMORY = 0x8007000E = -2147024882
E_UNEXPECTED = 0x8000FFFF = -2147418113
S_OK = 0x00000000 = 0
S_FALSE = 0x00000001 = 1
RPC_E_CHANGED_MODE = 0x80010106 = -2147417850
Then it seems that 3 is not a possible result; not only, I was not able to find a description for it anyway, according to Interpreting HRESULT Values[^], such a value doesn't indicates a failure (because the most significant bit is not set).
In your application are you testing for specific values or are you using the
SUCCEEDED() macro? When using COM is preferable to always use that macro to distinguish between success and failure...
modified on Friday, October 15, 2010 5:52 AM