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.

217 lines
5.3 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) Microsoft Corporation
  4. //
  5. // Module Name:
  6. //
  7. // aaaamontr.h
  8. //
  9. // Abstract:
  10. //
  11. // This file contains definitions which are needed by AAAAMONTR.DLL
  12. // and all NetSh helper DLLs which register under it.
  13. //
  14. //////////////////////////////////////////////////////////////////////////////
  15. #ifndef _AAAAMONTR_H_
  16. #define _AAAAMONTR_H_
  17. #if _MSC_VER > 1000
  18. #pragma once
  19. #endif
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. //{1D0FA29B-E93E-11d2-A91E-009027450464}
  24. #define AAAAMONTR_GUID \
  25. { 0x1D0FA29B, 0xE93E, 0x11d2, { 0xA9, 0x1E, 0x00, 0x90, 0x27, 0x45, 0x04, 0x64 } }
  26. #define AAAAMONTR_VERSION_50 0x0005000
  27. #define AAAAMONTR_OS_BUILD_NT40 1381
  28. //
  29. // Enumerations for types of arguments (see AAAAMON_CMD_ARG)
  30. //
  31. #define AAAAMONTR_CMD_TYPE_STRING 0x1
  32. #define AAAAMONTR_CMD_TYPE_ENUM 0x2
  33. //
  34. // Macros to operate on AAAAMON_CMD_ARG's
  35. //
  36. #define AAAAMON_CMD_ARG_GetPsz(pArg) \
  37. (((pArg)->rgTag.bPresent) ? (pArg)->Val.pszValue : NULL)
  38. #define AAAAMON_CMD_ARG_GetDword(pArg) \
  39. (((pArg)->rgTag.bPresent) ? (pArg)->Val.dwValue : -1)
  40. //
  41. // Structure defining a command line argument
  42. //
  43. typedef struct _AAAAMON_CMD_ARG
  44. {
  45. IN DWORD dwType; // AAAAMONTR_CMD_TYPE_*
  46. IN TAG_TYPE rgTag; // The tag for this command
  47. IN TOKEN_VALUE* rgEnums; // The enumerations for this arg
  48. IN DWORD dwEnumCount; // Count of enums
  49. union
  50. {
  51. OUT PWCHAR pszValue; // Valid only for AAAAMONTR_CMD_TYPE_STRING
  52. OUT DWORD dwValue; // Valid only for AAAAMONTR_CMD_TYPE_ENUM
  53. } Val;
  54. } AAAAMON_CMD_ARG, *PAAAAMON_CMD_ARG;
  55. //
  56. // Api's that aaaamontr requires of its helpers
  57. //
  58. typedef
  59. DWORD
  60. (WINAPI AAAA_CONTEXT_ENTRY_FN)(
  61. IN PWCHAR pszServer,
  62. IN DWORD dwBuild,
  63. IN PTCHAR *pptcArguments,
  64. IN DWORD dwArgCount,
  65. IN DWORD dwFlags,
  66. OUT PWCHAR pwcNewContext
  67. );
  68. typedef AAAA_CONTEXT_ENTRY_FN *PAAAA_CONTEXT_ENTRY_FN;
  69. typedef
  70. DWORD
  71. (WINAPI AAAA_CONTEXT_DUMP_FN)(
  72. IN HANDLE hFile
  73. );
  74. typedef AAAA_CONTEXT_DUMP_FN* PAAAA_CONTEXT_DUMP_FN;
  75. //
  76. // Api's that aaaamontr exposes to its helpers
  77. //
  78. typedef
  79. PVOID
  80. (WINAPI AAAA_ALLOC_FN)(
  81. IN DWORD dwBytes,
  82. IN BOOL bZero
  83. );
  84. typedef AAAA_ALLOC_FN* PAAAA_ALLOC_FN;
  85. typedef
  86. VOID
  87. (WINAPI AAAA_FREE_FN)(
  88. IN PVOID pvData
  89. );
  90. typedef AAAA_FREE_FN* PAAAA_FREE_FN;
  91. typedef
  92. PWCHAR
  93. (WINAPI AAAA_STRDUP_FN)(
  94. IN PWCHAR pwszSrc
  95. );
  96. typedef AAAA_STRDUP_FN* PAAAA_STRDUP_FN;
  97. typedef
  98. LPDWORD
  99. (WINAPI AAAA_DWORDDUP_FN)(
  100. IN DWORD dwSrc
  101. );
  102. typedef AAAA_DWORDDUP_FN* PAAAA_DWORDDUP_FN;
  103. typedef
  104. DWORD
  105. (WINAPI AAAA_CREATE_DUMP_FILE_FN)(
  106. IN PWCHAR pwszName,
  107. OUT PHANDLE phFile
  108. );
  109. typedef AAAA_CREATE_DUMP_FILE_FN* PAAAA_CREATE_DUMP_FILE_FN;
  110. typedef
  111. VOID
  112. (WINAPI AAAA_CLOSE_DUMP_FILE_FN)(
  113. HANDLE hFile
  114. );
  115. typedef AAAA_CLOSE_DUMP_FILE_FN* PAAAA_CLOSE_DUMP_FILE_FN;
  116. typedef
  117. DWORD
  118. (WINAPI AAAA_GET_OS_VERSION_FN)(
  119. IN PWCHAR pwszRouter,
  120. OUT LPDWORD lpdwVersion);
  121. typedef AAAA_GET_OS_VERSION_FN* PAAAA_GET_OS_VERSION_FN;
  122. typedef
  123. DWORD
  124. (WINAPI AAAA_GET_TAG_TOKEN_FN)(
  125. IN HANDLE hModule,
  126. IN PWCHAR *ppwcArguments,
  127. IN DWORD dwCurrentIndex,
  128. IN DWORD dwArgCount,
  129. IN PTAG_TYPE pttTagToken,
  130. IN DWORD dwNumTags,
  131. OUT PDWORD pdwOut
  132. );
  133. typedef AAAA_GET_TAG_TOKEN_FN* PAAAA_GET_TAG_TOKEN_FN;
  134. typedef
  135. DWORD
  136. (WINAPI AAAA_PARSE_FN)(
  137. IN PWCHAR* ppwcArguments,
  138. IN DWORD dwCurrentIndex,
  139. IN DWORD dwArgCount,
  140. IN BOOL* pbDone,
  141. OUT AAAAMON_CMD_ARG* pAaaaArgs,
  142. IN DWORD dwAaaaArgCount);
  143. typedef AAAA_PARSE_FN* PAAAA_PARSE_FN;
  144. typedef
  145. BOOL
  146. (WINAPI AAAA_IS_HELP_TOKEN_FN)(
  147. PWCHAR pwszToken
  148. );
  149. typedef AAAA_IS_HELP_TOKEN_FN* PAAAA_IS_HELP_TOKEN_FN;
  150. typedef
  151. PWCHAR
  152. (WINAPI AAAA_ASSIGN_FROM_TOKENS_FN)(
  153. IN HINSTANCE hModule,
  154. IN PWCHAR pwszTokenTkn,
  155. IN PWCHAR pwszTokenCmd);
  156. typedef AAAA_ASSIGN_FROM_TOKENS_FN* PAAAA_ASSIGN_FROM_TOKENS_FN;
  157. //
  158. // Defines information exported to all aaaa helpers by the
  159. // aaaamontr module.
  160. //
  161. typedef struct _AAAAMONTR_ATTRIBUTES
  162. {
  163. union
  164. {
  165. ULONGLONG _ullAlign;
  166. struct
  167. {
  168. DWORD dwVersion;
  169. DWORD dwReserved;
  170. };
  171. };
  172. // Aaaamontr functions (common utilities)
  173. //
  174. PAAAA_ALLOC_FN pfnAlloc;
  175. PAAAA_FREE_FN pfnFree;
  176. PAAAA_STRDUP_FN pfnStrDup;
  177. PAAAA_DWORDDUP_FN pfnDwordDup;
  178. PAAAA_CREATE_DUMP_FILE_FN pfnCreateDumpFile;
  179. PAAAA_CLOSE_DUMP_FILE_FN pfnCloseDumpFile;
  180. PAAAA_GET_OS_VERSION_FN pfnGetOsVersion;
  181. PAAAA_GET_TAG_TOKEN_FN pfnGetTagToken;
  182. PAAAA_PARSE_FN pfnParse;
  183. PAAAA_IS_HELP_TOKEN_FN pfnIsHelpToken;
  184. PAAAA_ASSIGN_FROM_TOKENS_FN pfnAssignFromTokens;
  185. } AAAAMONTR_ATTRIBUTES, *PAAAAMONTR_ATTRIBUTES;
  186. #ifdef __cplusplus
  187. }
  188. #endif
  189. #endif // _AAAAMONTR_H_