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.

571 lines
13 KiB

  1. // This header can go away once the types in oc.h are fixed to support
  2. // ansi and unicode at the same time.
  3. #ifndef UNICODE
  4. #define POC_FILL_IN_SETUP_DATA_PROC_W ULONG_PTR
  5. #endif
  6. typedef struct _deb_OCM_CLIENT_CALLBACKSW {
  7. //
  8. // Routine to fill in the setup data structure that provides info
  9. // about the environment in which the OC Manager is running.
  10. //
  11. POC_FILL_IN_SETUP_DATA_PROC_A FillInSetupDataA;
  12. //
  13. // Routine to log an error.
  14. //
  15. POC_LOG_ERROR LogError;
  16. //
  17. // Routine to indicate need to reboot
  18. //
  19. POC_SET_REBOOT_PROC SetReboot;
  20. POC_FILL_IN_SETUP_DATA_PROC_W FillInSetupDataW;
  21. } deb_OCM_CLIENT_CALLBACKSW, *deb_POCM_CLIENT_CALLBACKSW;
  22. typedef struct _deb_OCM_CLIENT_CALLBACKSA {
  23. //
  24. // Routine to fill in the setup data structure that provides info
  25. // about the environment in which the OC Manager is running.
  26. //
  27. POC_FILL_IN_SETUP_DATA_PROC_A FillInSetupDataA;
  28. //
  29. // Routine to log an error.
  30. //
  31. POC_LOG_ERROR LogError;
  32. //
  33. // Routine to indicate need to reboot
  34. //
  35. POC_SET_REBOOT_PROC SetReboot;
  36. } deb_OCM_CLIENT_CALLBACKSA, *deb_POCM_CLIENT_CALLBACKSA;
  37. typedef struct _deb_OPTIONAL_COMPONENTA {
  38. //
  39. // String id of name of inf file in the OC Manager's
  40. // InfListStringTable string table. If -1, then
  41. // the subcomponent does not appear on the OC page.
  42. //
  43. LONG InfStringId;
  44. //
  45. // Backpointer to top level component
  46. //
  47. LONG TopLevelStringId;
  48. //
  49. // String id of parent component, -1 if none.
  50. //
  51. LONG ParentStringId;
  52. //
  53. // String id of first child, -1 if none.
  54. //
  55. LONG FirstChildStringId;
  56. //
  57. // Count of children.
  58. //
  59. UINT ChildrenCount;
  60. //
  61. // String id of next sibling, -1 if none.
  62. //
  63. LONG NextSiblingStringId;
  64. //
  65. // String ids of needs and needed by.
  66. //
  67. PLONG NeedsStringIds;
  68. UINT NeedsCount;
  69. PLONG NeededByStringIds;
  70. UINT NeededByCount;
  71. // String ids of exclude and excluded by
  72. PLONG ExcludeStringIds;
  73. UINT ExcludeCount;
  74. PLONG ExcludedByStringIds;
  75. UINT ExcludedByCount;
  76. //
  77. // Misc flags.
  78. //
  79. UINT InternalFlags;
  80. //
  81. // Approximation of required disk space.
  82. //
  83. LONGLONG SizeApproximation;
  84. //
  85. // Icon index of the component.
  86. // -1 means we're supposed to get it from the component itself.
  87. // -2 means we're supposed to use IconDll and IconResource
  88. //
  89. UINT IconIndex;
  90. CHAR IconDll[MAX_PATH];
  91. CHAR IconResource[50];
  92. //
  93. // Selection state (SELSTATE_xxx constants).
  94. //
  95. UINT SelectionState;
  96. UINT OriginalSelectionState;
  97. // Installation Flag as obtained from the inf
  98. UINT InstalledState;
  99. //
  100. // Mode bits.
  101. //
  102. UINT ModeBits;
  103. //
  104. // Human-readable stuff describing the component.
  105. //
  106. CHAR Description[MAXOCDESC];
  107. CHAR Tip[MAXOCTIP];
  108. //
  109. // From here down, stuff is meaningful only for top-level components.
  110. //
  111. //
  112. // Stuff describing the OC's installation DLL and how to call it.
  113. //
  114. CHAR InstallationDllName[MAX_PATH];
  115. CHAR InterfaceFunctionName[MAX_PATH];
  116. HMODULE InstallationDll;
  117. POCSETUPPROC InstallationRoutine;
  118. //
  119. // Version of the OC Manager to which this component was written.
  120. //
  121. UINT ExpectedVersion;
  122. // this flag indicates whether the subcomponent was intialialized
  123. BOOL Exists;
  124. //
  125. // Flags: ANSI/Unicode, etc.
  126. //
  127. UINT Flags;
  128. } deb_OPTIONAL_COMPONENTA, *deb_POPTIONAL_COMPONENTA;
  129. //
  130. // locale info
  131. //
  132. typedef struct _deb_LOCALEA {
  133. LCID lcid;
  134. CHAR DecimalSeparator[4];
  135. } deb_LOCALEA, *deb_PLOCALEA;
  136. //
  137. // Define structure corresponding to an instance of the OC Manager.
  138. // This is actually somewhat broken, in that this actually closely corresponds
  139. // to a master OC INF, and we might want to consider breaking out the string
  140. // tables into another structure, so we can more easily achieve a unified
  141. // namespace if we have multiple master OC INFs at play simultaneously.
  142. //
  143. typedef struct _deb_OC_MANAGERA {
  144. //
  145. // Callbacks into OC Manaer client.
  146. //
  147. deb_OCM_CLIENT_CALLBACKSA Callbacks;
  148. //
  149. // Handle of Master OC INF.
  150. //
  151. HINF MasterOcInf;
  152. //
  153. // unattended inf handle
  154. //
  155. HINF UnattendedInf;
  156. //
  157. // Master OC Inf file, and unattended file
  158. //
  159. CHAR MasterOcInfPath[MAX_PATH];
  160. CHAR UnattendedInfPath[MAX_PATH];
  161. // we run from whatever directory the master inf is in
  162. CHAR SourceDir[MAX_PATH];
  163. //
  164. // Name of "suite" -- in other words, a shortname that
  165. // is unique to the master OC inf that this structure represents.
  166. // We base it on the name of the master OC inf itself.
  167. //
  168. CHAR SuiteName[MAX_PATH];
  169. //
  170. // page titles
  171. //
  172. CHAR SetupPageTitle[MAX_PATH];
  173. // window title
  174. CHAR WindowTitle[MAX_PATH];
  175. //
  176. // List of per-component OC INFs currently loaded.
  177. // Each inf's name is in the string table and the extra data
  178. // for each is an OC_INF structure.
  179. //
  180. PVOID InfListStringTable;
  181. //
  182. // String table for names of all components and subcomponents.
  183. // Extra data for each is an OPTIONAL_COMPONENT structure.
  184. //
  185. PVOID ComponentStringTable;
  186. //
  187. // pointer to OcSetupPage structure so we can free this data
  188. // if the user cancels before we get to the wizard page.
  189. //
  190. PVOID OcSetupPage;
  191. //
  192. // Setup mode (custom, typical, etc)
  193. //
  194. UINT SetupMode;
  195. //
  196. // List of top-level optional component string IDs.
  197. // This is necessary because we need to preserve ordering
  198. // from the master OC Inf.
  199. //
  200. UINT TopLevelOcCount;
  201. PLONG TopLevelOcStringIds;
  202. UINT TopLevelParentOcCount;
  203. PLONG TopLevelParentOcStringIds;
  204. //
  205. // Are there subcomponents on the details page?
  206. //
  207. BOOL SubComponentsPresent;
  208. //
  209. // Each element in this array points to an array that
  210. // gives ordering for querying wizard pages from the optional components.
  211. //
  212. PLONG WizardPagesOrder[WizPagesTypeMax];
  213. //
  214. // Subkey relative to szPrivateDataRoot where private
  215. // data for components plugged into the OC will live.
  216. // 2 8-char DWORD representations plus a separator and nul.
  217. //
  218. CHAR PrivateDataSubkey[18];
  219. HKEY hKeyPrivateData;
  220. HKEY hKeyPrivateDataRoot;
  221. //
  222. // If we are completing installation, this item is the window handle
  223. // of the progress text control.
  224. //
  225. HWND ProgressTextWindow;
  226. //
  227. // String id of component currently processing an interface routine.
  228. // -1 means the OC manager is not currently processing one.
  229. //
  230. LONG CurrentComponentStringId;
  231. // Component Ids of aborted components
  232. LONG *AbortedComponentIds;
  233. UINT AbortedCount;
  234. //
  235. // Various flags
  236. //
  237. UINT InternalFlags;
  238. //
  239. // setup data
  240. //
  241. SETUP_DATA SetupData;
  242. } deb_OC_MANAGERA, *deb_POC_MANAGERA;
  243. typedef struct _deb_OPTIONAL_COMPONENTW {
  244. //
  245. // String id of name of inf file in the OC Manager's
  246. // InfListStringTable string table. If -1, then
  247. // the subcomponent does not appear on the OC page.
  248. //
  249. LONG InfStringId;
  250. //
  251. // Backpointer to top level component
  252. //
  253. LONG TopLevelStringId;
  254. //
  255. // String id of parent component, -1 if none.
  256. //
  257. LONG ParentStringId;
  258. //
  259. // String id of first child, -1 if none.
  260. //
  261. LONG FirstChildStringId;
  262. //
  263. // Count of children.
  264. //
  265. UINT ChildrenCount;
  266. //
  267. // String id of next sibling, -1 if none.
  268. //
  269. LONG NextSiblingStringId;
  270. //
  271. // String ids of needs and needed by.
  272. //
  273. PLONG NeedsStringIds;
  274. UINT NeedsCount;
  275. PLONG NeededByStringIds;
  276. UINT NeededByCount;
  277. // String ids of exclude and excluded by
  278. PLONG ExcludeStringIds;
  279. UINT ExcludeCount;
  280. PLONG ExcludedByStringIds;
  281. UINT ExcludedByCount;
  282. //
  283. // Misc flags.
  284. //
  285. UINT InternalFlags;
  286. //
  287. // Approximation of required disk space.
  288. //
  289. LONGLONG SizeApproximation;
  290. //
  291. // Icon index of the component.
  292. // -1 means we're supposed to get it from the component itself.
  293. // -2 means we're supposed to use IconDll and IconResource
  294. //
  295. UINT IconIndex;
  296. WCHAR IconDll[MAX_PATH];
  297. WCHAR IconResource[50];
  298. //
  299. // Selection state (SELSTATE_xxx constants).
  300. //
  301. UINT SelectionState;
  302. UINT OriginalSelectionState;
  303. // Installation Flag as obtained from the inf
  304. UINT InstalledState;
  305. //
  306. // Mode bits.
  307. //
  308. UINT ModeBits;
  309. //
  310. // Human-readable stuff describing the component.
  311. //
  312. WCHAR Description[MAXOCDESC];
  313. WCHAR Tip[MAXOCTIP];
  314. //
  315. // From here down, stuff is meaningful only for top-level components.
  316. //
  317. //
  318. // Stuff describing the OC's installation DLL and how to call it.
  319. //
  320. WCHAR InstallationDllName[MAX_PATH];
  321. CHAR InterfaceFunctionName[MAX_PATH];
  322. HMODULE InstallationDll;
  323. POCSETUPPROC InstallationRoutine;
  324. //
  325. // Version of the OC Manager to which this component was written.
  326. //
  327. UINT ExpectedVersion;
  328. // this flag indicates whether the subcomponent was intialialized
  329. BOOL Exists;
  330. //
  331. // Flags: ANSI/Unicode, etc.
  332. //
  333. UINT Flags;
  334. } deb_OPTIONAL_COMPONENTW, *deb_POPTIONAL_COMPONENTW;
  335. //
  336. // locale info
  337. //
  338. typedef struct _deb_LOCALEW {
  339. LCID lcid;
  340. WCHAR DecimalSeparator[4];
  341. } deb_LOCALEW, *deb_PLOCALEW;
  342. //
  343. // Define structure corresponding to an instance of the OC Manager.
  344. // This is actually somewhat broken, in that this actually closely corresponds
  345. // to a master OC INF, and we might want to consider breaking out the string
  346. // tables into another structure, so we can more easily achieve a unified
  347. // namespace if we have multiple master OC INFs at play simultaneously.
  348. //
  349. typedef struct _deb_OC_MANAGERW {
  350. //
  351. // Callbacks into OC Manaer client.
  352. //
  353. deb_OCM_CLIENT_CALLBACKSW Callbacks;
  354. //
  355. // Handle of Master OC INF.
  356. //
  357. HINF MasterOcInf;
  358. //
  359. // unattended inf handle
  360. //
  361. HINF UnattendedInf;
  362. //
  363. // Master OC Inf file, and unattended file
  364. //
  365. WCHAR MasterOcInfPath[MAX_PATH];
  366. WCHAR UnattendedInfPath[MAX_PATH];
  367. // we run from whatever directory the master inf is in
  368. WCHAR SourceDir[MAX_PATH];
  369. //
  370. // Name of "suite" -- in other words, a shortname that
  371. // is unique to the master OC inf that this structure represents.
  372. // We base it on the name of the master OC inf itself.
  373. //
  374. WCHAR SuiteName[MAX_PATH];
  375. //
  376. // page titles
  377. //
  378. WCHAR SetupPageTitle[MAX_PATH];
  379. // window title
  380. WCHAR WindowTitle[MAX_PATH];
  381. //
  382. // List of per-component OC INFs currently loaded.
  383. // Each inf's name is in the string table and the extra data
  384. // for each is an OC_INF structure.
  385. //
  386. PVOID InfListStringTable;
  387. //
  388. // String table for names of all components and subcomponents.
  389. // Extra data for each is an OPTIONAL_COMPONENT structure.
  390. //
  391. PVOID ComponentStringTable;
  392. //
  393. // pointer to OcSetupPage structure so we can free this data
  394. // if the user cancels before we get to the wizard page.
  395. //
  396. PVOID OcSetupPage;
  397. //
  398. // Setup mode (custom, typical, etc)
  399. //
  400. UINT SetupMode;
  401. //
  402. // List of top-level optional component string IDs.
  403. // This is necessary because we need to preserve ordering
  404. // from the master OC Inf.
  405. //
  406. UINT TopLevelOcCount;
  407. PLONG TopLevelOcStringIds;
  408. UINT TopLevelParentOcCount;
  409. PLONG TopLevelParentOcStringIds;
  410. //
  411. // Are there subcomponents on the details page?
  412. //
  413. BOOL SubComponentsPresent;
  414. //
  415. // Each element in this array points to an array that
  416. // gives ordering for querying wizard pages from the optional components.
  417. //
  418. PLONG WizardPagesOrder[WizPagesTypeMax];
  419. //
  420. // Subkey relative to szPrivateDataRoot where private
  421. // data for components plugged into the OC will live.
  422. // 2 8-char DWORD representations plus a separator and nul.
  423. //
  424. WCHAR PrivateDataSubkey[18];
  425. HKEY hKeyPrivateData;
  426. HKEY hKeyPrivateDataRoot;
  427. //
  428. // If we are completing installation, this item is the window handle
  429. // of the progress text control.
  430. //
  431. HWND ProgressTextWindow;
  432. //
  433. // String id of component currently processing an interface routine.
  434. // -1 means the OC manager is not currently processing one.
  435. //
  436. LONG CurrentComponentStringId;
  437. // Component Ids of aborted components
  438. LONG *AbortedComponentIds;
  439. int AbortedCount;
  440. //
  441. // Various flags
  442. //
  443. UINT InternalFlags;
  444. //
  445. // setup data
  446. //
  447. SETUP_DATAW SetupData;
  448. } deb_OC_MANAGERW, *deb_POC_MANAGERW;