windows-nt/Source/XPSP1/NT/sdktools/pdh/tests/pdhstress/pdhtest.h

51 lines
831 B
C
Raw Permalink Normal View History

2020-09-26 03:20:57 -05:00
#ifndef _PDHTEST_H_
#define _PDHTEST_H_
#include <pdh.h>
#include <stdio.h>
#include <stdarg.h>
#define MAX_COUNTERS 256
typedef struct PdhQueryStruct
{
HQUERY hQuery;
int iQueryCount;
PdhQueryStruct() : hQuery(NULL), iQueryCount(0) {};
} SPdhQuery;
class CPdhtest
{
public:
HRESULT Execute();
CPdhtest(WCHAR *wcsFileName, WCHAR *wcsMachineName);
~CPdhtest();
void GenerateCounterList(int nNumObject, WCHAR *szThisObject, SPdhQuery *pPdhQuery, HLOG *phLog);
static DWORD WINAPI CPdhtest::StartTest(LPVOID pHold);
int OpenLogFile(WCHAR *pwcsFileName);
private:
WCHAR *m_pwcsFileName;
WCHAR *m_pwcsMachineName;
};
typedef struct SErrorMessageTag
{
DWORD dwCode;
WCHAR * wcsDescr;
} SErrorMessage;
WCHAR * GetPdhErrMsg (DWORD dwCode);
void ThreadLog(DWORD errCode, WCHAR *strFmt, ...);
#endif