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.

221 lines
5.2 KiB

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