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.

288 lines
9.3 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows NT5.0
  4. // Copyright (C) Microsoft Corporation, 1997-1999.
  5. //
  6. // File: O E M U P G E X . H
  7. //
  8. // Contents: Function prototypes needed for OEM network upgrade
  9. //
  10. // Notes: These functions are obsolete for Windows XP (SP1 and later),
  11. // Windows .NET Server, and later operating systems.
  12. //
  13. //----------------------------------------------------------------------------
  14. #ifndef __OEMUPGEX_H__
  15. #define __OEMUPGEX_H__
  16. #if _MSC_VER > 1000
  17. #pragma once
  18. #endif
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. #ifndef WINNT32P_H
  23. typedef enum {
  24. UNKNOWN,
  25. NT_WORKSTATION,
  26. NT_SERVER
  27. } PRODUCTTYPE;
  28. #endif
  29. typedef struct
  30. {
  31. PRODUCTTYPE ProductType;
  32. DWORD dwBuildNumber;
  33. } ProductInfo;
  34. typedef struct
  35. {
  36. ProductInfo From;
  37. ProductInfo To;
  38. } NetUpgradeInfo;
  39. typedef struct
  40. {
  41. WCHAR szCompanyName[256];
  42. WCHAR szSupportNumber[256];
  43. WCHAR szSupportUrl[256];
  44. WCHAR szInstructionsToUser[1024];
  45. } VENDORINFO;
  46. const DWORD c_dwMaxProductIdLen = 255;
  47. const DWORD NUA_LOAD_POST_UPGRADE = 0x0001;
  48. const DWORD NUA_REQUEST_ABORT_UPGRADE = 0x0002;
  49. const DWORD NUA_ABORT_UPGRADE = 0x0004;
  50. const DWORD NUA_SKIP_INSTALL_IN_GUI_MODE = 0x80000L;
  51. typedef struct
  52. {
  53. LPTSTR mszServicesNotToBeDeleted;
  54. } NetUpgradeData;
  55. // Names of functions exported from OEM DLL
  56. //
  57. #define c_szPreUpgradeInitialize "PreUpgradeInitialize"
  58. #define c_szDoPreUpgradeProcessing "DoPreUpgradeProcessing"
  59. #define c_szPostUpgradeInitialize "PostUpgradeInitialize"
  60. #define c_szDoPostUpgradeProcessing "DoPostUpgradeProcessing"
  61. // Names of functions exported from netupgrd.dll
  62. //
  63. #define c_szNetUpgradeAddSection "NetUpgradeAddSection"
  64. #define c_szNetUpgradeAddLineToSection "NetUpgradeAddLineToSection"
  65. // Keys in OemSection
  66. //
  67. #define c_szInfToRunBeforeInstall TEXT("InfToRunBeforeInstall")
  68. #define c_szInfToRunAfterInstall TEXT("InfToRunAfterInstall")
  69. //
  70. // Prototypes for functions exported from OEM DLL
  71. //
  72. //+---------------------------------------------------------------------------
  73. //
  74. // Function: PreUpgradeInitialize
  75. //
  76. // Purpose: Intialize OEM DLL
  77. //
  78. // Arguments:
  79. // szWorkingDir [in] name of temporary directory to be used
  80. // pNetUpgradeInfo [in] pointer to NetUpgradeInfo structure
  81. // pviVendorInfo [out] information about OEM
  82. // pdwFlags [out] pointer to flags
  83. // pNetUpgradeData [out] pointer to NetUpgradeData structure
  84. //
  85. // Returns: ERROR_SUCCESS in case of success, win32 error otherwise
  86. //
  87. // Notes:
  88. // This function is obsolete for Windows XP (SP1 and later),
  89. // Windows .NET Server, and later operating systems.
  90. //
  91. // This function is called before any other function in this dll.
  92. // The main purpose of calling this function is to obtain
  93. // identification information and to allow the DLL to initialize
  94. // its internal data
  95. //
  96. LONG __stdcall
  97. PreUpgradeInitialize(IN LPCTSTR szWorkingDir,
  98. IN NetUpgradeInfo* pNetUpgradeInfo,
  99. OUT VENDORINFO* pviVendorInfo,
  100. OUT DWORD* pdwFlags,
  101. OUT NetUpgradeData* pNetUpgradeData);
  102. typedef LONG
  103. (__stdcall *PreUpgradeInitializePrototype)
  104. (IN LPCTSTR szWorkingDir,
  105. IN NetUpgradeInfo* pNetUpgradeInfo,
  106. OUT VENDORINFO* pviVendorInfo,
  107. OUT DWORD* pdwFlags,
  108. OUT NetUpgradeData* pNetUpgradeData);
  109. //+---------------------------------------------------------------------------
  110. //
  111. // Function: DoPreUpgradeProcessing
  112. //
  113. // Purpose: Intialize OEM DLL
  114. //
  115. // Arguments:
  116. // hParentWindow [in] window handle for showing UI
  117. // hkeyParams [in] handle to parameters key in registry
  118. // szPreNT5InfId [in] pre-NT5 InfID
  119. // szPreNT5Instance [in] pre-NT5 instance name
  120. // szNT5InfId [in] NT5 InfId
  121. // szSectionName [in] section name to be used for writing info
  122. // pviVendorInfo [out] information about OEM
  123. // pdwFlags [out] pointer to flags
  124. // pvReserved [in] reserved
  125. //
  126. // Returns: ERROR_SUCCESS in case of success, win32 error otherwise
  127. //
  128. // Notes:
  129. // This function is obsolete for Windows XP (SP1 and later),
  130. // Windows .NET Server, and later operating systems.
  131. //
  132. // This function is called once per component to be upgraded.
  133. //
  134. LONG __stdcall
  135. DoPreUpgradeProcessing(IN HWND hParentWindow,
  136. IN HKEY hkeyParams,
  137. IN LPCTSTR szPreNT5InfId,
  138. IN LPCTSTR szPreNT5Instance,
  139. IN LPCTSTR szNT5InfId,
  140. IN LPCTSTR szSectionName,
  141. OUT VENDORINFO* pviVendorInfo,
  142. OUT DWORD* pdwFlags,
  143. IN LPVOID pvReserved);
  144. typedef LONG
  145. (__stdcall *DoPreUpgradeProcessingPrototype)
  146. (IN HWND hParentWindow,
  147. IN HKEY hkeyParams,
  148. IN LPCTSTR szPreNT5InfId,
  149. IN LPCTSTR szPreNT5Instance,
  150. IN LPCTSTR szNT5InfId,
  151. IN LPCTSTR szSectionName,
  152. OUT VENDORINFO* pviVendorInfo,
  153. OUT DWORD* pdwFlags,
  154. IN LPVOID pvReserved);
  155. //+---------------------------------------------------------------------------
  156. //
  157. // Function: PostUpgradeInitialize
  158. //
  159. // Purpose: Intialize OEM DLL during GUI mode setup
  160. //
  161. // Arguments:
  162. // szWorkingDir [in] name of temporary directory to be used
  163. // pNetUpgradeInfo [in] pointer to NetUpgradeInfo structure
  164. // pviVendorInfo [out] information about OEM
  165. // pvReserved [out] reserved
  166. //
  167. // Returns: ERROR_SUCCESS in case of success, win32 error otherwise
  168. //
  169. // Notes:
  170. // This function is obsolete for Windows XP (SP1 and later),
  171. // Windows .NET Server, and later operating systems.
  172. //
  173. // This function is called in GUI mode setup before
  174. // any other function in this dll .
  175. // The main purpose of calling this function is to obtain
  176. // identification information and to allow the DLL to initialize
  177. // its internal data
  178. //
  179. LONG __stdcall
  180. PostUpgradeInitialize(IN LPCTSTR szWorkingDir,
  181. IN NetUpgradeInfo* pNetUpgradeInfo,
  182. OUT VENDORINFO* pviVendorInfo,
  183. OUT LPVOID pvReserved);
  184. typedef LONG
  185. (__stdcall *PostUpgradeInitializePrototype)
  186. (IN LPCTSTR szWorkingDir,
  187. IN NetUpgradeInfo* pNetUpgradeInfo,
  188. OUT VENDORINFO* pviVendorInfo,
  189. OUT LPVOID pvReserved);
  190. //+---------------------------------------------------------------------------
  191. //
  192. // Function: DoPostUpgradeProcessing
  193. //
  194. // Purpose: Intialize OEM DLL
  195. //
  196. // Arguments:
  197. // hParentWindow [in] window handle for showing UI
  198. // hkeyParams [in] handle to parameters key in registry
  199. // szPreNT5Instance [in] pre-NT5 instance name
  200. // szNT5InfId [in] NT5 InfId
  201. // hinfAnswerFile [in] handle to answer-file
  202. // szSectionName [in] name of section having component parameters
  203. // pviVendorInfo [out] information about OEM
  204. // pvReserved [in] reserved
  205. //
  206. // Returns: ERROR_SUCCESS in case of success, win32 error otherwise
  207. //
  208. // Notes:
  209. // This function is obsolete for Windows XP (SP1 and later),
  210. // Windows .NET Server, and later operating systems.
  211. //
  212. // This function is called once per component upgraded.
  213. //
  214. LONG __stdcall
  215. DoPostUpgradeProcessing(IN HWND hParentWindow,
  216. IN HKEY hkeyParams,
  217. IN LPCTSTR szPreNT5Instance,
  218. IN LPCTSTR szNT5InfId,
  219. IN HINF hinfAnswerFile,
  220. IN LPCTSTR szSectionName,
  221. OUT VENDORINFO* pviVendorInfo,
  222. IN LPVOID pvReserved);
  223. typedef LONG
  224. (__stdcall *DoPostUpgradeProcessingPrototype)
  225. (IN HWND hParentWindow,
  226. IN HKEY hkeyParams,
  227. IN LPCTSTR szPreNT5Instance,
  228. IN LPCTSTR szNT5InfId,
  229. IN HINF hinfAnswerFile,
  230. IN LPCTSTR szSectionName,
  231. OUT VENDORINFO* pviVendorInfo,
  232. IN LPVOID pvReserved);
  233. //
  234. // Prototypes for functions exported by netupgrd.dll
  235. //
  236. //
  237. // These functions are obsolete for Windows XP (SP1 and later),
  238. // Windows .NET Server, and later operating systems.
  239. DECLSPEC_DEPRECATED LONG __stdcall
  240. NetUpgradeAddSection(IN LPCTSTR szSectionName);
  241. typedef DECLSPEC_DEPRECATED LONG
  242. (__stdcall *NetUpgradeAddSectionPrototype) (IN LPCTSTR szSectionName);
  243. DECLSPEC_DEPRECATED LONG __stdcall
  244. NetUpgradeAddLineToSection(IN LPCTSTR szSectionName,
  245. IN LPCTSTR szLine);
  246. typedef DECLSPEC_DEPRECATED LONG
  247. (__stdcall *NetUpgradeAddLineToSectionPrototype) (IN LPCTSTR szSectionName,
  248. IN LPCTSTR szLine);
  249. #ifdef __cplusplus
  250. }
  251. #endif
  252. #endif // __OEMUPGEX_H__