[Please advice]Failed to compile with CLSID_WbemLocator & IID_IWbemLocator

806 views
Skip to first unread message

ccc

unread,
Jun 6, 2003, 12:28:11 AM6/6/03
to
Hi,
[I searched around but I can't seem to find someone w/ the kind of
question I have, thus I am posting here for possible solutions, and I
think/hope it is a simple step that I am missing]

0) The following code failed to compile. I have installed the wmi sdk,
I don't know what is missing.

hr = CoCreateInstance(CLSID_WbemLocator, 0, CLSCTX_INPROC_SERVER,
IID_IWbemLocator, (LPVOID *) &pLocator);

It failed at CLSID_WbemLocator & IID_IWbemLocator = unknown
identifiers. This has been driving me nuts for more than a day, please
give me some pointers or steps.

1) Is WMI the ultimate solution to finding the driver date? If I can't
get the above to work, to access the date member, I need to find
another way, but I am clueless.

Thanks for any help.

ccc

Ivan Brugiolo [MSFT]

unread,
Jun 6, 2003, 2:57:02 AM6/6/03
to
#include <wbemcli.h>

add the library 'wbemuuid.lib' to the library you use to link your project

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


"ccc" <chia...@yahoo.com> wrote in message
news:baacaa54.03060...@posting.google.com...

ccc

unread,
Jun 6, 2003, 11:18:22 AM6/6/03
to
Thank you - that saved my day. I still would like to know if there is
another alternative way to extract driver file date from device
manager? The statement
fileVersion->dwFileDateLS
from
VS_FIXEDFILEINFO *fileVersion
always returns 0.

A different question from the above, is there a way to pop up a
pre-selected device property sheet from the device manager, i.e.
code-wise, to pop up the 'standard floppy controller' from the floppy
controllers under device manager w/o having to manually open device
manager?

Thank you very much.

ccc

dinhdo...@gmail.com

unread,
Jul 13, 2019, 12:01:51 AM7/13/19
to
Ddddddddddddddddddddđtdddddddddđ
Reply all
Reply to author
Forward
0 new messages