mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[ATL] Take _ATL_FREE_THREADED into account
When it is not defined, COM should not be initialize multithreaded
This commit is contained in:
parent
f4b7087a0e
commit
507aae4c30
1 changed files with 6 additions and 1 deletions
|
@ -849,7 +849,12 @@ public:
|
|||
|
||||
static HRESULT InitializeCom()
|
||||
{
|
||||
return ::CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
#if defined(_ATL_FREE_THREADED)
|
||||
constexpr COINIT coInit = COINIT_MULTITHREADED;
|
||||
#else
|
||||
constexpr COINIT coInit = COINIT_APARTMENTTHREADED;
|
||||
#endif
|
||||
return ::CoInitializeEx(NULL, coInit);
|
||||
}
|
||||
|
||||
static void UninitializeCom()
|
||||
|
|
Loading…
Reference in a new issue