Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.

Use _NewEnum in Client.Query instead ItemIndex #14

Merged
merged 1 commit into from
Jul 27, 2016

Conversation

SokoloffA
Copy link
Contributor

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
Copy link

ahall commented Jul 14, 2016

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

@gbrayut
Copy link
Contributor

gbrayut commented Jul 26, 2016

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

@gbrayut gbrayut merged commit ece5bbb into StackExchange:master Jul 27, 2016
@gbrayut
Copy link
Contributor

gbrayut commented Jul 28, 2016

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

Fixed in 13dc733

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants