diff --git a/ee/watchdog/controller_windows.go b/ee/watchdog/controller_windows.go index f318ef393..3c04129c2 100644 --- a/ee/watchdog/controller_windows.go +++ b/ee/watchdog/controller_windows.go @@ -228,9 +228,9 @@ func installWatchdogTask(identifier, configFilePath string) error { } taskName := launcher.TaskName(identifier, watchdogTaskType) - // init COM - we discard the error returned by CoInitialize because it + // init COM - we discard the error returned by CoInitializeEx because it // harmlessly returns S_FALSE if we call it more than once - ole.CoInitialize(0) + ole.CoInitializeEx(0, ole.COINIT_MULTITHREADED) defer ole.CoUninitialize() // create our scheduler object @@ -504,9 +504,9 @@ func RemoveWatchdogTask(identifier string) error { } taskName := launcher.TaskName(identifier, watchdogTaskType) - // init COM - we discard the error returned by CoInitialize because it + // init COM - we discard the error returned by CoInitializeEx because it // harmlessly returns S_FALSE if we call it more than once - ole.CoInitialize(0) + ole.CoInitializeEx(0, ole.COINIT_MULTITHREADED) defer ole.CoUninitialize() // create our scheduler object @@ -555,9 +555,9 @@ func watchdogTaskExists(identifier string) (bool, error) { } taskName := launcher.TaskName(identifier, watchdogTaskType) - // init COM - we discard the error returned by CoInitialize because it + // init COM - we discard the error returned by CoInitializeEx because it // harmlessly returns S_FALSE if we call it more than once - ole.CoInitialize(0) + ole.CoInitializeEx(0, ole.COINIT_MULTITHREADED) defer ole.CoUninitialize() // create our scheduler object