I am using this example:
To get WMI Queries working. It works fine as part of a console app but when I move the code into a function and call it from DLLMain the ConnectServer function never returns.
I have tried running the function in another thread.
Seems this is an issue that others have run into: IWbemLocator ConnectServer call never returned
Are there any gotchas with using COM Server from DLLs?