WindowsXP, Visual Studio 2005, VC++ and WMI Calls

J

jmonetti

Hello list,

I'm just starting with WMI and like ask you a paar questions.

I've developed a little application in VC++, which tries to retrieve
some CPU information through WMI calls. Here some code maybe
you have seen...

...
bstr_t cadenaSql = "Select * from
Win32_PerfRawData_PerfProc_Process where";
...
VariantInit(&vtProp2);
hr = pclsObj2->Get(L"PercentProcessorTime", 1, &vtProp2, 0, 0);
wcout << vtProp2.ulVal << endl ;
VariantClear(&vtProp2);
....

The problem I have is that when show vtProp2.ulVal receive the same
number (percent processor time) for each process retrieved.
(Even when I chage the value type).

Any suggestion ?


Thanks in advanced.


Julio
 
S

SSN

Select PercentProcessorTime from Win32_PerfRawData_PerfProc_Process
gives me the correct values..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top