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

Posted on 2008-11-02
Medium Priority
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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

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 1000 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 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);


Author Closing Comment

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

Featured Post

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

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

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

777 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