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

Posted on 2008-11-02
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
Question by:yossikally

Expert Comment

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

Author Comment

ID: 22861201
No. Thanks.

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

Accepted Solution

graye earned 250 total points
ID: 22861377
There's a pretty good C++ example on the MSDN site 
LVL 19

Expert Comment

ID: 22863000
The MSDN example at 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);


Author Closing Comment

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SignTool Error with Windows 10 5 119
How and where to get Business Intelligence Development Studio? 2 77
Problem to file 3 67
"Black Box" Testing of Control System Software 2 22
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

911 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now