Prev: Assign anew font to a console window...
Next: Differences between a protoinfo struct from getsockopt and WSADuplicateSocket
From: thibarg.web on 27 Jan 2008 08:28 Hi all, To get and display misc infos, I use the "performance counter" (pdh...) routines. For most infos, it's ok on both XP and Vista. But under XP, I can't get the "private wrking set": // __________________________<Code> DH_HQUERY appMemQueryCounter= NULL; PDH_HCOUNTER appMemCounter = NULL; PDH_STATUS pdhStatus; char counterPath [1024]; // Code using PdhLookupPerfNameByIndex to get the appropriate labels. // At the end, counterPath contains: // \Processus(MonAppli)\Plage de travail - Privée" // (yes, in french ;->) pdhStatus = PdhOpenQueryH(NULL, NULL, &appMemQueryCounter); if(pdhStatus == ERROR_SUCCESS && appMemQueryCounter != NULL) { dhStatus = PdhAddCounter(appMemQueryCounter, counterPath, NULL, &appMemCounter ); } / __________________________</Code> But PdhAddCounter returns 0xC0000BB9, which means"(PDH_CSTATUS_NO_COUNTER) The specified counter could not be found". Under Vista, I get the private working set (you need to be admin or to be in the group that can get performances counters). Under XP, I have admin. rights, but get this error. I looks like this countert does not exist on XP, but when I use the microsoft application to get those infos, I can see they display it. Any idea on how to get this info under XP? Thibaud
From: gerhard on 27 Jan 2008 10:21
thibarg.web wrote: > I looks like this countert does not exist on XP, but when I use the > microsoft application to get those infos, I can see they display it. Which "microsoft application" ? |