CoInitialize return code
-
Hello I have this program which uses a COM DLL. On one computer all works fine. On another machine, coinitialize keeps returning 3 and fails. Anybody seen this return code before? Thanks
alex 'Architecture is music frozen in space.'
Are you sure about the returned
HRESULT
? 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 = -2147024809E_OUTOFMEMORY
= 0x8007000E = -2147024882E_UNEXPECTED
= 0x8000FFFF = -2147418113S_OK
= 0x00000000 = 0S_FALSE
= 0x00000001 = 1RPC_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
-
Are you sure about the returned
HRESULT
? 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 = -2147024809E_OUTOFMEMORY
= 0x8007000E = -2147024882E_UNEXPECTED
= 0x8000FFFF = -2147418113S_OK
= 0x00000000 = 0S_FALSE
= 0x00000001 = 1RPC_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
I know that and I haven't been able to find this code either. 3 is supposed to be a success code (bit 0 == 0), but apparently it is not. I am using SUCCEEDED, but the program kept failing further down the line, so I ran it thru the debugger and this is the HRESULT CoInitialize() returns.
alex 'Architecture is music frozen in space.'