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.

169 lines
3.9 KiB

  1. /*++
  2. Copyright (C) 1995-1999 Microsoft Corporation
  3. Module Name:
  4. loadperf.h
  5. Abstract:
  6. Header file for the Performance Monitor counter string installation
  7. and removal functions.
  8. Revision History
  9. 16-Nov-95 Created (a-robw)
  10. --*/
  11. #ifndef _LOADPERF_H_
  12. #define _LOADPERF_H_
  13. #if _MSC_VER > 1000
  14. #pragma once
  15. #endif
  16. // function prototypes for perf counter name string load & unload functions
  17. // provided in LOADPERF.DLL
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. #ifdef __LOADPERF__
  22. #define LOADPERF_FUNCTION DWORD __stdcall
  23. #else
  24. #define LOADPERF_FUNCTION __declspec(dllimport) DWORD __stdcall
  25. #endif
  26. // flags for dwFlags Argument
  27. #define LOADPERF_FLAGS_DELETE_MOF_ON_EXIT ((ULONG_PTR)1)
  28. #define LOADPERF_FLAGS_LOAD_REGISTRY_ONLY ((ULONG_PTR)2)
  29. #define LOADPERF_FLAGS_CREATE_MOF_ONLY ((ULONG_PTR)4)
  30. #define LOADPERF_FLAGS_DISPLAY_USER_MSGS ((ULONG_PTR)8)
  31. // note: LOADPERF_FLAGS_LOAD_REGISTRY_ONLY is not a valid flag for
  32. // LoadMofFromInstalledServiceA/W as the service must already be installed
  33. LOADPERF_FUNCTION
  34. LoadMofFromInstalledServiceA (
  35. IN LPCSTR szServiceName, // service to create mof for
  36. IN LPCSTR szMofFilename, // name of file to create
  37. IN ULONG_PTR dwFlags
  38. );
  39. LOADPERF_FUNCTION
  40. LoadMofFromInstalledServiceW (
  41. IN LPCWSTR szServiceName, // service to create mof for
  42. IN LPCWSTR szMofFilename, // name of file to create
  43. IN ULONG_PTR dwFlags
  44. );
  45. LOADPERF_FUNCTION
  46. InstallPerfDllW (
  47. IN LPCWSTR szComputerName,
  48. IN LPCWSTR lpIniFile,
  49. IN ULONG_PTR dwFlags
  50. );
  51. LOADPERF_FUNCTION
  52. InstallPerfDllA (
  53. IN LPCSTR szComputerName,
  54. IN LPCSTR lpIniFile,
  55. IN ULONG_PTR dwFlags
  56. );
  57. LOADPERF_FUNCTION
  58. UnInstallPerfDllA (
  59. IN LPCSTR szComputerName,
  60. IN LPCSTR lpServiceName,
  61. IN ULONG_PTR dwFlags
  62. );
  63. LOADPERF_FUNCTION
  64. UnInstallPerfDllA (
  65. IN LPCSTR szComputerName,
  66. IN LPCSTR lpServiceName,
  67. IN ULONG_PTR dwFlags
  68. );
  69. LOADPERF_FUNCTION
  70. LoadPerfCounterTextStringsA (
  71. IN LPSTR lpCommandLine,
  72. IN BOOL bQuietModeArg
  73. );
  74. LOADPERF_FUNCTION
  75. LoadPerfCounterTextStringsW (
  76. IN LPWSTR lpCommandLine,
  77. IN BOOL bQuietModeArg
  78. );
  79. LOADPERF_FUNCTION
  80. UnloadPerfCounterTextStringsW (
  81. IN LPWSTR lpCommandLine,
  82. IN BOOL bQuietModeArg
  83. );
  84. LOADPERF_FUNCTION
  85. UnloadPerfCounterTextStringsA (
  86. IN LPSTR lpCommandLine,
  87. IN BOOL bQuietModeArg
  88. );
  89. LOADPERF_FUNCTION
  90. UpdatePerfNameFilesA (
  91. IN LPCSTR szNewCtrFilePath,
  92. IN LPCSTR szNewHlpFilePath,
  93. IN LPSTR szLanguageID,
  94. IN ULONG_PTR dwFlags
  95. );
  96. LOADPERF_FUNCTION
  97. UpdatePerfNameFilesW (
  98. IN LPCWSTR szNewCtrFilePath,
  99. IN LPCWSTR szNewHlpFilePath,
  100. IN LPWSTR szLanguageID,
  101. IN ULONG_PTR dwFlags
  102. );
  103. LOADPERF_FUNCTION
  104. SetServiceAsTrustedA (
  105. LPCSTR szReserved,
  106. LPCSTR szServiceName
  107. );
  108. LOADPERF_FUNCTION
  109. SetServiceAsTrustedW (
  110. LPCWSTR szReserved,
  111. LPCWSTR szServiceName
  112. );
  113. #ifdef UNICODE
  114. #define InstallPerfDll InstallPerfDllW
  115. #define UnInstallPerfDll UnInstallPerfDllW
  116. #define LoadPerfCounterTextStrings LoadPerfCounterTextStringsW
  117. #define UnloadPerfCounterTextStrings UnloadPerfCounterTextStringsW
  118. #define LoadMofFromInstalledService LoadMofFromInstalledServiceW
  119. #define UpdatePerfNameFiles UpdatePerfNameFilesW
  120. #define SetServiceAsTrusted SetServiceAsTrustedW
  121. #else
  122. #define InstallPerfDll InstallPerfDllA
  123. #define UnInstallPerfDll UnInstallPerfDllA
  124. #define LoadPerfCounterTextStrings LoadPerfCounterTextStringsA
  125. #define UnloadPerfCounterTextStrings UnloadPerfCounterTextStringsA
  126. #define LoadMofFromInstalledService LoadMofFromInstalledServiceA
  127. #define UpdatePerfNameFiles UpdatePerfNameFilesA
  128. #define SetServiceAsTrusted SetServiceAsTrustedA
  129. #endif
  130. #ifdef __cplusplus
  131. }
  132. #endif
  133. #endif // _LOADPERF_H_