home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / sdktools / winnt / perfmon / log.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-13  |  2.7 KB  |  112 lines

  1.  
  2. #define LOG_ENTRY_NOT_FOUND (-1)
  3.  
  4. #define szDefaultLogDirectory    TEXT("")
  5. #define szDefaultLogFileName     TEXT("perfmon.log")
  6.  
  7. #define iDefaultLogIntervalSecs  15
  8.  
  9.  
  10. #define IsDataIndex(pIndex)      \
  11.    (pIndex->uFlags & LogFileIndexData)
  12.  
  13.  
  14. #define IsBookmarkIndex(pIndex)  \
  15.    (pIndex->uFlags & LogFileIndexBookmark)
  16.  
  17. #define IsCounterNameIndex(pIndex)  \
  18.    (pIndex->uFlags & LogFileIndexCounterName)
  19.  
  20.  
  21. //==========================================================================//
  22. //                             Exported Functions                           //
  23. //==========================================================================//
  24.  
  25. #if 0
  26. PLOG LogData (HWND hWndLog) ;
  27. #endif
  28. #define LogData(hWndLog)      \
  29.    (&Log)
  30.  
  31. HWND CreateLogWindow (HWND hWndParent) ;
  32.  
  33. LRESULT APIENTRY LogWndProc (HWND hWnd,
  34.                                WORD wMsg,
  35.                                DWORD wParam,
  36.                                LONG lParam) ;
  37.  
  38. BOOL LogInitializeApplication  (void) ;
  39.  
  40.  
  41. void UpdateLogDisplay (HWND hWnd) ;
  42.  
  43.  
  44. BOOL StartLog (HWND hWnd, PLOG pLog, BOOL bSameFile) ;
  45.  
  46. BOOL CloseLog (HWND hWnd, PLOG pLog) ;
  47.  
  48.  
  49. BOOL LogAddEntry (HWND hWndLog, 
  50.                   LPTSTR lpszComputer,
  51.                   LPTSTR lpszObject,
  52.                   DWORD ObjectTitleIndex,
  53.                   BOOL  bGetObjectTitleIndex) ;
  54.  
  55.  
  56. void SetLogTimer (HWND hWnd,
  57.                   int iIntervalSecs) ;
  58.  
  59.  
  60.  
  61. BOOL LogRefresh (HWND hWnd) ;
  62. BOOL ToggleLogRefresh (HWND hWnd) ;
  63.  
  64.  
  65. void LogTimer (HWND hWnd, BOOL bForce) ;
  66.  
  67.  
  68. void ReLog (HWND hWndLog, BOOL bSameFile) ;
  69.  
  70.  
  71. BOOL OpenLog (HWND hWndLog,
  72.               HANDLE hFile,
  73.               DWORD dwMajorVersion,
  74.               DWORD dwMinorVersion,
  75.               BOOL bLogFile) ;
  76.  
  77.  
  78. BOOL LogCollecting (HWND hWndLog) ;
  79.  
  80.  
  81. int LogFileSize (HWND hWndLog) ;
  82.  
  83.  
  84.  
  85. BOOL LogWriteBookmark (HWND hWndLog,
  86.                        LPCTSTR lpszComment) ;
  87.  
  88.  
  89. DWORD LogFindEntry (LPTSTR lpszComputer, DWORD ObjectTitleIndex) ;
  90.  
  91. BOOL ResetLog  (HWND hWndLog) ;
  92. void ResetLogView  (HWND hWndLog) ;
  93. BOOL LogDeleteEntry  (HWND hWndLog) ;
  94. BOOL AnyLogLine (void) ;
  95.  
  96. BOOL SaveLog (HWND hWndLog, HANDLE hInputFile, BOOL bGetFileName) ;
  97.  
  98. void ExportLog (void) ;
  99.  
  100. int CreateLogFile (PLOG pLog, BOOL bCreateFile, BOOL bSameFile) ;
  101.  
  102. BOOL LogWriteCounterName (HWND hWnd,
  103.                           PPERFSYSTEM pSystem,
  104.                           PLOG   pLog,
  105.                           LPTSTR pCounterName,
  106.                           long sizeMatched,
  107.                           long sizeOfData,
  108.                           BOOL bBaseCounterName) ;
  109.  
  110. void LogWriteSystemCounterNames (HWND hWnd, PLOG pLog) ;
  111.  
  112.