mirror of https://github.com/adamdruppe/arsd.git
com.d: Add option for multithreaded COM
This commit is contained in:
parent
601a231a02
commit
89c4efa135
5
com.d
5
com.d
|
@ -196,11 +196,12 @@ shared static ~this() {
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
void initializeClassicCom() {
|
void initializeClassicCom(bool multiThreaded = false) {
|
||||||
if(coInitializeCalled)
|
if(coInitializeCalled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ComCheck(CoInitialize(null), "COM initialization failed");
|
ComCheck(CoInitializeEx(null, multiThreaded ? COINIT_MULTITHREADED : COINIT_APARTMENTTHREADED),
|
||||||
|
"COM initialization failed");
|
||||||
|
|
||||||
coInitializeCalled++;
|
coInitializeCalled++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue