This commit is contained in:
Kimmo Pekkola
2009-02-10 18:37:48 +00:00
parent 1bb6b13b85
commit 30edc895f2
136 changed files with 31616 additions and 0 deletions

View File

@ -0,0 +1,43 @@
#ifndef __Perfsnap_h__
#define __Perfsnap_h__
#ifndef _WINPERF_
#include <winperf.h>
#endif
class CPerfTitleDatabase;
class CPerfSnapshot
{
private:
static PBYTE c_pBuffer;
static DWORD c_cbBufferSize;
PPERF_DATA_BLOCK m_pPerfDataHeader; // Points to snapshot data
CPerfTitleDatabase * m_pCounterTitles; // The title conversion object
// Private function to convert the ASCII strings passedto TakeSnapshot()
// into a suitable form for the RegQueryValue call
BOOL ConvertSnapshotItemName( PCTSTR pszIn, PTSTR pszOut, DWORD nSize );
public:
CPerfSnapshot( CPerfTitleDatabase * pCounterTitles );
~CPerfSnapshot( void );
BOOL TakeSnapshot( PCTSTR pszSnapshotItems );
void DisposeSnapshot( void );
DWORD GetNumObjectTypes( void ); // # of objects the snapshot includes
BOOL GetSystemName( PTSTR pszSystemName, DWORD nSize );
PVOID GetPostHeaderPointer( void ); // Pointer to data following header
static void CleanUp( void );
};
#endif