Solved

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

Posted on 2008-11-02
5
2,143 Views
Last Modified: 2013-12-14
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
Comment
Question by:yossikally
5 Comments
 
LVL 5

Expert Comment

by:svelarsen
ID: 22861158
Check out this example - it is using inline asm tho, but maybe you can use that.

http://www.daniweb.com/forums/thread112968.html
0
 

Author Comment

by:yossikally
ID: 22861201
No. Thanks.

I am interested in the actual 16 char. code embedded in the CPU, not if it's Genuine Intel
0
 
LVL 41

Accepted Solution

by:
graye earned 250 total points
ID: 22861377
There's a pretty good C++ example on the MSDN site
http://msdn.microsoft.com/en-us/library/aa390423(VS.85).aspx 
0
 
LVL 19

Expert Comment

by:LordOfPorts
ID: 22863000
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
 

Author Closing Comment

by:yossikally
ID: 31512466
Thanks.  I guess it's as good as it gets.
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question