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.

227 lines
7.3 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. //
  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 WINAPI IcfgNeedInetComponents(DWORD dwfOptions, LPBOOL lpfNeedComponents);
  64. //*******************************************************************
  65. //
  66. // FUNCTION: IcfgInstallInetComponents
  67. //
  68. // PURPOSE: Install the specified system components.
  69. //
  70. // PARAMETERS: hwndParent - Parent window handle.
  71. // dwfOptions - a combination of ICFG_ flags that controls
  72. // the installation and configuration as follows:
  73. //
  74. // ICFG_INSTALLTCP - install TCP/IP (if needed)
  75. // ICFG_INSTALLRAS - install RAS (if needed)
  76. // ICFG_INSTALLMAIL - install exchange and internet mail
  77. //
  78. // lpfNeedsRestart - if non-NULL, then on return, this will be
  79. // TRUE if windows must be restarted to complete the installation.
  80. //
  81. // RETURNS: HRESULT code, ERROR_SUCCESS if no errors occurred
  82. //
  83. //*******************************************************************
  84. HRESULT WINAPI IcfgInstallInetComponents(HWND hwndParent, DWORD dwfOptions,
  85. LPBOOL lpfNeedsRestart);
  86. //*******************************************************************
  87. //
  88. // FUNCTION: IcfgGetLastInstallErrorText
  89. //
  90. // PURPOSE: Get a text string that describes the last installation
  91. // error that occurred. The string should be suitable
  92. // for display in a message box with no further formatting.
  93. //
  94. // PARAMETERS: lpszErrorDesc - points to buffer to receive the string.
  95. // cbErrorDesc - size of buffer.
  96. //
  97. // RETURNS: The length of the string returned.
  98. //
  99. //*******************************************************************
  100. DWORD WINAPI IcfgGetLastInstallErrorText(LPSTR lpszErrorDesc, DWORD cbErrorDesc);
  101. //*******************************************************************
  102. //
  103. // FUNCTION: IcfgSetInstallSourcePath
  104. //
  105. // PURPOSE: Sets the path where windows looks when installing files.
  106. //
  107. // PARAMETERS: lpszSourcePath - full path of location of files to install.
  108. // If this is NULL, default path is used.
  109. //
  110. // RETURNS: HRESULT code, ERROR_SUCCESS if no errors occurred
  111. //
  112. //*******************************************************************
  113. HRESULT WINAPI IcfgSetInstallSourcePath(LPCSTR lpszSourcePath);
  114. //*******************************************************************
  115. //
  116. // FUNCTION: IcfgIsGlobalDNS
  117. //
  118. // PURPOSE: Determines whether there is Global DNS set.
  119. //
  120. // PARAMETERS: lpfGlobalDNS - TRUE if global DNS is set, FALSE otherwise.
  121. //
  122. // RETURNS: HRESULT code, ERROR_SUCCESS if no errors occurred
  123. // NOTE: This function is for Windows 95 only, and
  124. // should always return ERROR_SUCCESS and set lpfGlobalDNS
  125. // to FALSE in Windows NT.
  126. //
  127. //*******************************************************************
  128. HRESULT WINAPI IcfgIsGlobalDNS(LPBOOL lpfGlobalDNS);
  129. //*******************************************************************
  130. //
  131. // FUNCTION: IcfgRemoveGlobalDNS
  132. //
  133. // PURPOSE: Removes global DNS info from registry.
  134. //
  135. // PARAMETERS: None.
  136. //
  137. // RETURNS: HRESULT code, ERROR_SUCCESS if no errors occurred
  138. // NOTE: This function is for Windows 95 only, and
  139. // should always return ERROR_SUCCESS in Windows NT.
  140. //
  141. //*******************************************************************
  142. HRESULT WINAPI IcfgRemoveGlobalDNS(void);
  143. //*******************************************************************
  144. //
  145. // FUNCTION: IcfgIsFileSharingTurnedOn
  146. //
  147. // PURPOSE: Determines if file server (VSERVER) is bound to TCP/IP
  148. // for specified driver type (net card or PPP).
  149. //
  150. // PARAMETERS: dwfDriverType - a combination of DRIVERTYPE_ flags
  151. // that specify what driver type to check server-TCP/IP
  152. // bindings for as follows:
  153. //
  154. // DRIVERTYPE_NET - net card
  155. // DRIVERTYPE_PPP - PPPMAC
  156. //
  157. // lpfSharingOn - TRUE if bound once or more, FALSE if not bound
  158. //
  159. // RETURNS: HRESULT code, ERROR_SUCCESS if no errors occurred
  160. //
  161. //*******************************************************************
  162. HRESULT WINAPI IcfgIsFileSharingTurnedOn(DWORD dwfDriverType, LPBOOL lpfSharingOn);
  163. //*******************************************************************
  164. //
  165. // FUNCTION: IcfgTurnOffFileSharing
  166. //
  167. // PURPOSE: Unbinds file server (VSERVER) from TCP/IP for
  168. // specified driver type (net card or PPP).
  169. //
  170. // PARAMETERS: dwfDriverType - a combination of DRIVERTYPE_ flags
  171. // that specify what driver type to remove server-TCP/IP
  172. // bindings for as follows:
  173. //
  174. // DRIVERTYPE_NET - net card
  175. // DRIVERTYPE_PPP - PPPMAC
  176. //
  177. // RETURNS: HRESULT code, ERROR_SUCCESS if no errors occurred
  178. //
  179. //*******************************************************************
  180. HRESULT WINAPI IcfgTurnOffFileSharing(DWORD dwfDriverType, HWND hwndParent);
  181. VOID GetSETUPXErrorText(DWORD dwErr,LPSTR pszErrorDesc,DWORD cbErrorDesc);
  182. RETERR DoGenInstall(HWND hwndParent,LPCSTR lpszInfFile,LPCSTR lpszInfSect);
  183. #ifdef __cplusplus
  184. }
  185. #endif // __cplusplus
  186. #endif //_CFGAPI_H_