SOL9 Sample: PerformanceCounterInfo
|
1 Screenshot
2 Source code
/*
* PerformanceCounterInfo.cpp
* Copyright (c) 2015 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED.
*/
// SOL9
// 2009/09/25
#include <sol/pdh/PerformanceQuery.h>
#include <sol/pdh/PerformanceCounter.h>
#include <sol/pdh/PerformanceCounterInfo.h>
#include <sol/Locale.h>
void _tmain(int argc, TCHAR** argv)
{
Locale locale;
try {
PerformanceQuery query;
PerformanceCounter counter;
const TCHAR* path = _T("\\WFP\\Provider Count");
//const TCHAR* path = _T("\\Process(notepad#0)\\% Processor Time");
query.addCounter(path, counter);
PerformanceCounterInfo counterInfo((HCOUNTER)counter);
counterInfo.display();
} catch (int error) {
printf("Exception %d\n", error);
}
}
Last modified: 2 May 2016
Copyright (c) 2016 Antillia.com ALL RIGHTS RESERVED.