StackExchange / wmi

WMI for Go
http://godoc.org/github.com/StackExchange/wmi
MIT License
434 stars 173 forks source link

Use _NewEnum in Client.Query instead ItemIndex #14

Closed SokoloffA closed 8 years ago

SokoloffA commented 8 years ago

Use _NewEnum because SWbemObjectSet does not have ItemIndex on some systems (Win2003, WinXP). Closes issues #2, #10 and #12

Tested on WinXP Win2003 R2 server and Win2008 R2 server. go test passed successfully.

ahall commented 8 years ago

Very good fix, hope this gets pushed as soon as possible.

gbrayut commented 8 years ago

I staged these at https://github.com/StackExchange/wmi/tree/next and will do some testing before merging to master

gbrayut commented 8 years ago

Looks like this was missing a Release() call for the IEnumVARIANT, which caused a small memory leak.

Fixed in https://github.com/StackExchange/wmi/commit/13dc73378289294629b5c6def49e5724ed4f847f