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