WMI failed to initialize the IWbemLocator using CoCreateInstance(CLSID_WbemLocator, 0, CLSCTX_INPROC
Posted
by Rahul
on Stack Overflow
See other posts from Stack Overflow
or by Rahul
Published on 2010-04-23T09:43:29Z
Indexed on
2010/04/23
12:23 UTC
Read the original article
Hit count: 556
Hi All,
I am using WMI to get SMBIOS data and for that I am using following code to initialize the IWbemLocator interface through a call to CoCreateInstance.
CoCreateInstance(CLSID_WbemLocator, 0, CLSCTX_INPROC_SERVER, IID_IWebLocator, (LPVOID *) &pLoc);
But it always returns FAILURE. I think its due to some environment issue but wanted to know exact reason.
Thanks in advance,
Rahul
© Stack Overflow or respective owner