home *** CD-ROM | disk | FTP | other *** search
/ PC World 2001 March / PCWorld_2001-03_cd.bin / Software / TemaCD / devc / _SETUP.5 / Group3 / winperf.h < prev    next >
C/C++ Source or Header  |  1999-11-07  |  7KB  |  136 lines

  1. #ifndef _WINPERF_H
  2. #define _WINPERF_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #define PERF_DATA_VERSION 1
  7. #define PERF_DATA_REVISION 1
  8. #define PERF_NO_INSTANCES -1 
  9. #define PERF_SIZE_DWORD 0
  10. #define PERF_SIZE_LARGE 256
  11. #define PERF_SIZE_ZERO 512
  12. #define PERF_SIZE_VARIABLE_LEN 768
  13. #define PERF_TYPE_NUMBER 0
  14. #define PERF_TYPE_COUNTER 1024
  15. #define PERF_TYPE_TEXT 2048
  16. #define PERF_TYPE_ZERO 0xC00
  17. #define PERF_NUMBER_HEX 0
  18. #define PERF_NUMBER_DECIMAL 0x10000
  19. #define PERF_NUMBER_DEC_1000 0x20000
  20. #define PERF_COUNTER_VALUE 0
  21. #define PERF_COUNTER_RATE 0x10000
  22. #define PERF_COUNTER_FRACTION 0x20000
  23. #define PERF_COUNTER_BASE 0x30000
  24. #define PERF_COUNTER_ELAPSED 0x40000
  25. #define PERF_COUNTER_QUEUELEN 0x50000
  26. #define PERF_COUNTER_HISTOGRAM 0x60000
  27. #define PERF_TEXT_UNICODE 0
  28. #define PERF_TEXT_ASCII 0x10000
  29. #define PERF_TIMER_TICK 0
  30. #define PERF_TIMER_100NS 0x100000
  31. #define PERF_OBJECT_TIMER 0x200000
  32. #define PERF_DELTA_COUNTER 0x400000
  33. #define PERF_DELTA_BASE 0x800000
  34. #define PERF_INVERSE_COUNTER 0x1000000
  35. #define PERF_MULTI_COUNTER 0x2000000
  36. #define PERF_DISPLAY_NO_SUFFIX 0
  37. #define PERF_DISPLAY_PER_SEC 0x10000000
  38. #define PERF_DISPLAY_PERCENT 0x20000000
  39. #define PERF_DISPLAY_SECONDS 0x30000000
  40. #define PERF_DISPLAY_NOSHOW 0x40000000
  41. #define PERF_COUNTER_HISTOGRAM_TYPE 0x80000000
  42. #define PERF_NO_UNIQUE_ID (-1)
  43. #define PERF_DETAIL_NOVICE 100
  44. #define PERF_DETAIL_ADVANCED 200
  45. #define PERF_DETAIL_EXPERT 300
  46. #define PERF_DETAIL_WIZARD 400
  47. #define PERF_COUNTER_COUNTER (PERF_SIZE_DWORD|PERF_TYPE_COUNTER|PERF_COUNTER_RATE|PERF_TIMER_TICK|PERF_DELTA_COUNTER|PERF_DISPLAY_PER_SEC)
  48. #define PERF_COUNTER_TIMER (PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_RATE|PERF_TIMER_TICK|PERF_DELTA_COUNTER|PERF_DISPLAY_PERCENT)
  49. #define PERF_COUNTER_QUEUELEN_TYPE (PERF_SIZE_DWORD|PERF_TYPE_COUNTER|PERF_COUNTER_QUEUELEN|PERF_TIMER_TICK|PERF_DELTA_COUNTER|PERF_DISPLAY_NO_SUFFIX)
  50. #define PERF_COUNTER_BULK_COUNT (PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_RATE|PERF_TIMER_TICK|PERF_DELTA_COUNTER|PERF_DISPLAY_PER_SEC)
  51. #define PERF_COUNTER_TEXT (PERF_SIZE_VARIABLE_LEN|PERF_TYPE_TEXT|PERF_TEXT_UNICODE|PERF_DISPLAY_NO_SUFFIX)
  52. #define PERF_COUNTER_RAWCOUNT (PERF_SIZE_DWORD|PERF_TYPE_NUMBER|PERF_NUMBER_DECIMAL|PERF_DISPLAY_NO_SUFFIX)
  53. #define PERF_COUNTER_LARGE_RAWCOUNT (PERF_SIZE_LARGE|PERF_TYPE_NUMBER|PERF_NUMBER_DECIMAL|PERF_DISPLAY_NO_SUFFIX)
  54. #define PERF_COUNTER_RAWCOUNT_HEX (PERF_SIZE_DWORD|PERF_TYPE_NUMBER|PERF_NUMBER_HEX|PERF_DISPLAY_NO_SUFFIX)
  55. #define PERF_COUNTER_LARGE_RAWCOUNT_HEX (PERF_SIZE_LARGE|PERF_TYPE_NUMBER|PERF_NUMBER_HEX|PERF_DISPLAY_NO_SUFFIX)
  56. #define PERF_SAMPLE_FRACTION (PERF_SIZE_DWORD|PERF_TYPE_COUNTER|PERF_COUNTER_FRACTION|PERF_DELTA_COUNTER|PERF_DELTA_BASE|PERF_DISPLAY_PERCENT)
  57. #define PERF_SAMPLE_COUNTER (PERF_SIZE_DWORD|PERF_TYPE_COUNTER|PERF_COUNTER_RATE|PERF_TIMER_TICK|PERF_DELTA_COUNTER|PERF_DISPLAY_NO_SUFFIX)
  58. #define PERF_COUNTER_NODATA (PERF_SIZE_ZERO|PERF_DISPLAY_NOSHOW)
  59. #define PERF_COUNTER_TIMER_INV (PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_RATE|PERF_TIMER_TICK|PERF_DELTA_COUNTER|PERF_INVERSE_COUNTER|PERF_DISPLAY_PERCENT)
  60. #define PERF_SAMPLE_BASE (PERF_SIZE_DWORD|PERF_TYPE_COUNTER|PERF_COUNTER_BASE|PERF_DISPLAY_NOSHOW|1) 
  61. #define PERF_AVERAGE_TIMER (PERF_SIZE_DWORD|PERF_TYPE_COUNTER|PERF_COUNTER_FRACTION|PERF_DISPLAY_SECONDS)
  62. #define PERF_AVERAGE_BASE (PERF_SIZE_DWORD|PERF_TYPE_COUNTER|PERF_COUNTER_BASE|PERF_DISPLAY_NOSHOW|2) 
  63. #define PERF_AVERAGE_BULK (PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_FRACTION|PERF_DISPLAY_NOSHOW)
  64. #define PERF_100NSEC_TIMER (PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_RATE|PERF_TIMER_100NS|PERF_DELTA_COUNTER|PERF_DISPLAY_PERCENT)
  65. #define PERF_100NSEC_TIMER_INV (PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_RATE|PERF_TIMER_100NS|PERF_DELTA_COUNTER|PERF_INVERSE_COUNTER|PERF_DISPLAY_PERCENT)
  66. #define PERF_COUNTER_MULTI_TIMER (PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_RATE|PERF_DELTA_COUNTER|PERF_TIMER_TICK|PERF_MULTI_COUNTER|PERF_DISPLAY_PERCENT)
  67. #define PERF_COUNTER_MULTI_TIMER_INV (PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_RATE|PERF_DELTA_COUNTER|PERF_MULTI_COUNTER|PERF_TIMER_TICK|PERF_INVERSE_COUNTER|PERF_DISPLAY_PERCENT)
  68. #define PERF_COUNTER_MULTI_BASE (PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_BASE|PERF_MULTI_COUNTER|PERF_DISPLAY_NOSHOW)
  69. #define PERF_100NSEC_MULTI_TIMER (PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_DELTA_COUNTER|PERF_COUNTER_RATE|PERF_TIMER_100NS|PERF_MULTI_COUNTER|PERF_DISPLAY_PERCENT)
  70. #define PERF_100NSEC_MULTI_TIMER_INV (PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_DELTA_COUNTER|PERF_COUNTER_RATE|PERF_TIMER_100NS|PERF_MULTI_COUNTER|PERF_INVERSE_COUNTER|PERF_DISPLAY_PERCENT)
  71. #define PERF_RAW_FRACTION (PERF_SIZE_DWORD|PERF_TYPE_COUNTER|PERF_COUNTER_FRACTION|PERF_DISPLAY_PERCENT)
  72. #define PERF_RAW_BASE (PERF_SIZE_DWORD|PERF_TYPE_COUNTER|PERF_COUNTER_BASE|PERF_DISPLAY_NOSHOW|3)
  73. #define PERF_ELAPSED_TIME (PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_ELAPSED|PERF_OBJECT_TIMER|PERF_DISPLAY_SECONDS)
  74. typedef struct _PERF_DATA_BLOCK {
  75.     WCHAR Signature[4];
  76.     DWORD LittleEndian;
  77.     DWORD Version;
  78.     DWORD Revision;
  79.     DWORD TotalByteLength;
  80.     DWORD HeaderLength;
  81.     DWORD NumObjectTypes;
  82.     LONG DefaultObject;
  83.     SYSTEMTIME SystemTime;
  84.     LARGE_INTEGER PerfTime;
  85.     LARGE_INTEGER PerfFreq;
  86.     LARGE_INTEGER PerfTime100nSec;
  87.     DWORD SystemNameLength;
  88.     DWORD SystemNameOffset;
  89. } PERF_DATA_BLOCK, *PPERF_DATA_BLOCK;
  90. typedef struct _PERF_OBJECT_TYPE {
  91.     DWORD TotalByteLength;
  92.     DWORD DefinitionLength;
  93.     DWORD HeaderLength;
  94.     DWORD ObjectNameTitleIndex;
  95.     LPWSTR ObjectNameTitle;
  96.     DWORD ObjectHelpTitleIndex;
  97.     LPWSTR ObjectHelpTitle;
  98.     DWORD DetailLevel;
  99.     DWORD NumCounters;
  100.     LONG DefaultCounter;
  101.     LONG NumInstances;
  102.     DWORD CodePage;
  103.     LARGE_INTEGER PerfTime;
  104.     LARGE_INTEGER PerfFreq;
  105. } PERF_OBJECT_TYPE, *PPERF_OBJECT_TYPE;
  106. typedef struct _PERF_COUNTER_DEFINITION {
  107.     DWORD ByteLength;
  108.     DWORD CounterNameTitleIndex;
  109.     LPWSTR CounterNameTitle;
  110.     DWORD CounterHelpTitleIndex;
  111.     LPWSTR CounterHelpTitle;
  112.     LONG DefaultScale;
  113.     DWORD DetailLevel;
  114.     DWORD CounterType;
  115.     DWORD CounterSize;
  116.     DWORD CounterOffset;
  117. } PERF_COUNTER_DEFINITION,*PPERF_COUNTER_DEFINITION;
  118. typedef struct _PERF_INSTANCE_DEFINITION {
  119.     DWORD ByteLength;
  120.     DWORD ParentObjectTitleIndex;
  121.     DWORD ParentObjectInstance;
  122.     LONG UniqueID;
  123.     DWORD NameOffset;
  124.     DWORD NameLength;
  125. } PERF_INSTANCE_DEFINITION,*PPERF_INSTANCE_DEFINITION;
  126. typedef struct _PERF_COUNTER_BLOCK {
  127.     DWORD ByteLength;
  128. } PERF_COUNTER_BLOCK, *PPERF_COUNTER_BLOCK;
  129. typedef DWORD(CALLBACK PM_OPEN_PROC)(LPWSTR);
  130. typedef DWORD(CALLBACK PM_COLLECT_PROC)(LPWSTR,PVOID*,PDWORD,PDWORD);
  131. typedef DWORD(CALLBACK PM_CLOSE_PROC)(void);
  132. #ifdef __cplusplus
  133. }
  134. #endif
  135. #endif 
  136.