diff --git a/com.d b/com.d index 3e59732..4066a9a 100644 --- a/com.d +++ b/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++; }