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.

198 lines
3.6 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. routing\netsh\shell\reghlp.h
  5. Abstract:
  6. Include for reghlp.c
  7. Revision History:
  8. Anand Mahalingam 7/6/98 Created
  9. --*/
  10. typedef struct _NS_DLL_TABLE_ENTRY
  11. {
  12. //
  13. // Name of the DLL servicing the context
  14. //
  15. LPWSTR pwszDLLName; // Corresponding DLL
  16. //
  17. // Registry value used for this DLL
  18. //
  19. LPWSTR pwszValueName;
  20. //
  21. // TRUE if loaded
  22. //
  23. BOOL bLoaded; // In memory or not
  24. //
  25. // Handle to DLL instance if loaded
  26. //
  27. HANDLE hDll; // DLL handle if loaded
  28. //
  29. // Function to stop this DLL
  30. //
  31. PNS_DLL_STOP_FN pfnStopFn;
  32. } NS_DLL_TABLE_ENTRY,*PNS_DLL_TABLE_ENTRY;
  33. typedef struct _NS_HELPER_TABLE_ENTRY
  34. {
  35. NS_HELPER_ATTRIBUTES nha;
  36. //
  37. // GUID associated with the parent helper
  38. //
  39. GUID guidParent;
  40. //
  41. // Index of the DLL implementing the helper
  42. //
  43. DWORD dwDllIndex;
  44. //
  45. // TRUE if started
  46. //
  47. BOOL bStarted;
  48. // Number of subcontexts
  49. ULONG ulNumSubContexts;
  50. // Array of subcontexts
  51. PBYTE pSubContextTable;
  52. // Size of a subcontext entry
  53. ULONG ulSubContextSize;
  54. }NS_HELPER_TABLE_ENTRY,*PNS_HELPER_TABLE_ENTRY;
  55. //
  56. // Function Prototypes
  57. //
  58. VOID
  59. LoadDllInfoFromRegistry(
  60. VOID
  61. );
  62. DWORD
  63. GetContextEntry(
  64. IN PNS_HELPER_TABLE_ENTRY pHelper,
  65. IN LPCWSTR pwszContext,
  66. OUT PCNS_CONTEXT_ATTRIBUTES *ppContext
  67. );
  68. DWORD
  69. GetHelperAttributes(
  70. IN DWORD dwIndex,
  71. OUT PHELPER_ENTRY_FN *ppfnEntryPt
  72. );
  73. DWORD
  74. PrintHelperHelp(
  75. DWORD dwDisplayFlags
  76. );
  77. DWORD
  78. DumpSubContexts(
  79. IN PNS_HELPER_TABLE_ENTRY pHelper,
  80. IN LPWSTR *ppwcArguments,
  81. IN DWORD dwArgCount,
  82. IN LPCVOID pvData
  83. );
  84. DWORD
  85. CallCommit(
  86. IN DWORD dwAction,
  87. OUT PBOOL pbCommit
  88. );
  89. DWORD
  90. FreeHelpers(
  91. VOID
  92. );
  93. DWORD
  94. FreeDlls(
  95. VOID
  96. );
  97. DWORD
  98. UninstallTransport(
  99. IN LPCWSTR pwszTransport
  100. );
  101. DWORD
  102. InstallTransport(
  103. IN LPCWSTR pwszTransport,
  104. IN LPCWSTR pwszConfigDll,
  105. IN LPCWSTR pwszInitFnName
  106. );
  107. extern BOOL g_bCommit;
  108. DWORD
  109. GetHelperEntry(
  110. IN CONST GUID *pGuid,
  111. OUT PNS_HELPER_TABLE_ENTRY *ppHelper
  112. );
  113. DWORD
  114. GetRootContext(
  115. OUT PCNS_CONTEXT_ATTRIBUTES *ppContext,
  116. OUT PNS_HELPER_TABLE_ENTRY *ppHelper
  117. );
  118. extern PNS_HELPER_TABLE_ENTRY g_CurrentHelper;
  119. extern PCNS_CONTEXT_ATTRIBUTES g_CurrentContext;
  120. DWORD
  121. GetDllEntry(
  122. IN DWORD dwDllIndex,
  123. OUT PNS_DLL_TABLE_ENTRY *ppDll
  124. );
  125. DWORD
  126. DumpContext(
  127. IN PCNS_CONTEXT_ATTRIBUTES pContext,
  128. IN LPWSTR *ppwcArguments,
  129. IN DWORD dwArgCount,
  130. IN LPCVOID pvData
  131. );
  132. DWORD
  133. GetParentContext(
  134. IN PCNS_CONTEXT_ATTRIBUTES pChild,
  135. OUT PCNS_CONTEXT_ATTRIBUTES *ppParent
  136. );
  137. DWORD
  138. AppendFullContextName(
  139. IN PCNS_CONTEXT_ATTRIBUTES pContext,
  140. OUT LPWSTR *pwszContextName
  141. );
  142. DWORD
  143. AddDllEntry(
  144. LPCWSTR pwszValueName,
  145. LPCWSTR pwszConfigDll
  146. );
  147. BOOL VerifyOsVersion(IN PNS_OSVERSIONCHECK pfnVersionCheck);