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
tree: c720f1e1d0429f6ec1b147953cc15ac4dc8f6bfd
  1. LICENSE
  2. README.md
  3. wmi.go
  4. wmi_test.go
README.md

wmi

Package wmi provides a WQL interface for WMI on Windows.