Skip to content

Commit

Permalink
Yet another go at the documented behaviour: coInitializeEx raises
Browse files Browse the repository at this point in the history
all exceptions, CoInitialize masks RPC_E_CHANGED_MODE.
  • Loading branch information
mhammond committed Mar 14, 2006
1 parent 2bce53b commit ddcdb36
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion com/win32com/src/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ HRESULT PyCom_CoInitializeEx(LPVOID reserved, DWORD dwInit)
HRESULT hr = CoInitializeEx(reserved, dwInit);
#endif // MS_WINCE

if ( (hr != RPC_E_CHANGED_MODE) && FAILED(hr) )
// Unlike PyCom_CoInitialize, we return _all_ errors including
// RPC_E_CHANGED_MODE
if ( FAILED(hr) )
{
PyCom_LoggerException(NULL, "OLE initialization failed! (0x%08lx)", hr);
return hr;
Expand Down

0 comments on commit ddcdb36

Please sign in to comment.