CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Threaded View

  1. #1
    Join Date
    May 1999
    Location
    ALABAMA, USA
    Posts
    9,917

    WMI Performace counters.

    I think this is my first question on this forum (ever).

    It is about using WMI classes to collect performance counters formatted data using C++ (NOT .NET).

    After calling GetObjects I am retrieving pointer (pp) to an IWbemObjectAccess objects. So far do good.

    Now I can call GetPropertyHandle to retrieve the handle and the handle type. I hit a brick wall here. All samples I found (actually one copied all over different sited) shows how to get VirtualBytes for Win32_PerfRawData_PerfProc_Process class.

    I cannot figure out how for example retrieve Name property and corresponding value. Using IWbemObjectAccess to get properties seems a little awkward.
    Is it possible to get IWbemClassObject type object knowing IWbemObjectAccess? Having IWbemClassObject pointer it would be much easier (I think) to retrieve all properties I need (almost all). How in the name of C++ can I do it the easiest way?

    Could somebody push me in the right direction?
    Last edited by JohnCz; October 9th, 2011 at 06:22 PM. Reason: Typo
    There are only 10 types of people in the world:
    Those who understand binary and those who do not.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured