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.

189 lines
3.9 KiB

  1. /*++
  2. Copyright (c) 1998-1999 Microsoft Corporation
  3. Module Name:
  4. rasmontr.h
  5. Abstract:
  6. This file contains definitions which are needed by RASMONTR.DLL
  7. and all NetSh helper DLLs which register under it.
  8. --*/
  9. #ifndef _RASMONTR_H_
  10. #define _RASMONTR_H_
  11. #if _MSC_VER > 1000
  12. #pragma once
  13. #endif
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. // {0705ECA2-7AAC-11d2-89DC-006008B0E5B9}
  18. #define RASMONTR_GUID \
  19. { 0x705eca2, 0x7aac, 0x11d2, { 0x89, 0xdc, 0x0, 0x60, 0x8, 0xb0, 0xe5, 0xb9 } }
  20. #define RASMONTR_VERSION_50 0x0005000
  21. #define RASMONTR_OS_BUILD_NT40 1381
  22. //
  23. // Enumerations for types of arguments (see RASMON_CMD_ARG)
  24. //
  25. #define RASMONTR_CMD_TYPE_STRING 0x1
  26. #define RASMONTR_CMD_TYPE_ENUM 0x2
  27. #define RASMONTR_CMD_TYPE_DWORD 0x3
  28. //
  29. // Macros to operate on RASMON_CMD_ARG's
  30. //
  31. #define RASMON_CMD_ARG_Present(pArg) \
  32. ((pArg)->rgTag.bPresent)
  33. #define RASMON_CMD_ARG_GetPsz(pArg) \
  34. (((pArg)->rgTag.bPresent) ? (pArg)->Val.pszValue : NULL)
  35. #define RASMON_CMD_ARG_GetEnum(pArg) \
  36. (((pArg)->rgTag.bPresent) ? (pArg)->Val.dwValue : 0)
  37. #define RASMON_CMD_ARG_GetDword(pArg) \
  38. (((pArg)->rgTag.bPresent) ? (pArg)->Val.dwValue : 0)
  39. //
  40. // Structure defining a command line argument
  41. //
  42. typedef struct _RASMON_CMD_ARG
  43. {
  44. IN DWORD dwType; // RASMONTR_CMD_TYPE_*
  45. IN TAG_TYPE rgTag; // The tag for this command
  46. IN TOKEN_VALUE* rgEnums; // The enumerations for this arg
  47. IN DWORD dwEnumCount; // Count of enums
  48. union
  49. {
  50. OUT PWCHAR pszValue; // Valid only for RASMONTR_CMD_TYPE_STRING
  51. OUT DWORD dwValue; // Valid only for RASMONTR_CMD_TYPE_ENUM
  52. } Val;
  53. } RASMON_CMD_ARG, *PRASMON_CMD_ARG;
  54. //
  55. // Api's that rasmontr requires of its helpers
  56. //
  57. typedef
  58. DWORD
  59. (WINAPI RAS_CONTEXT_ENTRY_FN)(
  60. IN LPCWSTR pszServer,
  61. IN DWORD dwBuild,
  62. IN OUT LPWSTR *pptcArguments,
  63. IN DWORD dwArgCount,
  64. IN DWORD dwFlags,
  65. OUT PWCHAR pwcNewContext
  66. );
  67. typedef RAS_CONTEXT_ENTRY_FN *PRAS_CONTEXT_ENTRY_FN;
  68. // Defines information that describes a server
  69. //
  70. typedef struct _RASMON_SERVERINFO
  71. {
  72. // Common to all
  73. //
  74. PWCHAR pszServer;
  75. DWORD dwBuild;
  76. // Used by user commands
  77. HANDLE hServer;
  78. ULONG ulUserInitStarted;
  79. ULONG ulUserInitCompleted;
  80. HKEY hkMachine;
  81. } RASMON_SERVERINFO;
  82. //
  83. // Api's that rasmontr exposes to its helpers
  84. //
  85. PVOID WINAPI
  86. RutlAlloc(
  87. IN DWORD dwBytes,
  88. IN BOOL bZero
  89. );
  90. VOID WINAPI
  91. RutlFree(
  92. IN PVOID pvData
  93. );
  94. PWCHAR WINAPI
  95. RutlStrDup(
  96. IN LPCWSTR pwszSrc
  97. );
  98. LPDWORD WINAPI
  99. RutlDwordDup(
  100. IN DWORD dwSrc
  101. );
  102. DWORD WINAPI
  103. RutlCreateDumpFile(
  104. IN LPCWSTR pwszName,
  105. OUT PHANDLE phFile
  106. );
  107. VOID WINAPI
  108. RutlCloseDumpFile(
  109. HANDLE hFile
  110. );
  111. DWORD WINAPI
  112. RutlGetOsVersion(
  113. IN OUT RASMON_SERVERINFO *pServerInfo
  114. );
  115. DWORD WINAPI
  116. RutlGetTagToken(
  117. IN HANDLE hModule,
  118. IN OUT LPWSTR *ppwcArguments,
  119. IN DWORD dwCurrentIndex,
  120. IN DWORD dwArgCount,
  121. IN PTAG_TYPE pttTagToken,
  122. IN DWORD dwNumTags,
  123. OUT PDWORD pdwOut
  124. );
  125. DWORD WINAPI
  126. RutlParse(
  127. IN OUT LPWSTR *ppwcArguments,
  128. IN DWORD dwCurrentIndex,
  129. IN DWORD dwArgCount,
  130. IN BOOL* pbDone,
  131. OUT RASMON_CMD_ARG* pRasArgs,
  132. IN DWORD dwRasArgCount);
  133. BOOL WINAPI
  134. RutlIsHelpToken(
  135. PWCHAR pwszToken
  136. );
  137. PWCHAR WINAPI
  138. RutlAssignmentFromTokens(
  139. IN HINSTANCE hModule,
  140. IN LPCWSTR pwszTokenTkn,
  141. IN LPCWSTR pwszTokenCmd);
  142. PWCHAR WINAPI
  143. RutlAssignmentFromTokenAndDword(
  144. IN HINSTANCE hModule,
  145. IN LPCWSTR pwszToken,
  146. IN DWORD dwDword,
  147. IN DWORD dwRadius);
  148. #ifdef __cplusplus
  149. }
  150. #endif
  151. #endif // _RASMONTR_H_