• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2281
  • Last Modified:

Can someone give an example of using WMI with "Win32_Processor", "ProcessorID" in Win32 env.?

The Net is full of examples for Dot Net env. but not plain Win32 (or MFC).
I have to get hold og the CPU ID working on a Win32 MFC DLL
0
yossikally
Asked:
yossikally
1 Solution
 
svelarsenCommented:
Check out this example - it is using inline asm tho, but maybe you can use that.

http://www.daniweb.com/forums/thread112968.html
0
 
yossikallyAuthor Commented:
No. Thanks.

I am interested in the actual 16 char. code embedded in the CPU, not if it's Genuine Intel
0
 
grayeCommented:
There's a pretty good C++ example on the MSDN site
http://msdn.microsoft.com/en-us/library/aa390423(VS.85).aspx 
0
 
LordOfPortsCommented:
The MSDN example at http://msdn.microsoft.com/en-us/library/aa390423(VS.85).aspx works well, simply replace the query in the example with:

"SELECT ProcessorId FROM Win32_Processor"

...and update the output value in the example:

hr = pclsObj->Get(L"ProcessorId", 0, &vtProp, 0, 0);

0
 
yossikallyAuthor Commented:
Thanks.  I guess it's as good as it gets.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now