Correct threading model used by wmi calls
WbemScripting is apartment threaded according to its registry entries
so switch multi-threaded OLE to apartment threaded enabling the global
lock to be removed.
Correct missing CoUninitialize call when CoInitializeEx returns S_FALSE
as documented here:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms695279(v=vs.85).aspx
Also:
* Cleanup OleError checking in Query.
* Handle nil return from CreateObject by returning ErrNilCreateObject
before it causes a panic. This has been seen in rare cases in production
when built under go v1.6.
1 file changed