Pdh counter querying problem on x64

S

szu

Hi,

I need to collect some performance data using PDH API. The problem is
that the following line:

PdhAddCounter (hQuery, _T("\\Processor(_Total)\\% Processor Time"), 0,
&CounterHandle);

compiled with x64 as a target machine and run on 64-bit Windows XP
always returns 0xC0000BB8 (The specified object is not found on the
system), however 32-bit version works well. Besides if I run 32-bit
perfomon.exe there is available a lot of performance counters
(including used in the above line). 64-bit version does not allow to
choose this counter and others like disk, memory etc. How to measure
the total processor time in 64-bit application?

Regards,
Tomek
 
R

Rock

Hi,

I need to collect some performance data using PDH API. The problem is
that the following line:

PdhAddCounter (hQuery, _T("\\Processor(_Total)\\% Processor Time"), 0,
&CounterHandle);

compiled with x64 as a target machine and run on 64-bit Windows XP
always returns 0xC0000BB8 (The specified object is not found on the
system), however 32-bit version works well. Besides if I run 32-bit
perfomon.exe there is available a lot of performance counters
(including used in the above line). 64-bit version does not allow to
choose this counter and others like disk, memory etc. How to measure
the total processor time in 64-bit application?

You should post to one of the x64 newsgroups such as:
microsoft.public.windows.64bit.general
 

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