windows_exporter icon indicating copy to clipboard operation
windows_exporter copied to clipboard

Issue with scheduled_task

Open mattdurham opened this issue 11 months ago • 1 comments

The scheduled_task returns CO_E_NOTINITIALIZED when I try to use it. I think it is getting initialized in build but then uninited. if I remove this line https://github.com/prometheus-community/windows_exporter/blob/master/pkg/collector/scheduled_task/scheduled_task.go#L130 it works as expected.

mattdurham avatar Mar 04 '24 14:03 mattdurham

CoUninitialize should be called on application shutdown, as the last call made to the COM library after the application hides its main windows and falls through its main message loop.

https://learn.microsoft.com/en-us/windows/win32/api/combaseapi/nf-combaseapi-couninitialize

mattdurham avatar Mar 04 '24 14:03 mattdurham