Skip to content

Commit

Permalink
Revert "Switch from CoInitialize to CoInitializeEx (#1973)"
Browse files Browse the repository at this point in the history
This reverts commit a898928.
  • Loading branch information
RebeccaMahany authored Jan 3, 2025
1 parent d326ee9 commit b4f713d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ee/watchdog/controller_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,9 @@ func installWatchdogTask(identifier, configFilePath string) error {
}

taskName := launcher.TaskName(identifier, watchdogTaskType)
// init COM - we discard the error returned by CoInitializeEx because it
// init COM - we discard the error returned by CoInitialize because it
// harmlessly returns S_FALSE if we call it more than once
ole.CoInitializeEx(0, ole.COINIT_MULTITHREADED)
ole.CoInitialize(0)
defer ole.CoUninitialize()

// create our scheduler object
Expand Down Expand Up @@ -530,9 +530,9 @@ func RemoveWatchdogTask(identifier string) error {
}

taskName := launcher.TaskName(identifier, watchdogTaskType)
// init COM - we discard the error returned by CoInitializeEx because it
// init COM - we discard the error returned by CoInitialize because it
// harmlessly returns S_FALSE if we call it more than once
ole.CoInitializeEx(0, ole.COINIT_MULTITHREADED)
ole.CoInitialize(0)
defer ole.CoUninitialize()

// create our scheduler object
Expand Down Expand Up @@ -581,9 +581,9 @@ func watchdogTaskExists(identifier string) (bool, error) {
}

taskName := launcher.TaskName(identifier, watchdogTaskType)
// init COM - we discard the error returned by CoInitializeEx because it
// init COM - we discard the error returned by CoInitialize because it
// harmlessly returns S_FALSE if we call it more than once
ole.CoInitializeEx(0, ole.COINIT_MULTITHREADED)
ole.CoInitialize(0)
defer ole.CoUninitialize()

// create our scheduler object
Expand Down

0 comments on commit b4f713d

Please sign in to comment.