16#include <combaseapi.h>
30inline HRESULT safeCoInitializeEx(DWORD dwCoInit,
int& nbReinit)
33 while ((hr = CoInitializeEx(
nullptr, dwCoInit)) == RPC_E_CHANGED_MODE)
49inline void safeCoUninitializeReinit(DWORD dwCoInit,
int nbReinit)
53 for (
int i = 0;
i < nbReinit; ++
i)
54 CoInitializeEx(
nullptr, dwCoInit);