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.

233 lines
7.8 KiB

  1. //*******************************************************************
  2. //
  3. // Copyright(c) Microsoft Corporation, 1996
  4. //
  5. // FILE: CFGAPI.H
  6. //
  7. // PURPOSE: Contains API's exported from icfg32.dll and structures
  8. // required by those functions.
  9. //
  10. //*******************************************************************
  11. #ifndef _CFGAPI_H_
  12. #define _CFGAPI_H_
  13. // Maximum buffer size for error messages.
  14. #define MAX_ERROR_TEXT 512
  15. // Flags for dwfOptions
  16. // install TCP (if needed)
  17. #define ICFG_INSTALLTCP 0x00000001
  18. // install RAS (if needed)
  19. #define ICFG_INSTALLRAS 0x00000002
  20. // install exchange and internet mail
  21. #define ICFG_INSTALLMAIL 0x00000004
  22. // DRIVERTYPE_ defines for TCP/IP configuration apis
  23. #define DRIVERTYPE_NET 0x0001
  24. #define DRIVERTYPE_PPP 0x0002
  25. #ifdef __cplusplus
  26. extern "C"
  27. {
  28. #endif // __cplusplus
  29. //*******************************************************************
  30. //
  31. // FUNCTION: IcfgNeedInetComponents
  32. //
  33. // PURPOSE: Detects whether the specified system components are
  34. // installed or not.
  35. //
  36. // PARAMETERS: dwfOptions - a combination of ICFG_ flags that specify
  37. // which components to detect as follows:
  38. //
  39. // ICFG_INSTALLTCP - is TCP/IP needed?
  40. // ICFG_INSTALLRAS - is RAS needed?
  41. // ICFG_INSTALLMAIL - is exchange or internet mail needed?
  42. //
  43. // lpfNeedComponents - TRUE if any specified component needs
  44. // to be installed.
  45. //
  46. // RETURNS: HRESULT code, ERROR_SUCCESS if no errors occurred
  47. //
  48. //*******************************************************************
  49. HRESULT WINAPI IcfgNeedInetComponents(DWORD dwfOptions, LPBOOL lpfNeedComponents);
  50. //*******************************************************************
  51. //
  52. // FUNCTION: IcfgInstallInetComponents
  53. //
  54. // PURPOSE: Install the specified system components.
  55. //
  56. // PARAMETERS: hwndParent - Parent window handle.
  57. // dwfOptions - a combination of ICFG_ flags that controls
  58. // the installation and configuration as follows:
  59. //
  60. // ICFG_INSTALLTCP - install TCP/IP (if needed)
  61. // ICFG_INSTALLRAS - install RAS (if needed)
  62. // ICFG_INSTALLMAIL - install exchange and internet mail
  63. //
  64. // lpfNeedsRestart - if non-NULL, then on return, this will be
  65. // TRUE if windows must be restarted to complete the installation.
  66. //
  67. // RETURNS: HRESULT code, ERROR_SUCCESS if no errors occurred
  68. //
  69. //*******************************************************************
  70. HRESULT WINAPI IcfgInstallInetComponents(HWND hwndParent, DWORD dwfOptions,
  71. LPBOOL lpfNeedsRestart);
  72. //*******************************************************************
  73. //
  74. // FUNCTION: IcfgGetLastInstallErrorText
  75. //
  76. // PURPOSE: Get a text string that describes the last installation
  77. // error that occurred. The string should be suitable
  78. // for display in a message box with no further formatting.
  79. //
  80. // PARAMETERS: lpszErrorDesc - points to buffer to receive the string.
  81. // cbErrorDesc - size of buffer.
  82. //
  83. // RETURNS: The length of the string returned.
  84. //
  85. //*******************************************************************
  86. DWORD WINAPI IcfgGetLastInstallErrorText(LPTSTR lpszErrorDesc, DWORD cbErrorDesc);
  87. //*******************************************************************
  88. //
  89. // FUNCTION: IcfgSetInstallSourcePath
  90. //
  91. // PURPOSE: Sets the path where windows looks when installing files.
  92. //
  93. // PARAMETERS: lpszSourcePath - full path of location of files to install.
  94. // If this is NULL, default path is used.
  95. //
  96. // RETURNS: HRESULT code, ERROR_SUCCESS if no errors occurred
  97. //
  98. //*******************************************************************
  99. HRESULT WINAPI IcfgSetInstallSourcePath(LPCSTR lpszSourcePath);
  100. //*******************************************************************
  101. //
  102. // FUNCTION: IcfgIsGlobalDNS
  103. //
  104. // PURPOSE: Determines whether there is Global DNS set.
  105. //
  106. // PARAMETERS: lpfGlobalDNS - TRUE if global DNS is set, FALSE otherwise.
  107. //
  108. // RETURNS: HRESULT code, ERROR_SUCCESS if no errors occurred
  109. // NOTE: This function is for Windows 95 only, and
  110. // should always return ERROR_SUCCESS and set lpfGlobalDNS
  111. // to FALSE in Windows NT.
  112. //
  113. //*******************************************************************
  114. HRESULT WINAPI IcfgIsGlobalDNS(LPBOOL lpfGlobalDNS);
  115. //*******************************************************************
  116. //
  117. // FUNCTION: IcfgRemoveGlobalDNS
  118. //
  119. // PURPOSE: Removes global DNS info from registry.
  120. //
  121. // PARAMETERS: None.
  122. //
  123. // RETURNS: HRESULT code, ERROR_SUCCESS if no errors occurred
  124. // NOTE: This function is for Windows 95 only, and
  125. // should always return ERROR_SUCCESS in Windows NT.
  126. //
  127. //*******************************************************************
  128. HRESULT WINAPI IcfgRemoveGlobalDNS(void);
  129. //*******************************************************************
  130. //
  131. // FUNCTION: IcfgIsFileSharingTurnedOn
  132. //
  133. // PURPOSE: Determines if file server (VSERVER) is bound to TCP/IP
  134. // for specified driver type (net card or PPP).
  135. //
  136. // PARAMETERS: dwfDriverType - a combination of DRIVERTYPE_ flags
  137. // that specify what driver type to check server-TCP/IP
  138. // bindings for as follows:
  139. //
  140. // DRIVERTYPE_NET - net card
  141. // DRIVERTYPE_PPP - PPPMAC
  142. //
  143. // lpfSharingOn - TRUE if bound once or more, FALSE if not bound
  144. //
  145. // RETURNS: HRESULT code, ERROR_SUCCESS if no errors occurred
  146. //
  147. //*******************************************************************
  148. HRESULT WINAPI IcfgIsFileSharingTurnedOn(DWORD dwfDriverType, LPBOOL lpfSharingOn);
  149. //*******************************************************************
  150. //
  151. // FUNCTION: IcfgTurnOffFileSharing
  152. //
  153. // PURPOSE: Unbinds file server (VSERVER) from TCP/IP for
  154. // specified driver type (net card or PPP).
  155. //
  156. // PARAMETERS: dwfDriverType - a combination of DRIVERTYPE_ flags
  157. // that specify what driver type to remove server-TCP/IP
  158. // bindings for as follows:
  159. //
  160. // DRIVERTYPE_NET - net card
  161. // DRIVERTYPE_PPP - PPPMAC
  162. //
  163. // RETURNS: HRESULT code, ERROR_SUCCESS if no errors occurred
  164. //
  165. //*******************************************************************
  166. HRESULT WINAPI IcfgTurnOffFileSharing(DWORD dwfDriverType, HWND hwndParent);
  167. //*******************************************************************
  168. //*******************************************************************
  169. HRESULT WINAPI InetSetAutodial(BOOL fEnable, LPCSTR lpszEntryName);
  170. //*******************************************************************
  171. //*******************************************************************
  172. HRESULT WINAPI InetGetAutodial(LPBOOL lpfEnable, LPSTR lpszEntryName,
  173. DWORD cbEntryName);
  174. //*******************************************************************
  175. //*******************************************************************
  176. HRESULT WINAPI InetSetAutodialAddress();
  177. //*******************************************************************
  178. //*******************************************************************
  179. HRESULT WINAPI InetGetSupportedPlatform(LPDWORD pdwPlatform);
  180. //*******************************************************************
  181. //*******************************************************************
  182. HRESULT WINAPI IcfgStartServices();
  183. #ifdef __cplusplus
  184. }
  185. #endif // __cplusplus
  186. #endif //_CFGAPI_H_