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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
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.…

746 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

10 Experts available now in Live!

Get 1:1 Help Now