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

Threaded View

  1. #21
    Join Date
    Sep 1999
    Location
    Germany, Hessen
    Posts
    226
    Sorry to tell you that (and I can't tell that this is fine), but:

    1) I tried your code sniplet and it didn't work for me
    2) I changed the names to the german translations and it worked ...

    PDH_STATUS pdhResult = 0;
    TCHAR szCounterPath[1024];
    DWORD dwPathSize = 1024;
    PDH_COUNTER_PATH_ELEMENTS pe;
    HQUERY hQuery;
    HQUERY hCounter;
    pdhResult = PdhOpenQuery( NULL, 0, &hQuery );
    pe.szMachineName = 0l;
    pe.szObjectName = "Prozessor";
    pe.szInstanceName = "_Total";
    pe.szParentInstance = NULL;
    pe.dwInstanceIndex = 0;
    pe.szCounterName = "Prozessorzeit (%)";
    pdhResult = PdhMakeCounterPath(&pe, szCounterPath, &dwPathSize, 0);
    pdhResult = PdhAddCounter(hQuery, szCounterPath, 0, &hCounter);


    So you have to try the russian equivalents (sorry, or is there a difference between russian and white-russian / belaruss ? Im not sure, I should know that living here not to far away from you, but I have to admit I don't) and I think you have to use unicode for that.
    Last edited by Marco F; April 12th, 2004 at 05:20 PM.

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