Leaked source code of windows server 2003
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.

84 lines
2.0 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. PassportPerf.h
  5. Abstract:
  6. Perormance Objects Definition
  7. Author:
  8. Christopher Bergh (cbergh) 10-Sept-1988
  9. Revision History:
  10. - added multi-object support 1-Oct-98
  11. --*/
  12. #if !defined(PASSPORTPERF_H)
  13. #define PASSPORTPERF_H
  14. #include <windows.h>
  15. #include <winperf.h>
  16. #include <string.h>
  17. #include <tchar.h>
  18. #include "PerfSharedMemory.h"
  19. //
  20. // Function Prototypes//
  21. // these are used to insure that the data collection functions
  22. // accessed by Perflib will have the correct calling format.//
  23. PM_OPEN_PROC OpenPassportPerformanceData;
  24. PM_COLLECT_PROC CollectPassportPerformanceData;
  25. PM_CLOSE_PROC ClosePassportPerformanceData;
  26. //
  27. // defs
  28. //
  29. #define PASSPORT_PERF_KEY "SYSTEM\\CurrentControlSet\\Services\\"
  30. const TCHAR PASSPORT_PERF_OPEN[] = _T("OpenPassportPerformanceData");
  31. const TCHAR PASSPORT_PERF_COLLECT[] = _T("CollectPassportPerformanceData");
  32. const TCHAR PASSPORT_PERF_CLOSE[] = _T("ClosePassportPerformanceData");
  33. // these two should be the same as in PassportPerfInterface's
  34. // MAX_INSTANCE_NAME and MAX_COUNTERS
  35. #define MAX_INSTANCE_NAME_LENGTH 32
  36. #define MAX_NUMBER_COUNTERS 128
  37. typedef CHAR INSTANCENAME[MAX_INSTANCE_NAME_LENGTH];
  38. struct INSTANCE_DATA
  39. {
  40. BOOL active;
  41. INSTANCENAME szInstanceName;
  42. };
  43. typedef struct _PassportDefaultCounterType
  44. {
  45. DWORD dwIndex;
  46. DWORD dwDefaultType;
  47. } PassportDefaultCounterType;
  48. #define PASSPORT_NAME_SIZE 512
  49. #define MAX_PASSPORT_OBJECTS 10
  50. typedef struct _PassportObjectData
  51. {
  52. TCHAR szPassportName[PASSPORT_NAME_SIZE];
  53. const TCHAR *lpcszPassportPerfBlock;
  54. TCHAR szPassportPerfDll[PASSPORT_NAME_SIZE];
  55. TCHAR szPassportPerfIniFile[PASSPORT_NAME_SIZE];
  56. BOOL active;
  57. DWORD dwNumDefaultCounterTypes;
  58. PassportDefaultCounterType defaultCounterTypes[MAX_NUMBER_COUNTERS];
  59. PerfSharedMemory *PSM;
  60. } PassportObjectData;
  61. #define DWORD_MULTIPLE(x) (((x+sizeof(DWORD)-1)/sizeof(DWORD))*sizeof(DWORD))
  62. #endif