StackExchange / wmi

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

Detect if a DLL is constructed for graphic application. #51

Closed obito02 closed 3 years ago

obito02 commented 4 years ago

I had some problems creating a DLL, because I used it in a Graphical application and it generated errors because of the call to the Coinitialize function. where the call should be omitted so that the error did not appear.

I rely on this question from stackoverflow.com https://stackoverflow.com/questions/2453973/using-dll-that-using-com-in-c-sharp

the changes affect wmi.go

I have attached the modified code where you can optionally put it if the app is GUI. wmi.txt