Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
1.6 KiB

  1. #ifndef _PERFDATA_H_
  2. #define _PERFDATA_H_
  3. #define INITIAL_SIZE 4096L
  4. #define EXTEND_SIZE 4096L
  5. #define RESERVED 0L
  6. typedef LPVOID LPMEMORY;
  7. typedef HGLOBAL HMEMORY;
  8. typedef struct _UNICODE_STRING {
  9. USHORT Length;
  10. USHORT MaximumLength;
  11. PWSTR Buffer;
  12. } UNICODE_STRING, *PUNICODE_STRING;
  13. #define UNICODE_NULL ((WCHAR)0) // winnt
  14. LPMEMORY
  15. MemoryAllocate (
  16. DWORD dwSize
  17. );
  18. VOID
  19. MemoryFree (
  20. LPMEMORY lpMemory
  21. );
  22. DWORD
  23. MemorySize (
  24. LPMEMORY lpMemory
  25. );
  26. LPMEMORY
  27. MemoryResize (
  28. LPMEMORY lpMemory,
  29. DWORD dwNewSize
  30. );
  31. LPWSTR
  32. *BuildNameTable(
  33. LPWSTR szComputerName, // computer to query names from
  34. LPWSTR lpszLangId, // unicode value of Language subkey
  35. PDWORD pdwLastItem // size of array in elements
  36. );
  37. PPERF_OBJECT_TYPE
  38. FirstObject (
  39. IN PPERF_DATA_BLOCK pPerfData
  40. );
  41. PPERF_OBJECT_TYPE
  42. NextObject (
  43. IN PPERF_OBJECT_TYPE pObject
  44. );
  45. PERF_OBJECT_TYPE *
  46. GetObjectDefByTitleIndex(
  47. IN PERF_DATA_BLOCK *pDataBlock,
  48. IN DWORD ObjectTypeTitleIndex
  49. );
  50. PERF_INSTANCE_DEFINITION *
  51. FirstInstance(
  52. IN PERF_OBJECT_TYPE *pObjectDef
  53. );
  54. PERF_INSTANCE_DEFINITION *
  55. NextInstance(
  56. IN PERF_INSTANCE_DEFINITION *pInstDef
  57. );
  58. PERF_INSTANCE_DEFINITION *
  59. GetInstance(
  60. IN PERF_OBJECT_TYPE *pObjectDef,
  61. IN LONG InstanceNumber
  62. );
  63. PERF_COUNTER_DEFINITION *
  64. FirstCounter(
  65. PERF_OBJECT_TYPE *pObjectDef
  66. );
  67. PERF_COUNTER_DEFINITION *
  68. NextCounter(
  69. PERF_COUNTER_DEFINITION *pCounterDef
  70. );
  71. LONG
  72. GetSystemPerfData (
  73. IN HKEY hKeySystem,
  74. IN PPERF_DATA_BLOCK *pPerfData,
  75. IN DWORD dwIndex // 0 = Global, 1 = Costly
  76. );
  77. #endif //_PERFDATA_H_