hres=CoInitializeEx (0, COINIT_APARTMENTTHREADED COINIT_MULTITHREADED/* */);
If (FAILED (hres))
{
return 1;
}
Initialization fails, the return value is - 2147417850, who came to the rescue with ah,,,

CodePudding user response:
Up,,,,,,,,,,,,,,,,,,CodePudding user response:
hres=CoInitializeEx (0, COINIT_MULTITHREADED);
If (FAILED (hres))
{
return 1;
}
Is the same as a result, to solve
CodePudding user response:
- 2147417850 x80010106 is 0, the value of explanation://MessageId: RPC_E_CHANGED_MODE
//
//MessageText:
//
//always change thread mode after it is set.
//
# define RPC_E_CHANGED_MODE _HRESULT_TYPEDEF_ (0 x80010106l)
CodePudding user response: