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.

302 lines
9.8 KiB

  1. //*******************************************************************
  2. //
  3. // Copyright (c) 1996-1998 Microsoft Corporation
  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. //
  23. // ChrisK 5/8/97
  24. // Note: the next three switches are only valid for IcfgNeedInetComponet
  25. // check to see if a LAN adapter with TCP bound is installed
  26. //
  27. #define ICFG_INSTALLLAN 0x00000008
  28. //
  29. // Check to see if a DIALUP adapter with TCP bound is installed
  30. //
  31. #define ICFG_INSTALLDIALUP 0x00000010
  32. //
  33. // Check to see if TCP is installed
  34. //
  35. #define ICFG_INSTALLTCPONLY 0x00000020
  36. // DRIVERTYPE_ defines for TCP/IP configuration apis
  37. #define DRIVERTYPE_NET 0x0001
  38. #define DRIVERTYPE_PPP 0x0002
  39. #ifdef __cplusplus
  40. extern "C"
  41. {
  42. #endif // __cplusplus
  43. //*******************************************************************
  44. //
  45. // FUNCTION: IcfgNeedInetComponents
  46. //
  47. // PURPOSE: Detects whether the specified system components are
  48. // installed or not.
  49. //
  50. // PARAMETERS: dwfOptions - a combination of ICFG_ flags that specify
  51. // which components to detect as follows:
  52. //
  53. // ICFG_INSTALLTCP - is TCP/IP needed?
  54. // ICFG_INSTALLRAS - is RAS needed?
  55. // ICFG_INSTALLMAIL - is exchange or internet mail needed?
  56. //
  57. // lpfNeedComponents - TRUE if any specified component needs
  58. // to be installed.
  59. //
  60. // RETURNS: HRESULT code, ERROR_SUCCESS if no errors occurred
  61. //
  62. //*******************************************************************
  63. HRESULT IcfgNeedInetComponents(DWORD dwfOptions, LPBOOL lpfNeedComponents);
  64. HRESULT IcfgNeedInetComponentsNT4(DWORD dwfOptions, LPBOOL lpfNeedComponents);
  65. HRESULT IcfgNeedInetComponentsNT5(DWORD dwfOptions, LPBOOL lpfNeedComponents);
  66. //*******************************************************************
  67. //
  68. // FUNCTION: IcfgInstallInetComponents
  69. //
  70. // PURPOSE: Install the specified system components.
  71. //
  72. // PARAMETERS: hwndParent - Parent window handle.
  73. // dwfOptions - a combination of ICFG_ flags that controls
  74. // the installation and configuration as follows:
  75. //
  76. // ICFG_INSTALLTCP - install TCP/IP (if needed)
  77. // ICFG_INSTALLRAS - install RAS (if needed)
  78. // ICFG_INSTALLMAIL - install exchange and internet mail
  79. //
  80. // lpfNeedsRestart - if non-NULL, then on return, this will be
  81. // TRUE if windows must be restarted to complete the installation.
  82. //
  83. // RETURNS: HRESULT code, ERROR_SUCCESS if no errors occurred
  84. //
  85. //*******************************************************************
  86. HRESULT IcfgInstallInetComponents(HWND hwndParent, DWORD dwfOptions,
  87. LPBOOL lpfNeedsRestart);
  88. HRESULT IcfgInstallInetComponentsNT4(HWND hwndParent, DWORD dwfOptions,
  89. LPBOOL lpfNeedsRestart);
  90. HRESULT IcfgInstallInetComponentsNT5(HWND hwndParent, DWORD dwfOptions,
  91. LPBOOL lpfNeedsRestart);
  92. //+----------------------------------------------------------------------------
  93. //
  94. // Function: IcfgNeedModem
  95. //
  96. // Synopsis: Check system configuration to determine if there is at least
  97. // one physical modem installed
  98. //
  99. // Arguments: dwfOptions - currently not used
  100. //
  101. // Returns: HRESULT - S_OK if successfull
  102. // lpfNeedModem - TRUE if no modems are available
  103. //
  104. // History: 6/5/97 ChrisK Inherited
  105. //
  106. //-----------------------------------------------------------------------------
  107. HRESULT IcfgNeedModem(DWORD dwfOptions, LPBOOL lpfNeedModem);
  108. HRESULT IcfgNeedModemNT4(DWORD dwfOptions, LPBOOL lpfNeedModem) ;
  109. HRESULT IcfgNeedModemNT5(DWORD dwfOptions, LPBOOL lpfNeedModem) ;
  110. //+----------------------------------------------------------------------------
  111. //
  112. // Function: IcfgNeedModem
  113. //
  114. // Synopsis: Check system configuration to determine if there is at least
  115. // one physical modem installed
  116. //
  117. // Arguments: dwfOptions - currently not used
  118. //
  119. // Returns: HRESULT - S_OK if successfull
  120. // lpfNeedModem - TRUE if no modems are available
  121. //
  122. // History: 6/5/97 ChrisK Inherited
  123. //
  124. //-----------------------------------------------------------------------------
  125. HRESULT IcfgInstallModem (HWND hwndParent, DWORD dwfOptions,
  126. LPBOOL lpfNeedsStart);
  127. HRESULT IcfgInstallModemNT4 (HWND hwndParent, DWORD dwfOptions,
  128. LPBOOL lpfNeedsStart);
  129. HRESULT IcfgInstallModemNT5 (HWND hwndParent, DWORD dwfOptions,
  130. LPBOOL lpfNeedsStart);
  131. //*******************************************************************
  132. //
  133. // FUNCTION: IcfgGetLastInstallErrorText
  134. //
  135. // PURPOSE: Get a text string that describes the last installation
  136. // error that occurred. The string should be suitable
  137. // for display in a message box with no further formatting.
  138. //
  139. // PARAMETERS: lpszErrorDesc - points to buffer to receive the string.
  140. // cbErrorDesc - size of buffer.
  141. //
  142. // RETURNS: The length of the string returned.
  143. //
  144. //*******************************************************************
  145. DWORD IcfgGetLastInstallErrorText(LPSTR lpszErrorDesc, DWORD cbErrorDesc);
  146. //*******************************************************************
  147. //
  148. // FUNCTION: IcfgSetInstallSourcePath
  149. //
  150. // PURPOSE: Sets the path where windows looks when installing files.
  151. //
  152. // PARAMETERS: lpszSourcePath - full path of location of files to install.
  153. // If this is NULL, default path is used.
  154. //
  155. // RETURNS: HRESULT code, ERROR_SUCCESS if no errors occurred
  156. //
  157. //*******************************************************************
  158. HRESULT IcfgSetInstallSourcePath(LPCSTR lpszSourcePath);
  159. //*******************************************************************
  160. //
  161. // FUNCTION: IcfgIsGlobalDNS
  162. //
  163. // PURPOSE: Determines whether there is Global DNS set.
  164. //
  165. // PARAMETERS: lpfGlobalDNS - TRUE if global DNS is set, FALSE otherwise.
  166. //
  167. // RETURNS: HRESULT code, ERROR_SUCCESS if no errors occurred
  168. // NOTE: This function is for Windows 95 only, and
  169. // should always return ERROR_SUCCESS and set lpfGlobalDNS
  170. // to FALSE in Windows NT.
  171. //
  172. //*******************************************************************
  173. HRESULT IcfgIsGlobalDNS(LPBOOL lpfGlobalDNS);
  174. //*******************************************************************
  175. //
  176. // FUNCTION: IcfgRemoveGlobalDNS
  177. //
  178. // PURPOSE: Removes global DNS info from registry.
  179. //
  180. // PARAMETERS: None.
  181. //
  182. // RETURNS: HRESULT code, ERROR_SUCCESS if no errors occurred
  183. // NOTE: This function is for Windows 95 only, and
  184. // should always return ERROR_SUCCESS in Windows NT.
  185. //
  186. //*******************************************************************
  187. HRESULT IcfgRemoveGlobalDNS(void);
  188. //*******************************************************************
  189. //
  190. // FUNCTION: IcfgIsFileSharingTurnedOn
  191. //
  192. // PURPOSE: Determines if file server (VSERVER) is bound to TCP/IP
  193. // for specified driver type (net card or PPP).
  194. //
  195. // PARAMETERS: dwfDriverType - a combination of DRIVERTYPE_ flags
  196. // that specify what driver type to check server-TCP/IP
  197. // bindings for as follows:
  198. //
  199. // DRIVERTYPE_NET - net card
  200. // DRIVERTYPE_PPP - PPPMAC
  201. //
  202. // lpfSharingOn - TRUE if bound once or more, FALSE if not bound
  203. //
  204. // RETURNS: HRESULT code, ERROR_SUCCESS if no errors occurred
  205. //
  206. //*******************************************************************
  207. HRESULT IcfgIsFileSharingTurnedOn(DWORD dwfDriverType, LPBOOL lpfSharingOn);
  208. //*******************************************************************
  209. //
  210. // FUNCTION: IcfgTurnOffFileSharing
  211. //
  212. // PURPOSE: Unbinds file server (VSERVER) from TCP/IP for
  213. // specified driver type (net card or PPP).
  214. //
  215. // PARAMETERS: dwfDriverType - a combination of DRIVERTYPE_ flags
  216. // that specify what driver type to remove server-TCP/IP
  217. // bindings for as follows:
  218. //
  219. // DRIVERTYPE_NET - net card
  220. // DRIVERTYPE_PPP - PPPMAC
  221. //
  222. // RETURNS: HRESULT code, ERROR_SUCCESS if no errors occurred
  223. //
  224. //*******************************************************************
  225. HRESULT IcfgTurnOffFileSharing(DWORD dwfDriverType, HWND hwndParent);
  226. VOID GetSETUPXErrorText(DWORD dwErr,LPSTR pszErrorDesc,DWORD cbErrorDesc);
  227. UINT DoGenInstall(HWND hwndParent,LPCSTR lpszInfFile,LPCSTR lpszInfSect);
  228. //*******************************************************************
  229. //*******************************************************************
  230. HRESULT InetSetAutodial(BOOL fEnable, LPCSTR lpszEntryName);
  231. //*******************************************************************
  232. //*******************************************************************
  233. HRESULT InetGetAutodial(LPBOOL lpfEnable, LPSTR lpszEntryName,
  234. DWORD cbEntryName);
  235. //*******************************************************************
  236. //*******************************************************************
  237. HRESULT InetSetAutodialAddress();
  238. //*******************************************************************
  239. //*******************************************************************
  240. HRESULT InetGetSupportedPlatform(LPDWORD pdwPlatform);
  241. //*******************************************************************
  242. //*******************************************************************
  243. HRESULT IcfgStartServices();
  244. #ifdef __cplusplus
  245. }
  246. #endif // __cplusplus
  247. #endif //_CFGAPI_H_