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.

1450 lines
60 KiB

  1. //**********************************************************************
  2. //
  3. // SETUPX.H
  4. //
  5. // Copyright (c) 1993 - Microsoft Corp.
  6. // All rights reserved.
  7. // Microsoft Confidential
  8. //
  9. // Public include file for Chicago Setup services.
  10. //
  11. // 12/1/93 DONALDM Added LPCLASS_INFO, and function protos for
  12. // exports in SETUP4.DLL
  13. // 12/4/943 DONALDM Moved SHELL.H include and Chicago specific
  14. // helper functions to SETUP4.H
  15. // 1/11/94 DONALDM Added members to DEVICE_INFO to better handle
  16. // ClassInstaller load/unload.
  17. // 1/11/94 DONALDM Added some new DIF_ messages for Net guys.
  18. // 2/25/94 DONALDM Fixed a bug with the DIREG_ flags
  19. //**********************************************************************
  20. #ifndef SETUPX_INC
  21. #define SETUPX_INC 1 // SETUPX.H signature
  22. typedef UINT RETERR; // Return Error code type.
  23. #define OK 0 // success error code
  24. #define IP_ERROR (100) // Inf parsing
  25. #define TP_ERROR (200) // Text processing module
  26. #define VCP_ERROR (300) // Virtual copy module
  27. #define GEN_ERROR (400) // Generic Installer
  28. #define DI_ERROR (500) // Device Installer
  29. // err2ids mappings
  30. enum ERR_MAPPINGS {
  31. E2I_VCPM, // Maps VCPM to strings
  32. E2I_SETUPX, // Maps setupx returns to strings
  33. E2I_SETUPX_MODULE, // Maps setupx returns to appropriate module
  34. E2I_DOS_SOLUTION, // Maps DOS Extended errors to solutions
  35. E2I_DOS_REASON, // Maps DOS extended errors to strings.
  36. E2I_DOS_MEDIA, // Maps DOS extended errors to media icon.
  37. };
  38. #ifndef NOVCP
  39. /***************************************************************************/
  40. //
  41. // Logical Disk ID definitions
  42. //
  43. /***************************************************************************/
  44. // DECLARE_HANDLE(VHSTR); /* VHSTR = VirtCopy Handle to STRing */
  45. typedef UINT VHSTR; /* VirtCopy Handle to String */
  46. VHSTR WINAPI vsmStringAdd(LPCSTR lpszName);
  47. int WINAPI vsmStringDelete(VHSTR vhstr);
  48. VHSTR WINAPI vsmStringFind(LPCSTR lpszName);
  49. int WINAPI vsmGetStringName(VHSTR vhstr, LPSTR lpszBuffer, int cbBuffer);
  50. int WINAPI vsmStringCompare(VHSTR vhstrA, VHSTR vhstrB);
  51. LPCSTR WINAPI vsmGetStringRawName(VHSTR vhstr);
  52. void WINAPI vsmStringCompact(void);
  53. typedef UINT LOGDISKID; /* ldid */
  54. // Logical Disk Descriptor: Structure which describes the physical attributes
  55. // of a logical disk. Every logical disk is assigned a logical disk
  56. // identifier (LDID), and is described by a logical disk descriptor (LDD).
  57. //
  58. // The cbSize structure member must always be set to sizeof(LOGDISKDESC_S),
  59. // but all other unused structure members should be NULL or 0. No validation
  60. // is performed on the size of string arrays; all string pointers, if
  61. // non-NULL and they are to receive a string, must point at string arrays
  62. // whose sizes are as follows:
  63. // sizeof( szPath ) = MAX_PATH_LEN
  64. // sizeof( szVolLabel) = MAX_FILENAME_LEN
  65. // sizeof( szName ) = MAX_STRING_LEN
  66. #define MAX_PATH_LEN 260 // Max. path length.
  67. #define MAX_FILENAME_LEN 20 // Max. filename length. ( > sizeof( "x:\\12345678.123" )
  68. typedef struct _LOGDISKDESC_S { /* ldd */
  69. WORD cbSize; // Size of this structure (bytes)
  70. LOGDISKID ldid; // Logical Disk ID.
  71. LPSTR pszPath; // Ptr. to associated Path string.
  72. LPSTR pszVolLabel; // Ptr. to Volume Label string.
  73. LPSTR pszDiskName; // Ptr. to Disk Name string.
  74. WORD wVolTime; // Volume label modification time.
  75. WORD wVolDate; // Volume label modification date.
  76. DWORD dwSerNum; // Disk serial number.
  77. WORD wFlags; // Flags.
  78. } LOGDISKDESC_S, FAR *LPLOGDISKDESC;
  79. // Range for pre-defined LDIDs.
  80. #define LDID_PREDEF_START 0x0001 // Start of range
  81. #define LDID_PREDEF_END 0x7FFF // End of range
  82. // Range for dynamically assigned LDIDs.
  83. #define LDID_ASSIGN_START 0x8000 // Start of range
  84. #define LDID_ASSIGN_END 0xBFFF // End of range
  85. // Pre-defined Logical Disk Identifiers (LDID).
  86. //
  87. #define LDID_NULL 0 // Null (undefined) LDID.
  88. #define LDID_ABSOLUTE ((UINT)-1) // Absolute path
  89. // source path of windows install, this is typically A:\ or a net drive
  90. #define LDID_SRCPATH 1 // source of instilation
  91. // temporary setup directory used by setup, this is only valid durring
  92. // regular install
  93. #define LDID_SETUPTEMP 2 // temporary setup dir for install
  94. // path to uninstall location, this is where we backup files that will
  95. // be overwritten
  96. #define LDID_UNINSTALL 3 // uninstall (backup) dir.
  97. // backup path for the copy engine, this should not be used
  98. #define LDID_BACKUP 4 // BUGBUG: backup dir for the copy engine, not used
  99. // windows directory, this is the destinatio of the insallation
  100. #define LDID_WIN 10 // destination Windows dir (just user files).
  101. #define LDID_SYS 11 // destination Windows System dir.
  102. #define LDID_IOS 12 // destination Windows Iosubsys dir.
  103. #define LDID_CMD 13 // destination Windows Command (DOS) dir.
  104. #define LDID_CPL 14 // destination Windows Control Panel dir.
  105. #define LDID_PRINT 15 // destination Windows Printer dir.
  106. #define LDID_MAIL 16 // destination Mail dir.
  107. #define LDID_INF 17 // destination Windows *.INF dir.
  108. #define LDID_HELP 18 // destination Windows Help dir.
  109. #define LDID_WINADMIN 19 // admin stuff.
  110. // Shared dirs for net install.
  111. #define LDID_SHARED 25 // Bulk of windows files.
  112. #define LDID_WINBOOT 26 // guarenteed boot device for windows.
  113. #define LDID_MACHINE 27 // machine specific files.
  114. // boot and old win and dos dirs.
  115. #define LDID_BOOT 30 // Root dir of boot drive
  116. #define LDID_BOOT_HOST 31 // Root dir of boot drive host
  117. #define LDID_DOSBOOT 32 // Subdir off of Root (optional)
  118. #define LDID_OLD_WIN 33 // old windows directory (if it exists)
  119. #define LDID_OLD_DOS 34 // old dos directory (if it exists)
  120. // Convert Ascii drive letter to Integer drive number ('A'=1, 'B'=2, ...).
  121. #define DriveAtoI( chDrv ) ((int)(chDrv & 31))
  122. // Convert Integer drive number to Ascii drive letter (1='A', 2='B', ...).
  123. #define DriveItoA( iDrv ) ((char) (iDrv - 1 + 'A'))
  124. // BUGBUG: change the names of these
  125. RETERR WINAPI CtlSetLdd ( LPLOGDISKDESC );
  126. RETERR WINAPI CtlGetLdd ( LPLOGDISKDESC );
  127. RETERR WINAPI CtlFindLdd ( LPLOGDISKDESC );
  128. RETERR WINAPI CtlAddLdd ( LPLOGDISKDESC );
  129. RETERR WINAPI CtlDelLdd ( LOGDISKID );
  130. RETERR WINAPI CtlGetLddPath ( LOGDISKID, LPSTR );
  131. /***************************************************************************/
  132. //
  133. // Virtual File Copy definitions
  134. //
  135. /***************************************************************************/
  136. typedef DWORD LPEXPANDVTBL; /* BUGBUG -- clean this up */
  137. enum _ERR_VCP
  138. {
  139. ERR_VCP_IOFAIL = (VCP_ERROR + 1), // File I/O failure
  140. ERR_VCP_STRINGTOOLONG, // String length limit exceeded
  141. ERR_VCP_NOMEM, // Insufficient memory to comply
  142. ERR_VCP_NOVHSTR, // No string handles available
  143. ERR_VCP_OVERFLOW, // Reference count would overflow
  144. ERR_VCP_BADARG, // Invalid argument to function
  145. ERR_VCP_UNINIT, // String library not initialized
  146. ERR_VCP_NOTFOUND , // String not found in string table
  147. ERR_VCP_BUSY, // Can't do that now
  148. ERR_VCP_INTERRUPTED, // User interrupted operation
  149. ERR_VCP_BADDEST, // Invalid destination directory
  150. ERR_VCP_SKIPPED, // User skipped operation
  151. ERR_VCP_IO, // Hardware error encountered
  152. ERR_VCP_LOCKED, // List is locked
  153. ERR_VCP_WRONGDISK, // The wrong disk is in the drive
  154. ERR_VCP_CHANGEMODE, //
  155. ERR_VCP_LDDINVALID, // Logical Disk ID Invalid.
  156. ERR_VCP_LDDFIND, // Logical Disk ID not found.
  157. ERR_VCP_LDDUNINIT, // Logical Disk Descriptor Uninitialized.
  158. ERR_VCP_LDDPATH_INVALID,
  159. ERR_VCP_NOEXPANSION, // Failed to load expansion dll
  160. ERR_VCP_NOTOPEN, // Copy session not open
  161. };
  162. /*****************************************************************************
  163. * Structures
  164. *****************************************************************************/
  165. /*---------------------------------------------------------------------------*
  166. * VCPPROGRESS
  167. *---------------------------------------------------------------------------*/
  168. typedef struct tagVCPPROGRESS { /* prg */
  169. DWORD dwSoFar; /* Number of units copied so far */
  170. DWORD dwTotal; /* Number of units to copy */
  171. } VCPPROGRESS, FAR *LPVCPPROGRESS;
  172. /*---------------------------------------------------------------------------*
  173. * VCPDISKINFO
  174. *---------------------------------------------------------------------------*/
  175. /* BUGBUG -- I currently don't use wVolumeTime, wVolumeDate or ;Internal
  176. * dwSerialNumber. We may not want to use dwSerialNumber because ;Internal
  177. * it means that any disk other than the factory originals will be;Internal
  178. * suspected of being tampered with, since the serial number ;Internal
  179. * won't match. Similar with the time/date stamp on the ;Internal
  180. * volume label. Or maybe that's what we want to do. ;Internal
  181. */ /* ;Internal */
  182. /* ;Internal */
  183. typedef struct tagVCPDISKINFO {
  184. WORD cbSize; /* Size of this structure in bytes */
  185. LOGDISKID ldid; /* Logical disk ID */
  186. VHSTR vhstrRoot; /* Location of root directory */
  187. VHSTR vhstrVolumeLabel;/* Volume label */
  188. VHSTR vhstrDiskName; // Printed name on the disk.
  189. WORD wVolumeTime; /* Volume label modification time */
  190. WORD wVolumeDate; /* Volume label modification date */
  191. DWORD dwSerialNumber; /* Disk serial number */
  192. WORD fl; /* Flags */
  193. LPARAM lparamRef; /* Reference data for client */
  194. VCPPROGRESS prgFileRead; /* Progress info */
  195. VCPPROGRESS prgByteRead;
  196. VCPPROGRESS prgFileWrite;
  197. VCPPROGRESS prgByteWrite;
  198. } VCPDISKINFO, FAR *LPVCPDISKINFO;
  199. #define VDIFL_VALID 0x0001 /* Fields are valid from a prev. call */
  200. #define VDIFL_EXISTS 0x0002 /* Disk exists; do not format */
  201. RETERR WINAPI DiskInfoFromLdid(LOGDISKID ldid, LPVCPDISKINFO lpdi);
  202. /*---------------------------------------------------------------------------*
  203. * VCPFILESPEC
  204. *---------------------------------------------------------------------------*/
  205. typedef struct tagVCPFILESPEC { /* vfs */
  206. LOGDISKID ldid; /* Logical disk */
  207. VHSTR vhstrDir; /* Directory withing logical disk */
  208. VHSTR vhstrFileName; /* Filename within directory */
  209. } VCPFILESPEC, FAR *LPVCPFILESPEC;
  210. /*---------------------------------------------------------------------------*
  211. * VCPFATTR
  212. *---------------------------------------------------------------------------*/
  213. /*
  214. * BUGBUG -- explain diffce between llenIn and llenOut wrt compression.
  215. */
  216. typedef struct tagVCPFATTR {
  217. UINT uiMDate; /* Modification date */
  218. UINT uiMTime; /* Modification time */
  219. UINT uiADate; /* Access date */
  220. UINT uiATime; /* Access time */
  221. UINT uiAttr; /* File attribute bits */
  222. DWORD llenIn; /* Original file length */
  223. DWORD llenOut; /* Final file length */
  224. /* (after decompression) */
  225. } VCPFATTR, FAR *LPVCPFATTR;
  226. /*---------------------------------------------------------------------------*
  227. * VIRTNODEEX
  228. *---------------------------------------------------------------------------*/
  229. typedef struct tagVIRTNODEEX
  230. { /* vnex */
  231. HFILE hFileSrc;
  232. HFILE hFileDst;
  233. VCPFATTR fAttr;
  234. WORD dosError; // The first/last error encountered
  235. VHSTR vhstrFileName; // The original destination name.
  236. WPARAM vcpm; // The message that was being processed.
  237. } VIRTNODEEX, FAR *LPCVIRTNODEEX, FAR *LPVIRTNODEEX ;
  238. /*---------------------------------------------------------------------------*
  239. * VIRTNODE
  240. *---------------------------------------------------------------------------*/
  241. /* WARNING! ;Internal
  242. * All fields through but not including ;Internal
  243. * fl are memcmp'd to determine if we have a duplicate copy ;Internal
  244. * request. ;Internal
  245. * ;Internal
  246. * Do not insert fields before fl unless you want them to be ;Internal
  247. * compared; conversely, if you add a new field that needs to ;Internal
  248. * be compared, make sure it goes before fl. ;Internal
  249. * ;Internal
  250. * And don't change any of the fields once Windows 4.0 ships. ;Internal
  251. */ /* ;Internal */
  252. /* ;Internal */
  253. typedef struct tagVIRTNODE { /* vn */
  254. WORD cbSize;
  255. VCPFILESPEC vfsSrc;
  256. VCPFILESPEC vfsDst;
  257. WORD fl;
  258. LPARAM lParam;
  259. LPEXPANDVTBL lpExpandVtbl;
  260. LPVIRTNODEEX lpvnex;
  261. } VIRTNODE, FAR *LPCVIRTNODE, FAR *LPVIRTNODE ;
  262. /*---------------------------------------------------------------------------*
  263. * VCPDESTINFO
  264. *---------------------------------------------------------------------------*/
  265. typedef struct tagVCPDESTINFO { /* destinfo */
  266. WORD flDevAttr; /* Device attributes */
  267. LONG cbCapacity; /* Disk capacity */
  268. WORD cbCluster; /* Bytes per cluster */
  269. WORD cRootDir; /* Size of root directory */
  270. } VCPDESTINFO, FAR *LPVCPDESTINFO;
  271. #define DIFL_FIXED 0x0001 /* Nonremoveable media */
  272. #define DIFL_CHANGELINE 0x0002 /* Change line support */
  273. // Now also used by the virtnode as we dont have copy nodes any more.
  274. // #define CNFL_BACKUP 0x0001 /* This is a backup node */
  275. #define CNFL_DELETEONFAILURE 0x0002 /* Dest should be deleted on failure */
  276. #define CNFL_RENAMEONSUCCESS 0x0004 /* Dest needs to be renamed */
  277. #define CNFL_CONTINUATION 0x0008 /* Dest is continued onto difft disk */
  278. #define CNFL_SKIPPED 0x0010 /* User asked to skip file */
  279. #define CNFL_IGNOREERRORS 0x0020 // An error has occured on this file already
  280. #define CNFL_RETRYFILE 0x0040 // Retry the file (error ocurred)
  281. #define CNFL_COPIED 0x0080 // Node has already been copied.
  282. // BUGBUG: verify the use and usefullness of these flags
  283. // #define VNFL_UNIQUE 0x0000 /* Default */
  284. #define VNFL_MULTIPLEOK 0x0100 /* Do not search PATH for duplicates */
  285. #define VNFL_DESTROYOLD 0x0200 /* Do not back up files */
  286. // #define VNFL_NOW 0x0400 /* Use by vcp Flush */
  287. // To deternime what kind of node it is.
  288. #define VNFL_COPY 0x0000 // A simple copy node.
  289. #define VNFL_DELETE 0x0800 // A delete node
  290. #define VNFL_RENAME 0x1000 // A rename node
  291. #define VNFL_NODE_TYPE ( VNFL_RENAME|VNFL_DELETE|VNFL_COPY )
  292. /* Read-only flag bits */
  293. #define VNFL_CREATED 0x2000 /* VCPM_NODECREATE has been sent */
  294. #define VNFL_REJECTED 0x4000 /* Node has been rejected */
  295. #define VNFL_VALIDVQCFLAGS 0xff00 /* ;Internal */
  296. /*---------------------------------------------------------------------------*
  297. * VCPSTATUS
  298. *---------------------------------------------------------------------------*/
  299. typedef struct tagVCPSTATUS { /* vstat */
  300. WORD cbSize; /* Size of this structure */
  301. VCPPROGRESS prgDiskRead;
  302. VCPPROGRESS prgFileRead;
  303. VCPPROGRESS prgByteRead;
  304. VCPPROGRESS prgDiskWrite;
  305. VCPPROGRESS prgFileWrite;
  306. VCPPROGRESS prgByteWrite;
  307. LPVCPDISKINFO lpvdiIn; /* Current input disk */
  308. LPVCPDISKINFO lpvdiOut; /* Current output disk */
  309. LPVIRTNODE lpvn; /* Current file */
  310. } VCPSTATUS, FAR *LPVCPSTATUS;
  311. /*---------------------------------------------------------------------------*
  312. * VCPVERCONFLICT
  313. *---------------------------------------------------------------------------*/
  314. typedef struct tagVCPVERCONFLICT {
  315. LPCSTR lpszOldFileName;
  316. LPCSTR lpszNewFileName;
  317. DWORD dwConflictType; /* Same values as VerInstallFiles */
  318. LPVOID lpvinfoOld; /* Version information resources */
  319. LPVOID lpvinfoNew;
  320. WORD wAttribOld; /* File attributes for original */
  321. LPARAM lparamRef; /* Reference data for callback */
  322. } VCPVERCONFLICT, FAR *LPVCPVERCONFLICT;
  323. /*****************************************************************************
  324. * Callback functions
  325. *****************************************************************************/
  326. typedef LRESULT (CALLBACK *VIFPROC)(LPVOID lpvObj, UINT uMsg, WPARAM wParam, LPARAM lParam, LPARAM lparamRef);
  327. LRESULT CALLBACK vcpDefCallbackProc(LPVOID lpvObj, UINT uMsg, WPARAM wParam, LPARAM lParam, LPARAM lparamRef);
  328. // callback for default UI.
  329. // lparamRef --> a VCPUIINFO structure
  330. LRESULT CALLBACK vcpUICallbackProc(LPVOID lpvObj, UINT uMsg, WPARAM wParam, LPARAM lParam, LPARAM lparamRef);
  331. /*---------------------------------------------------------------------------*
  332. * VCPUIINFO
  333. *
  334. * This structure is passed in as the lparamRef of vcpUICallbackProc.
  335. *
  336. * on using vcpUICallbackProc:
  337. * - to use, have vcpUICallbackProc as the callback for vcpOpen with
  338. * an appropriately filled in VCPUIINFO structure as the lparamRef.
  339. *
  340. * - based on flags, hwndProgress is created and maintained
  341. * - lpfnStatCallback is called with only status messages
  342. * returning VCPM_ABORT indicates that the copy should be aborted
  343. * - if hwndProgress is non-NULL, the control with idProgress will
  344. * receive progress gauge messages as appropriate
  345. *
  346. *---------------------------------------------------------------------------*/
  347. #define VCPUI_CREATEPROGRESS 0x0001 // callback should create and manage progress gauge dialog
  348. #define VCPUI_NOBROWSE 0x0002 // no browse button in InsertDisk
  349. #define VCPUI_RENAMEREQUIRED 0x0004 // as a result of a file being in use at copy, reboot required
  350. typedef struct {
  351. UINT flags;
  352. HWND hwndParent; // window of parent
  353. HWND hwndProgress; // window to get progress updates (nonzero ids)
  354. UINT idPGauge; // id for progress gauge
  355. VIFPROC lpfnStatCallback; // callback for status info (or NULL)
  356. LPARAM lUserData; // caller definable data
  357. LOGDISKID ldidCurrent; // reserved. do not touch.
  358. } VCPUIINFO, FAR *LPVCPUIINFO;
  359. /******************************************************************************
  360. * Callback notification codes
  361. *****************************************************************************/
  362. /* BUGBUG -- VCPN_ABORT should match VCPERROR_INTERRUPTED */
  363. #define VCPN_OK 0 /* All is hunky-dory */
  364. #define VCPN_PROCEED 0 /* The same as VCPN_OK */
  365. #define VCPN_ABORT (-1) /* Cancel current operation */
  366. #define VCPN_RETRY (-2) /* Retry current operation */
  367. #define VCPN_IGNORE (-3) /* Ignore error and continue */
  368. #define VCPN_SKIP (-4) /* Skip this file and continue */
  369. #define VCPN_FORCE (-5) /* Force an action */
  370. #define VCPN_DEFER (-6) /* Save the action for later */
  371. #define VCPN_FAIL (-7) /* Return failure back to caller */
  372. #define VCPN_RETRYFILE (-8) // An error ocurred during file copy, do it again.
  373. /*****************************************************************************
  374. * Callback message numbers
  375. *****************************************************************************/
  376. #define VCPM_CLASSOF(uMsg) HIBYTE(uMsg)
  377. #define VCPM_TYPEOF(uMsg) (0x00FF & (uMsg)) // LOBYTE(uMsg)
  378. /*---------------------------------------------------------------------------*
  379. * ERRORs
  380. *---------------------------------------------------------------------------*/
  381. #define VCPM_ERRORCLASSDELTA 0x80
  382. #define VCPM_ERRORDELTA 0x8000 /* Where the errors go */
  383. /*---------------------------------------------------------------------------*
  384. * Disk information callbacks
  385. *---------------------------------------------------------------------------*/
  386. #define VCPM_DISKCLASS 0x01
  387. #define VCPM_DISKFIRST 0x0100
  388. #define VCPM_DISKLAST 0x01FF
  389. enum tagVCPM_DISK {
  390. VCPM_DISKCREATEINFO = VCPM_DISKFIRST,
  391. VCPM_DISKGETINFO,
  392. VCPM_DISKDESTROYINFO,
  393. VCPM_DISKPREPINFO,
  394. VCPM_DISKENSURE,
  395. VCPM_DISKPROMPT,
  396. VCPM_DISKFORMATBEGIN,
  397. VCPM_DISKFORMATTING,
  398. VCPM_DISKFORMATEND,
  399. /* Remaining messages reserved for future use */
  400. };
  401. /*---------------------------------------------------------------------------*
  402. * File copy callbacks
  403. *---------------------------------------------------------------------------*/
  404. // BUGBUG: this needs to be merged back with other internal errors
  405. #define VCPERROR_IO (VCP_ERROR - ERR_VCP_IO) /* Hardware error encountered */
  406. #define VCPM_FILEINCLASS 0x02
  407. #define VCPM_FILEOUTCLASS 0x03
  408. #define VCPM_FILEFIRSTIN 0x0200
  409. #define VCPM_FILEFIRSTOUT 0x0300
  410. #define VCPM_FILELAST 0x03FF
  411. enum tagVCPM_FILE {
  412. VCPM_FILEOPENIN = VCPM_FILEFIRSTIN,
  413. VCPM_FILEGETFATTR,
  414. VCPM_FILECLOSEIN,
  415. VCPM_FILECOPY,
  416. VCPM_FILENEEDED,
  417. VCPM_FILEOPENOUT = VCPM_FILEFIRSTOUT,
  418. VCPM_FILESETFATTR,
  419. VCPM_FILECLOSEOUT,
  420. VCPM_FILEFINALIZE,
  421. VCPM_FILEDELETE,
  422. VCPM_FILERENAME,
  423. /* Remaining messages reserved for future use */
  424. };
  425. /*---------------------------------------------------------------------------*
  426. * VIRTNODE callbacks
  427. *---------------------------------------------------------------------------*/
  428. #define VCPM_NODECLASS 0x04
  429. #define VCPM_NODEFIRST 0x0400
  430. #define VCPM_NODELAST 0x04FF
  431. enum tagVCPM_NODE {
  432. VCPM_NODECREATE = VCPM_NODEFIRST,
  433. VCPM_NODEACCEPT,
  434. VCPM_NODEREJECT,
  435. VCPM_NODEDESTROY,
  436. VCPM_NODECHANGEDESTDIR,
  437. VCPM_NODECOMPARE,
  438. /* Remaining messages reserved for future use */
  439. };
  440. /*---------------------------------------------------------------------------*
  441. * TALLY callbacks
  442. *---------------------------------------------------------------------------*/
  443. #define VCPM_TALLYCLASS 0x05
  444. #define VCPM_TALLYFIRST 0x0500
  445. #define VCPM_TALLYLAST 0x05FF
  446. enum tagVCPM_TALLY {
  447. VCPM_TALLYSTART = VCPM_TALLYFIRST,
  448. VCPM_TALLYEND,
  449. VCPM_TALLYFILE,
  450. VCPM_TALLYDISK,
  451. /* Remaining messages reserved for future use */
  452. };
  453. /*---------------------------------------------------------------------------*
  454. * VER callbacks
  455. *---------------------------------------------------------------------------*/
  456. #define VCPM_VERCLASS 0x06
  457. #define VCPM_VERFIRST 0x0600
  458. #define VCPM_VERLAST 0x06FF
  459. enum tagVCPM_VER {
  460. VCPM_VERCHECK = VCPM_VERFIRST,
  461. VCPM_VERCHECKDONE,
  462. VCPM_VERRESOLVECONFLICT,
  463. /* Remaining messages reserved for future use */
  464. };
  465. /*---------------------------------------------------------------------------*
  466. * VSTAT callbacks
  467. *---------------------------------------------------------------------------*/
  468. #define VCPM_VSTATCLASS 0x07
  469. #define VCPM_VSTATFIRST 0x0700
  470. #define VCPM_VSTATLAST 0x07FF
  471. enum tagVCPM_VSTAT {
  472. VCPM_VSTATSTART = VCPM_VSTATFIRST,
  473. VCPM_VSTATEND,
  474. VCPM_VSTATREAD,
  475. VCPM_VSTATWRITE,
  476. VCPM_VSTATNEWDISK,
  477. VCPM_VSTATCLOSESTART, // Start of VCP close
  478. VCPM_VSTATCLOSEEND, // upon leaving VCP close
  479. VCPM_VSTATBACKUPSTART, // Backup is beginning
  480. VCPM_VSTATBACKUPEND, // Backup is finished
  481. VCPM_VSTATRENAMESTART, // Rename phase start/end
  482. VCPM_VSTATRENAMEEND,
  483. VCPM_VSTATCOPYSTART, // Acutal copy phase
  484. VCPM_VSTATCOPYEND,
  485. VCPM_VSTATDELETESTART, // Delete phase
  486. VCPM_VSTATDELETEEND,
  487. VCPM_VSTATPATHCHECKSTART, // Check for valid paths
  488. VCPM_VSTATPATHCHECKEND,
  489. VCPM_VSTATUSERABORT, // User wants to quit.
  490. /* Remaining messages reserved for future use */
  491. };
  492. /*---------------------------------------------------------------------------*
  493. * Destination info callbacks
  494. *---------------------------------------------------------------------------*/
  495. /* BUGBUG -- find a reasonable message range for this */
  496. #define VCPM_PATHCLASS 0x08
  497. #define VCPM_PATHFIRST 0x0800
  498. #define VCPM_PATHLAST 0x08FF
  499. enum tagVCPM_PATH{
  500. VCPM_BUILDPATH = VCPM_PATHFIRST,
  501. VCPM_UNIQUEPATH,
  502. VCPM_CHECKPATH,
  503. };
  504. // #define VCPM_BUILDPATH 0x83
  505. /*****************************************************************************/
  506. void WINAPI VcpAddMRUPath( LPCSTR lpszPath );
  507. #define SZ_INSTALL_LOCATIONS "InstallLocationsMRU"
  508. RETERR WINAPI VcpOpen(VIFPROC vifproc, LPARAM lparamMsgRef);
  509. RETERR WINAPI VcpClose(WORD fl, LPCSTR lpszBackupDest);
  510. RETERR WINAPI VcpFlush(WORD fl, LPCSTR lpszBackupDest);
  511. #define VCPFL_ABANDON 0x0000 /* Abandon all pending file copies */
  512. #define VCPFL_BACKUP 0x0001 /* Perform backup */
  513. #define VCPFL_COPY 0x0002 /* Copy files */
  514. #define VCPFL_BACKUPANDCOPY (VCPFL_BACKUP | VCPFL_COPY)
  515. #define VCPFL_INSPECIFIEDORDER 0x0004 /* Do not sort before copying */
  516. #define VCPFL_DELETE 0x0008
  517. #define VCPFL_RENAME 0x0010
  518. #define VCPFL_DIAMOND 0x0020
  519. typedef int (CALLBACK *VCPENUMPROC)(LPVIRTNODE lpvn, LPARAM lparamRef);
  520. int WINAPI vcpEnumFiles(VCPENUMPROC vep, LPARAM lparamRef);
  521. /* Flag bits that can be set via VcpQueueCopy */
  522. // Various Lparams for files
  523. #define VNLP_SYSCRITICAL 0x0001 // This file should not be skipped
  524. #define VNLP_SETUPCRITICAL 0x0002 // This file cannot be skipped
  525. // VcpEnumFiles Flags.
  526. #define VEN_OP 0x00ff /* Operation field */
  527. #define VEN_NOP 0x0000 /* Do nothing */
  528. #define VEN_DELETE 0x0001 /* Delete current item */
  529. #define VEN_SET 0x0002 /* Change value of current item */
  530. #define VEN_ADVANCE 0x0003 /* Move to head of list */ /* ;Internal */
  531. #define VEN_FL 0xff00 /* Flags field */
  532. #define VEN_STOP 0x0100 /* Stop enumeration after this item */
  533. #define VEN_ERROR 0x8000 /* Stop enumeration after this item
  534. * and ignore the OP field */
  535. // BUGBUG: add the other VCP stuff necessary to use this
  536. // BUGBUG: remove the lpsz*Dir fields, make overload the LDID with them
  537. RETERR WINAPI VcpQueueCopy(LPCSTR lpszSrcFileName, LPCSTR lpszDstFileName,
  538. LPCSTR lpszSrcDir, LPCSTR lpszDstDir,
  539. LOGDISKID ldidSrc, LOGDISKID ldidDst,
  540. LPEXPANDVTBL lpExpandVtbl, WORD fl,
  541. LPARAM lParam);
  542. RETERR WINAPI VcpQueueDelete( LPCSTR lpszDstFileName,
  543. LPCSTR lpszDstDir,
  544. LOGDISKID ldidDst,
  545. LPARAM lParamRef );
  546. RETERR WINAPI VcpQueueRename( LPCSTR lpszSrcFileName,
  547. LPCSTR lpszDstFileName,
  548. LPCSTR lpszSrcDir,
  549. LPCSTR lpszDstDir,
  550. LOGDISKID ldidSrc,
  551. LOGDISKID ldidDst,
  552. LPARAM lParam );
  553. #endif // NOVCP
  554. #ifndef NOINF
  555. /***************************************************************************/
  556. //
  557. // Inf Parser API declaration and definitions
  558. //
  559. /***************************************************************************/
  560. enum _ERR_IP
  561. {
  562. ERR_IP_INVALID_FILENAME = (IP_ERROR + 1),
  563. ERR_IP_ALLOC_ERR,
  564. ERR_IP_INVALID_SECT_NAME,
  565. ERR_IP_OUT_OF_HANDLES,
  566. ERR_IP_INF_NOT_FOUND,
  567. ERR_IP_INVALID_INFFILE,
  568. ERR_IP_INVALID_HINF,
  569. ERR_IP_INVALID_FIELD,
  570. ERR_IP_SECT_NOT_FOUND,
  571. ERR_IP_END_OF_SECTION,
  572. ERR_IP_PROFILE_NOT_FOUND,
  573. ERR_IP_LINE_NOT_FOUND,
  574. ERR_IP_FILEREAD,
  575. ERR_IP_TOOMANYINFFILES,
  576. ERR_IP_INVALID_SAVERESTORE,
  577. ERR_IP_INVALID_INFTYPE
  578. };
  579. #define INFTYPE_TEXT 0
  580. #define INFTYPE_EXECUTABLE 1
  581. #define MAX_SECT_NAME_LEN 32
  582. typedef struct _INF NEAR * HINF;
  583. typedef struct _INFLINE FAR * HINFLINE; // tolken to inf line
  584. RETERR WINAPI IpOpen(LPCSTR pszFileSpec, HINF FAR * lphInf);
  585. RETERR WINAPI IpOpenEx(LPCSTR pszFileSpec, HINF FAR * lphInf, UINT InfType);
  586. RETERR WINAPI IpOpenAppend(LPCSTR pszFileSpec, HINF hInf);
  587. RETERR WINAPI IpOpenAppendEx(LPCSTR pszFileSpec, HINF hInf, UINT InfType);
  588. RETERR WINAPI IpSaveRestorePosition(HINF hInf, BOOL bSave);
  589. RETERR WINAPI IpClose(HINF hInf);
  590. RETERR WINAPI IpGetLineCount(HINF hInf, LPCSTR lpszSection, int FAR * lpCount);
  591. RETERR WINAPI IpFindFirstLine(HINF hInf, LPCSTR lpszSect, LPCSTR lpszKey, HINFLINE FAR * lphRet);
  592. RETERR WINAPI IpFindNextLine(HINF hInf, HINFLINE FAR * lphRet);
  593. RETERR WINAPI IpFindNextMatchLine(HINF hInf, LPCSTR lpszKey, HINFLINE FAR * lphRet);
  594. RETERR WINAPI IpGetProfileString(HINF hInf, LPCSTR lpszSec, LPCSTR lpszKey, LPSTR lpszBuf, int iBufSize);
  595. RETERR WINAPI IpGetFieldCount(HINF hInf, HINFLINE hInfLine, int FAR * lpCount);
  596. RETERR WINAPI IpGetFileName(HINF hInf, LPSTR lpszBuf, int iBufSize);
  597. RETERR WINAPI IpGetIntField(HINF hInf, HINFLINE hInfLine, int iField, int FAR * lpVal);
  598. RETERR WINAPI IpGetLongField(HINF hInf, HINFLINE hInfLine, int iField, long FAR * lpVal);
  599. RETERR WINAPI IpGetStringField(HINF hInf, HINFLINE hInfLine, int iField, LPSTR lpBuf, int iBufSize, int FAR * lpuCount);
  600. RETERR WINAPI IpGetClass(LPSTR lpszInfFile, LPSTR lpszBuf, int cbBuf, LPSTR lpszDefaultClassName);
  601. #endif // NOINF
  602. #ifndef NOTEXTPROC
  603. /***************************************************************************/
  604. //
  605. // Text processing API declaration and definitions
  606. //
  607. /***************************************************************************/
  608. /* Relative/absolute positioning */
  609. #define SEC_SET 1 // Absolute positioning (relative to the start)
  610. #define SEC_END 2 // Realtive to the end
  611. #define SEC_CUR 3 // Relative to the current line.
  612. #define SEC_OPENALWAYS 1 // Always open a section, no error if it does not exist
  613. #define SEC_OPENEXISTING 2 // Open an existing section, an error given if it does not exist.
  614. #define SEC_OPENNEWALWAYS 3 // Open a section (present or not) and discard its contents.
  615. #define SEC_OPENNEWEXISTING 4 // Open an existing section (discarding its contents). Error if not existing
  616. // Flags for TP_OpenFile().
  617. //
  618. // Use autoexec/config.sys key delimiters
  619. //
  620. #define TP_WS_KEEP 1
  621. // If TP code running under SETUP, the foll. flag specifies whether
  622. // to cache this file or not! Use this, if you want to read a whole
  623. // file in when doing the TpOpenSection()!
  624. //
  625. #define TP_WS_DONTCACHE 2
  626. // The following are simple errors
  627. enum {
  628. ERR_TP_NOT_FOUND = (TP_ERROR + 1), // line, section, file etc.
  629. // not necessarily terminal
  630. ERR_TP_NO_MEM, // couldn't perform request - generally terminal
  631. ERR_TP_READ, // could not read the disc - terminal
  632. ERR_TP_WRITE, // could not write the data - terminal.
  633. ERR_TP_INVALID_REQUEST, // Multitude of sins - not necessarily terminal.
  634. ERR_TP_INVALID_LINE // Invalid line from DELETE_LINE etc.
  635. };
  636. /* Data handles */
  637. DECLARE_HANDLE(HTP);
  638. typedef HTP FAR * LPHTP;
  639. /* File handles */
  640. DECLARE_HANDLE(HFN);
  641. typedef HFN FAR * LPHFN;
  642. typedef UINT TFLAG;
  643. typedef UINT LINENUM, FAR * LPLINENUM;
  644. #define MAX_REGPATH 256 // Max Registry Path Length
  645. #define LINE_LEN 256 // BUGBUG: max line length?
  646. #define SECTION_LEN 32 // BUGBUG: max length of a section name?
  647. #define MAX_STRING_LEN 512 // BUGBUG: review this
  648. /* Function prototypes */
  649. RETERR WINAPI TpOpenFile(LPCSTR Filename, LPHFN phFile, TFLAG Flag);
  650. RETERR WINAPI TpCloseFile(HFN hFile);
  651. RETERR WINAPI TpOpenSection(HFN hfile, LPHTP phSection, LPCSTR Section, TFLAG flag);
  652. RETERR WINAPI TpCloseSection(HTP Section);
  653. RETERR WINAPI TpCommitSection(HFN hFile, HTP hSection, LPCSTR Section, TFLAG flag);
  654. LINENUM WINAPI TpGetLine(HTP hSection, LPCSTR key, LPCSTR value, int rel, int orig, LPLINENUM lpLineNum );
  655. LINENUM WINAPI TpGetNextLine(HTP hSection, LPCSTR key, LPCSTR value, LPLINENUM lpLineNum );
  656. RETERR WINAPI TpInsertLine(HTP hSection, LPCSTR key, LPCSTR value, int rel, int orig, TFLAG flag);
  657. RETERR WINAPI TpReplaceLine(HTP hSection, LPCSTR key, LPCSTR value, int rel, int orig, TFLAG flag);
  658. RETERR WINAPI TpDeleteLine(HTP hSection, int rel, int orig,TFLAG flag);
  659. RETERR WINAPI TpMoveLine(HTP hSection, int src_rel, int src_orig, int dest_rel, int dest_orig, TFLAG flag);
  660. RETERR WINAPI TpGetLineContents(HTP hSection, LPSTR buffer, UINT bufsize, UINT FAR * lpActualSize,int rel, int orig, TFLAG flag);
  661. // UINT WINAPI TpGetWindowsDirectory(LPSTR lpDest, UINT size);
  662. // UINT WINAPI TpGetSystemDirectory(LPSTR lpDest, UINT size);
  663. int WINAPI TpGetPrivateProfileString(LPCSTR lpszSect, LPCSTR lpszKey, LPCSTR lpszDefault, LPSTR lpszReturn, int nSize, LPCSTR lpszFile);
  664. int WINAPI TpWritePrivateProfileString(LPCSTR lpszSect, LPCSTR lpszKey, LPCSTR lpszString, LPCSTR lpszFile);
  665. int WINAPI TpGetProfileString(LPCSTR lpszSect, LPCSTR lpszKey, LPCSTR lpszDefault, LPSTR lpszReturn, int nSize);
  666. BOOL WINAPI TpWriteProfileString(LPCSTR lpszSect , LPCSTR lpszKey , LPCSTR lpszString);
  667. #endif // NOTEXTPROC
  668. #ifndef NOGENINSTALL
  669. /***************************************************************************/
  670. //
  671. // Generic Installer prototypes and definitions
  672. //
  673. /***************************************************************************/
  674. enum _ERR_GENERIC
  675. {
  676. ERR_GEN_LOW_MEM = GEN_ERROR+1, // Insufficient memory.
  677. ERR_GEN_INVALID_FILE, // Invalid INF file.
  678. ERR_GEN_LOGCONFIG, // Can't process LogConfig=.
  679. ERR_GEN_CFGAUTO, // Can't process CONFIG.SYS/AUTOEXEC.BAT
  680. ERR_GEN_UPDINI, // Can't process UpdateInis=.
  681. ERR_GEN_UPDINIFIELDS, // Can't process UpdateIniFields=.
  682. ERR_GEN_ADDREG, // Can't process AddReg=.
  683. ERR_GEN_DELREG, // Can't process DelReg=.
  684. ERR_GEN_INI2REG, // Can't process Ini2Reg=.
  685. ERR_GEN_FILE_COPY, // Can't process CopyFiles=.
  686. ERR_GEN_FILE_DEL, // Can't process DelFiles=.
  687. ERR_GEN_FILE_REN, // Can't process RenFiles=.
  688. ERR_GEN_REG_API, // Error returned by Reg API.
  689. ERR_GEN_DO_FILES, // can't do Copy, Del or RenFiles.
  690. };
  691. // The cbSize field will always be set to sizeof(GENCALLBACKINFO_S).
  692. // All unused fields (for the operation) will be not be initialized.
  693. // For example, when the operation is GENO_DELFILE, the Src fields will
  694. // not have any sensible values (Dst fields will be set correctly) as
  695. // VcpQueueDelete only accepts Dst parameters.
  696. //
  697. /***************************************************************************
  698. * GenCallbackINFO structure passed to GenInstall CallBack functions.
  699. ***************************************************************************/
  700. typedef struct _GENCALLBACKINFO_S { /* gen-callback struc */
  701. WORD cbSize; // Size of this structure (bytes).
  702. WORD wOperation; // Operation being performed.
  703. LOGDISKID ldidSrc; // Logical Disk ID for Source.
  704. LPCSTR pszSrcSubDir; // Source sub-dir off of the LDID.
  705. LPCSTR pszSrcFileName; // Source file name (base name).
  706. LOGDISKID ldidDst; // Logical Disk ID for Dest.
  707. LPCSTR pszDstSubDir; // Dest. sub-dir off of the LDID.
  708. LPCSTR pszDstFileName; // Dest. file name (base name).
  709. LPEXPANDVTBL lpExpandVtbl; // BUGBUG needed? NULL right now!
  710. WORD wflags; // flags for VcpQueueCopy.
  711. LPARAM lParam; // LPARAM to the Vcp API.
  712. } GENCALLBACKINFO_S, FAR *LPGENCALLBACKINFO;
  713. /***************************************************************************
  714. * GenCallback notification codes -- callback proc returns 1 of foll. values.
  715. ***************************************************************************/
  716. #define GENN_OK 0 /* All is hunky-dory. Do the VCP operation */
  717. #define GENN_PROCEED 0 /* The same as GENN_OK */
  718. #define GENN_ABORT (-1) /* Cancel current GenInstall altogether */
  719. #define GENN_SKIP (-2) /* Skip this file and continue */
  720. /***************************************************************************
  721. * VCP Operation being performed by GenInstall() -- wOperation values in
  722. * GENCALLBACKINFO structure above.
  723. ***************************************************************************/
  724. #define GENO_COPYFILE 1 /* VCP copyfile being done */
  725. #define GENO_DELFILE 2 /* VCP delfile being done */
  726. #define GENO_RENFILE 3 /* VCP renfile being done */
  727. typedef LRESULT (CALLBACK *GENCALLBACKPROC)(LPGENCALLBACKINFO lpGenInfo,
  728. LPARAM lparamRef);
  729. RETERR WINAPI GenInstall( HINF hinfFile, LPCSTR szInstallSection, WORD wFlags );
  730. RETERR WINAPI GenInstallEx( HINF hInf, LPCSTR szInstallSection, WORD wFlags,
  731. HKEY hRegKey, GENCALLBACKPROC CallbackProc,
  732. LPARAM lparam);
  733. RETERR WINAPI GenWinInitRename(LPCSTR szNew, LPSTR szOld, LOGDISKID ldid);
  734. RETERR WINAPI GenCopyLogConfig2Reg(HINF hInf, HKEY hRegKey,
  735. LPCSTR szLogConfigSection);
  736. void WINAPI GenFormStrWithoutPlaceHolders( LPSTR szDst, LPCSTR szSrc,
  737. HINF hInf ) ;
  738. // A devnode is just a DWORD and this is easier than
  739. // having to include configmg.h for everybody
  740. RETERR WINAPI GenInfLCToDevNode(ATOM atInfFileName, LPSTR lpszSectionName,
  741. BOOL bInstallSec, UINT InfType,
  742. DWORD dnDevNode);
  743. // Bit fields for GenInstall() (for wFlags parameter) -- these can be OR-ed!
  744. #define GENINSTALL_DO_FILES 1
  745. #define GENINSTALL_DO_INI 2
  746. #define GENINSTALL_DO_REG 4
  747. #define GENINSTALL_DO_INI2REG 8
  748. #define GENINSTALL_DO_CFGAUTO 16
  749. #define GENINSTALL_DO_LOGCONFIG 32
  750. #define GENINSTALL_DO_INIREG (GENINSTALL_DO_INI | \
  751. GENINSTALL_DO_REG | \
  752. GENINSTALL_DO_INI2REG)
  753. #define GENINSTALL_DO_ALL (GENINSTALL_DO_FILES | \
  754. GENINSTALL_DO_INIREG | \
  755. GENINSTALL_DO_CFGAUTO | \
  756. GENINSTALL_DO_LOGCONFIG)
  757. #endif // NOGENINSTALL
  758. #ifndef NODEVICENSTALL
  759. /***************************************************************************/
  760. //
  761. // Device Installer prototypes and definitions
  762. //
  763. /***************************************************************************/
  764. enum _ERR_DEVICE_INSTALL
  765. {
  766. ERR_DI_INVALID_DEVICE_ID = DI_ERROR, // Incorrectly formed device IDF
  767. ERR_DI_INVALID_COMPATIBLE_DEVICE_LIST, // Invalid compatible device list
  768. ERR_DI_REG_API, // Error returned by Reg API.
  769. ERR_DI_LOW_MEM, // Insufficient memory to complete
  770. ERR_DI_BAD_DEV_INFO, // Device Info struct invalid
  771. ERR_DI_INVALID_CLASS_INSTALLER, // Registry entry / DLL invalid
  772. ERR_DI_DO_DEFAULT, // Take default action
  773. ERR_DI_USER_CANCEL, // the user cancelled the operation
  774. ERR_DI_NOFILECOPY, // No need to copy files (in install)
  775. ERR_DI_BAD_CLASS_INFO, // Class Info Struct invalid
  776. ERR_DI_BAD_INF, // Bad INF file encountered
  777. ERR_DI_BAD_MOVEDEV_PARAMS, // Bad Move Device Params struct
  778. ERR_DI_NO_INF, // No INF found on OEM disk
  779. };
  780. typedef struct _DRIVER_NODE {
  781. struct _DRIVER_NODE FAR* lpNextDN;
  782. UINT Rank;
  783. UINT InfType;
  784. unsigned InfDate;
  785. LPSTR lpszDescription;
  786. LPSTR lpszSectionName;
  787. ATOM atInfFileName;
  788. ATOM atMfgName;
  789. ATOM atProviderName;
  790. DWORD Flags;
  791. DWORD dwPrivateData;
  792. } DRIVER_NODE, NEAR* PDRIVER_NODE, FAR* LPDRIVER_NODE, FAR* FAR* LPLPDRIVER_NODE;
  793. #define DNF_DUPDESC 0x00000001 // Multiple providers have same desc
  794. #define DNF_OLDDRIVER 0x00000002 // Driver node specifies old/current driver
  795. // possible types of "INF" files
  796. #define INFTYPE_WIN4 1
  797. #define INFTYPE_WIN3 2
  798. #define INFTYPE_COMBIDRV 3
  799. #define INFTYPE_PPD 4
  800. #define INFTYPE_WPD 5
  801. #define INFTYPE_CLASS_SPEC1 6
  802. #define INFTYPE_CLASS_SPEC2 7
  803. #define INFTYPE_CLASS_SPEC3 8
  804. #define INFTYPE_CLASS_SPEC4 9
  805. #define MAX_CLASS_NAME_LEN 32
  806. #define MAX_DRIVER_INST_LEN 10
  807. typedef struct _DEVICE_INFO
  808. {
  809. UINT cbSize;
  810. struct _DEVICE_INFO FAR* lpNextDi;
  811. char szDescription[LINE_LEN];
  812. DWORD dnDevnode;
  813. HKEY hRegKey;
  814. char szRegSubkey[100]; //~~~~
  815. char szClassName[MAX_CLASS_NAME_LEN];
  816. DWORD Flags;
  817. HWND hwndParent;
  818. LPDRIVER_NODE lpCompatDrvList;
  819. LPDRIVER_NODE lpClassDrvList;
  820. LPDRIVER_NODE lpSelectedDriver;
  821. ATOM atDriverPath;
  822. ATOM atTempInfFile;
  823. HINSTANCE hinstClassInstaller; // The Class Installer module
  824. HINSTANCE hinstClassPropProvidor; // The Class Property Providor
  825. HINSTANCE hinstDevicePropProvidor; // The Device Property Providor
  826. HINSTANCE hinstBasicPropProvidor; // The Basic Property Providor hinst
  827. FARPROC fpClassInstaller; // ClassInstall entry point
  828. FARPROC fpClassEnumPropPages; // Class EnumPropPages entry point
  829. FARPROC fpDeviceEnumPropPages; // Device EnumPropPages entry point
  830. FARPROC fpEnumBasicProperties; // Basic Property Page enum entry
  831. DWORD dwSetupReserved; // Reserved for SETUP's use
  832. DWORD dwClassInstallReserved; // Reserved for Class Installer use
  833. GENCALLBACKPROC gicpGenInstallCallBack; // Set by Caller of DiInstallDevice if
  834. // they want GenInstall callbacks
  835. LPARAM gicplParam; // lParam for GenInstall Callback
  836. UINT InfType; // The type of INF file it ENUMSINGLEINF is
  837. // specified
  838. HINSTANCE hinstPrivateProblemHandler; // The Private Problem DLL for a Specific Device
  839. FARPROC fpPrivateProblemHandler; // The Private Problem Handler entry point
  840. LPARAM lpClassInstallParams; // Class Install functions specific Parameters
  841. } DEVICE_INFO, FAR * LPDEVICE_INFO, FAR * FAR * LPLPDEVICE_INFO;
  842. #define ASSERT_DI_STRUC(lpdi) if (lpdi->cbSize != sizeof(DEVICE_INFO)) return (ERR_DI_BAD_DEV_INFO)
  843. typedef struct _CLASS_INFO
  844. {
  845. UINT cbSize;
  846. struct _CLASS_INFO FAR* lpNextCi;
  847. LPDEVICE_INFO lpdi;
  848. char szDescription[LINE_LEN];
  849. char szClassName[MAX_CLASS_NAME_LEN];
  850. } CLASS_INFO, FAR * LPCLASS_INFO, FAR * FAR * LPLPCLASS_INFO;
  851. #define ASSERT_CI_STRUC(lpci) if (lpci->cbSize != sizeof(CLASS_INFO)) return (ERR_DI_BAD_CLASS_INFO)
  852. // flags for device choosing (InFlags)
  853. #define DI_SHOWOEM 0x00000001L // support Other... button
  854. #define DI_SHOWCOMPAT 0x00000002L // show compatibility list
  855. #define DI_SHOWCLASS 0x00000004L // show class list
  856. #define DI_SHOWALL 0x00000007L
  857. #define DI_NOVCP 0x00000008L // Don't do vcpOpen/vcpClose.
  858. #define DI_DIDCOMPAT 0x00000010L // Searched for compatible devices
  859. #define DI_DIDCLASS 0x00000020L // Searched for class devices
  860. #define DI_AUTOASSIGNRES 0x00000040L // No UI for resources if possible
  861. // flags returned by DiInstallDevice to indicate need to reboot/restart
  862. #define DI_NEEDRESTART 0x00000080L // Restart required to take effect
  863. #define DI_NEEDREBOOT 0x00000100L // Reboot required to take effect
  864. // flags for device installation
  865. #define DI_NOBROWSE 0x00000200L // no Browse... in InsertDisk
  866. // Flags set by DiBuildClassDrvList
  867. #define DI_MULTMFGS 0x00000400L // Set if multiple manufacturers in
  868. // class driver list
  869. // Flag indicates that device is disabled
  870. #define DI_DISABLED 0x00000800L // Set if device disabled
  871. // Flags for Device/Class Properties
  872. #define DI_GENERALPAGE_ADDED 0x00001000L
  873. #define DI_RESOURCEPAGE_ADDED 0x00002000L
  874. // Flag to indicate the setting properties for this Device (or class) caused a change
  875. // so the Dev Mgr UI probably needs to be updatd.
  876. #define DI_PROPERTIES_CHANGE 0x00004000L
  877. // Flag to indicate that the sorting from the INF file should be used.
  878. #define DI_INF_IS_SORTED 0x00008000L
  879. #define DI_ENUMSINGLEINF 0x00010000L
  880. // The following flags can be used to install a device disabled
  881. // and to prevent CONFIGMG being called when a device is installed
  882. #define DI_DONOTCALLCONFIGMG 0x00020000L
  883. #define DI_INSTALLDISABLED 0x00040000L
  884. // This flag is set of this LPDI is really just an LPCI, ie
  885. // it only contains class info, NO DRIVER/DEVICE INFO
  886. #define DI_CLASSONLY 0x00080000L
  887. // This flag is set if the Class Install params are valid
  888. #define DI_CLASSINSTALLPARAMS 0x00100000L
  889. // This flag is set if the caller of DiCallClassInstaller does NOT
  890. // want the internal default action performed if the Class installer
  891. // return ERR_DI_DO_DEFAULT
  892. #define DI_NODI_DEFAULTACTION 0x00200000L
  893. // BUGBUG. This is a hack for M6 Net setup. Net Setup does not work correctly
  894. // if we process devnode syncronously. This WILL be removed for M7 when
  895. // Net setup is fixed to work with DiInstallDevice
  896. #define DI_NOSYNCPROCESSING 0x00400000L
  897. // flags for device installation
  898. #define DI_QUIETINSTALL 0x00800000L // don't confuse the user with
  899. // questions or excess info
  900. // Defines for class installer functions
  901. #define DIF_SELECTDEVICE 0x0001
  902. #define DIF_INSTALLDEVICE 0x0002
  903. #define DIF_ASSIGNRESOURCES 0x0003
  904. #define DIF_PROPERTIES 0x0004
  905. #define DIF_REMOVE 0x0005
  906. #define DIF_FIRSTTIMESETUP 0x0006
  907. #define DIF_FOUNDDEVICE 0x0007
  908. #define DIF_SELECTCLASSDRIVERS 0x0008
  909. #define DIF_VALIDATECLASSDRIVERS 0x0009
  910. #define DIF_INSTALLCLASSDRIVERS 0x000A
  911. #define DIF_CALCDISKSPACE 0x000B
  912. #define DIF_DESTROYPRIVATEDATA 0x000C
  913. #define DIF_VALIDATEDRIVER 0x000D
  914. #define DIF_MOVEDEVICE 0x000E
  915. typedef UINT DI_FUNCTION; // Function type for device installer
  916. // DIF_MOVEDEVICE parameter struct.
  917. typedef struct _MOVEDEV_PARAMS
  918. {
  919. UINT cbSize;
  920. LPDEVICE_INFO lpdiOldDev; // References the Device Begin Moved
  921. } MOVEDEV_PARAMS, FAR * LPMOVEDEV_PARAMS;
  922. #define ASSERT_MOVEDEVPARAMS_STRUC(lpmdp) if (lpmdp->cbSize != sizeof(MOVEDEV_PARAMS)) return (ERR_DI_BAD_MOVEDEV_PARAMS)
  923. RETERR WINAPI DiCreateDeviceInfo(
  924. LPLPDEVICE_INFO lplpdi, // Ptr to ptr to dev info
  925. LPCSTR lpszDescription, // If non-null then description string
  926. DWORD hDevnode, // BUGBUG -- MAKE A DEVNODE
  927. HKEY hkey, // Registry hkey for dev info
  928. LPCSTR lpszRegsubkey, // If non-null then reg subkey string
  929. LPCSTR lpszClassName, // If non-null then class name string
  930. HWND hwndParent); // If non-null then hwnd of parent
  931. RETERR WINAPI DiGetClassDevs(
  932. LPLPDEVICE_INFO lplpdi, // Ptr to ptr to dev info
  933. LPCSTR lpszClassName, // Must be name of class
  934. HWND hwndParent, // If non-null then hwnd of parent
  935. int iFlags); // Options
  936. #define DIGCF_DEFAULT 0x0001 // NOT IMPLEMENTED!
  937. #define DIGCF_PRESENT 0x0002
  938. #define DIGCF_ALLCLASSES 0x0004
  939. #define DIGCF_PROFILE 0x0008
  940. // API to return the Class name of an INF File
  941. RETERR WINAPI DiGetINFClass(LPSTR lpszMWDPath, UINT InfType, LPSTR lpszClassName, DWORD dwcbClassName);
  942. RETERR WINAPI PASCAL DiCreateDevRegKey(
  943. LPDEVICE_INFO lpdi,
  944. LPHKEY lphk,
  945. HINF hinf,
  946. LPCSTR lpszInfSection,
  947. int iFlags);
  948. RETERR WINAPI PASCAL DiDeleteDevRegKey(LPDEVICE_INFO lpdi, int iFlags);
  949. RETERR WINAPI PASCAL DiOpenDevRegKey(
  950. LPDEVICE_INFO lpdi,
  951. LPHKEY lphk,
  952. int iFlags);
  953. #define DIREG_DEV 0x0001 // Open/Create/Delete device key
  954. #define DIREG_DRV 0x0002 // Open/Create/Delete driver key
  955. #define DIREG_BOTH 0x0004 // Delete both driver and Device key
  956. RETERR WINAPI DiReadRegLogConf
  957. (
  958. LPDEVICE_INFO lpdi,
  959. LPSTR lpszConfigName,
  960. LPBYTE FAR *lplpbLogConf,
  961. LPDWORD lpdwSize
  962. );
  963. RETERR WINAPI DiReadRegConf
  964. (
  965. LPDEVICE_INFO lpdi,
  966. LPBYTE FAR *lplpbLogConf,
  967. LPDWORD lpdwSize,
  968. DWORD dwFlags
  969. );
  970. #define DIREGLC_FORCEDCONFIG 0x00000001
  971. #define DIREGLC_BOOTCONFIG 0x00000002
  972. RETERR WINAPI DiDestroyClassInfoList(LPCLASS_INFO lpci);
  973. RETERR WINAPI DiBuildClassInfoList(LPLPCLASS_INFO lplpci);
  974. RETERR WINAPI DiGetDeviceClassInfo(LPLPCLASS_INFO lplpci, LPDEVICE_INFO lpdi);
  975. RETERR WINAPI DiDestroyDeviceInfoList(LPDEVICE_INFO lpdi);
  976. RETERR WINAPI DiSelectDevice( LPDEVICE_INFO lpdi );
  977. RETERR WINAPI DiSelectOEMDrv(HWND hDlg, LPDEVICE_INFO lpdi);
  978. RETERR WINAPI DiInstallDevice( LPDEVICE_INFO lpdi );
  979. RETERR WINAPI DiRemoveDevice( LPDEVICE_INFO lpdi );
  980. RETERR WINAPI DiAssignResources( LPDEVICE_INFO lpdi );
  981. RETERR WINAPI DiAskForOEMDisk(LPDEVICE_INFO lpdi);
  982. RETERR WINAPI DiCallClassInstaller(DI_FUNCTION diFctn, LPDEVICE_INFO lpdi);
  983. RETERR WINAPI DiBuildCompatDrvList(LPDEVICE_INFO lpdi);
  984. RETERR WINAPI DiBuildClassDrvList(LPDEVICE_INFO lpdi);
  985. typedef RETERR (CALLBACK *OLDINFPROC)(HINF hinf, LPCSTR lpszNewInf, LPARAM lParam);
  986. RETERR WINAPI DiBuildClassDrvListFromOldInf(LPDEVICE_INFO lpdi, LPCSTR lpszSection, OLDINFPROC lpfnOldInfProc, LPARAM lParam);
  987. RETERR WINAPI DiDestroyDriverNodeList(LPDRIVER_NODE lpdn);
  988. // The following export will load a dll and find the specified proc name
  989. typedef RETERR (FAR PASCAL *DIINSTALLERPROPERTIES)(LPDEVICE_INFO);
  990. RETERR WINAPI GetFctn(HKEY hk, LPSTR lpszRegVal, LPSTR lpszDefProcName,
  991. HINSTANCE FAR * lphinst, FARPROC FAR *lplpfn);
  992. RETERR
  993. WINAPI
  994. DiCreateDriverNode(
  995. LPLPDRIVER_NODE lplpdn,
  996. UINT Rank,
  997. UINT InfType,
  998. unsigned InfDate,
  999. LPCSTR lpszDescription,
  1000. LPCSTR lpszProviderName,
  1001. LPCSTR lpszMfgName,
  1002. LPCSTR lpszInfFileName,
  1003. LPCSTR lpszSectionName,
  1004. DWORD dwPrivateData);
  1005. RETERR WINAPI DiLoadClassIcon(
  1006. LPCSTR szClassName,
  1007. HICON FAR *lphiLargeIcon,
  1008. int FAR *lpiMiniIconIndex);
  1009. RETERR WINAPI DiInstallDrvSection(
  1010. LPCSTR lpszInfFileName,
  1011. LPCSTR lpszSection,
  1012. LPCSTR lpszClassName,
  1013. LPCSTR lpszDescription,
  1014. DWORD dwFlags);
  1015. RETERR WINAPI DiChangeState(LPDEVICE_INFO lpdi, DWORD dwStateChange, DWORD dwFlags, LPARAM lParam);
  1016. #define DICS_ENABLE 0x00000001
  1017. #define DICS_DISABLE 0x00000002
  1018. #define DICS_PROPCHANGE 0x00000003
  1019. #define DICS_FLAG_GLOBAL 0x00000001
  1020. #define DICS_FLAG_CONFIGSPECIFIC 0x00000002
  1021. RETERR WINAPI DiInstallClass(LPCSTR lpszInfFileName, DWORD dwFlags);
  1022. RETERR WINAPI DiOpenClassRegKey(LPHKEY lphk, LPCSTR lpszClassName);
  1023. // support routine for dealing with class mini icons
  1024. int WINAPI PASCAL DiDrawMiniIcon(HDC hdc, RECT rcLine, int iMiniIcon, UINT flags);
  1025. BOOL WINAPI DiGetClassBitmapIndex(LPCSTR lpszClass, int FAR *lpiMiniIconIndex);
  1026. // internal calls for display class
  1027. #define DISPLAY_SETMODE_SUCCESS 0x0001
  1028. #define DISPLAY_SETMODE_DRVCHANGE 0x0002
  1029. #define DISPLAY_SETMODE_FONTCHANGE 0x0004
  1030. UINT WINAPI Display_SetMode(LPDEVICE_INFO lpdi, UINT uColorRes, int iXRes, int iYRes);
  1031. RETERR WINAPI Display_ClassInstaller(DI_FUNCTION diFctn, LPDEVICE_INFO lpdi);
  1032. RETERR WINAPI Display_OpenFontSizeKey(LPHKEY lphkFontSize);
  1033. BOOL WINAPI Display_SetFontSize(LPCSTR lpszFontSize);
  1034. RETERR WINAPI DiIsThereNeedToCopy(HWND hwnd, DWORD dwFlags);
  1035. #define DINTC_NOCOPYDEFAULT 0x00000001
  1036. // API for the mouse class installer
  1037. RETERR WINAPI Mouse_ClassInstaller(DI_FUNCTION diFctn, LPDEVICE_INFO lpdi);
  1038. #endif // NODEVICEINSTALL
  1039. /***************************************************************************/
  1040. //
  1041. // setup reg DB calls, use just like those in kernel
  1042. //
  1043. /***************************************************************************/
  1044. DWORD WINAPI SURegOpenKey(HKEY hKey, LPSTR lpszSubKey, HKEY FAR *lphkResult);
  1045. DWORD WINAPI SURegCloseKey(HKEY hKey);
  1046. DWORD WINAPI SURegCreateKey(HKEY hKey, LPSTR lpszSubKey, HKEY FAR *lphkResult);
  1047. DWORD WINAPI SURegDeleteKey(HKEY hKey, LPSTR lpszSubKey);
  1048. DWORD WINAPI SURegEnumKey(HKEY hKey, DWORD dwIdx, LPSTR lpszBuffer, DWORD dwBufSize);
  1049. DWORD WINAPI SURegQueryValue16(HKEY hKey, LPSTR lpszSubKey, LPSTR lpValueBuf, DWORD FAR *ldwBufSize);
  1050. DWORD WINAPI SURegSetValue16(HKEY hKey, LPSTR lpszSubKey, DWORD dwType, LPBYTE lpszValue, DWORD dwValSize);
  1051. DWORD WINAPI SURegDeleteValue(HKEY hKey,LPSTR lpszValue);
  1052. DWORD WINAPI SURegEnumValue(HKEY hKey,DWORD dwIdx, LPSTR lpszValue, DWORD FAR *lpcbValue, DWORD FAR *lpdwReserved, DWORD FAR *lpdwType, LPBYTE lpbData, DWORD FAR *lpcbData);
  1053. DWORD WINAPI SURegQueryValueEx(HKEY hKey,LPSTR lpszValueName, DWORD FAR *lpdwReserved,DWORD FAR *lpdwType,LPSTR lpValueBuf, DWORD FAR *ldwBufSize);
  1054. DWORD WINAPI SURegSetValueEx(HKEY hKey,LPSTR lpszValueName, DWORD dwReserved, DWORD dwType, LPBYTE lpszValue, DWORD dwValSize);
  1055. DWORD WINAPI SURegFlush(VOID);
  1056. DWORD WINAPI SURegInit(VOID); // should be called before any other Reg APIs
  1057. /***************************************************************************/
  1058. // setup PropertySheet support
  1059. /***************************************************************************/
  1060. #ifndef NOPRSHT
  1061. #include <prsht.h>
  1062. HPROPSHEETPAGE WINAPI SUCreatePropertySheetPage(LPCPROPSHEETPAGE lppsp);
  1063. BOOL WINAPI SUDestroyPropertySheetPage(HPROPSHEETPAGE hPage);
  1064. int WINAPI SUPropertySheet(LPCPROPSHEETHEADER lppsh);
  1065. #endif // NOPRSHT
  1066. /***************************************************************************/
  1067. // setup FormatMessage support
  1068. /***************************************************************************/
  1069. #define MB_LOG (UINT)-1
  1070. UINT FAR CDECL suFormatMessage(HINSTANCE hAppInst, LPCSTR lpcFormat, LPSTR szMessage, UINT uSize,
  1071. ...);
  1072. UINT WINAPI suvFormatMessage(HINSTANCE hAppInst, LPCSTR lpcFormat, LPSTR szMessage, UINT uSize,
  1073. LPVOID FAR * lpArgs);
  1074. int WINCAPI _loadds suFormatMessageBox(HINSTANCE hAppInst, HWND hwndParent, LPCSTR lpcText, LPCSTR lpcTitle,
  1075. UINT uStyle, ...);
  1076. WORD WINAPI suErrorToIds( WORD Value, WORD Class );
  1077. /***************************************************************************/
  1078. // setup Version Conflict support
  1079. /***************************************************************************/
  1080. LPVOID WINAPI suVerConflictInit(BOOL fYesToLangMismatch);
  1081. void WINAPI suVerConflictTerm(LPVOID lpvData);
  1082. LRESULT WINAPI suVerConflict(HWND hwnd, LPVCPVERCONFLICT lpvc, LPVOID lpvData);
  1083. /***************************************************************************/
  1084. // setup Help support
  1085. /***************************************************************************/
  1086. BOOL WINAPI suHelp( HWND hwndApp, HWND hwndDlg );
  1087. //***************************************************************************
  1088. // Misc SETUPX.DLL support functions.
  1089. //***************************************************************************
  1090. enum SU_ACTIONS // Actions msgs for Setupx() /* ;Internal */
  1091. { /* ;Internal */
  1092. SUX_REGINIT, // Intialize registry /* ;Internal */
  1093. SUX_DBGLEVEL, // Set debug level /* ;Internal */
  1094. SUX_SETUPFLG, // Set fIsSetup flag /* ;Internal */
  1095. SUX_FASTSETUP, // Setupx => checking less mode /* ;Internal */
  1096. SUX_FORCEREGFLUSH, // Call kRegFlush /* ;Internal */
  1097. SUX_TPSFLUSH, // Call TPS_Flush() fns. /* ;Internal */
  1098. SUX_DBGHFILE, // File to write messages to /* ;Internal */
  1099. SUX_LOADSTORELDIDS, // Load/store setup's LDID's /* ;Internal */
  1100. SUX_ENABLEREGFLUSH, // Enable/Disable SURegFlush() if fIsSetup /* ;Internal */
  1101. SUX_SETUNCPATHFUNC, // Set UNC Path Convert Func /* ;Internal */
  1102. }; /* ;Internal */
  1103. RETERR WINAPI Setupx( UINT uMsg, WPARAM wParam, LPARAM lParam ); /* ;Internal */
  1104. RETERR WINAPI SUGetSetSetupFlags(LPDWORD lpdwFlags, BOOL bSet);
  1105. RETERR WINAPI CfgSetupMerge( int uFlags );
  1106. // structure for the LPARAM argument to Setupx() for SUX_REGINIT action. ;Internal
  1107. typedef struct _REGINIT_S { /* setupx - reg_init */ /* ;Internal */
  1108. LPSTR lpszSystemFile; // reg's base SYSTEM filename /* ;Internal */
  1109. LOGDISKID ldidSystemFile; // ldid for SYSTEM filename /* ;Internal */
  1110. LPSTR lpszUserFile; // reg's base USER filename /* ;Internal */
  1111. LOGDISKID ldidUserFile; // ldid for USER filename /* ;Internal */
  1112. } REGINIT_S, FAR *LPREGINIT; /* ;Internal */
  1113. #ifndef LPLPSTR
  1114. typedef LPSTR (FAR *LPLPSTR);
  1115. #endif
  1116. #define CFG_PARSE_BUFLEN 512 // Buf sized passed line obj funcs /* ;Internal */
  1117. LPLPSTR WINAPI CfgParseLine( LPCSTR szLine, LPSTR Buf ); /* ;Internal */
  1118. BOOL WINAPI CfgSetAutoProcess( int TrueFalse ); /* ;Internal */
  1119. void WINAPI CfgObjToStr( LPLPSTR apszObj, LPSTR szLine ); /* ;Internal */
  1120. LPLPSTR WINAPI CfgLnToObj( HTP hSection, int Offset, int Origin, LPSTR Buf ); /* ;Internal */
  1121. LPLPSTR WINAPI CfgObjFindKeyCmd( HTP hSec, LPCSTR szKey, LPCSTR szCmd, /* ;Internal */
  1122. int Offset, int Origin, LPSTR Buf ); /* ;Internal */
  1123. //***************************************************************************
  1124. //
  1125. // ENUMS for accessing config.sys/autoexec.bat line objects using the
  1126. // array returned by ParseConfigLine()..
  1127. //
  1128. //***************************************************************************
  1129. enum CFGLINE_STRINGS // Config.sys/autoexec.bat objects
  1130. {
  1131. CFG_KEYLEAD, // Keyword leading whitespaces
  1132. CFG_KEYWORD, // Keyword
  1133. CFG_KEYTRAIL, // Keyword trailing delimiters
  1134. CFG_UMBINFO, // Load high info
  1135. CFG_DRVLETTER, // Drive letter for cmd path
  1136. CFG_PATH, // Command path
  1137. CFG_COMMAND, // Command base name
  1138. CFG_EXT, // Command extension including '.'
  1139. CFG_ARGS, // Command arguments
  1140. CFG_FREE, // Free area at end of buffer
  1141. CFG_END
  1142. };
  1143. // DJM This will be included soon
  1144. /*---------------------------------------------------------------------------*
  1145. * SUB String Data
  1146. *---------------------------------------------------------------------------*/
  1147. typedef struct _SUBSTR_DATA {
  1148. LPSTR lpFirstSubstr;
  1149. LPSTR lpCurSubstr;
  1150. LPSTR lpLastSubstr;
  1151. } SUBSTR_DATA;
  1152. typedef SUBSTR_DATA* PSUBSTR_DATA;
  1153. typedef SUBSTR_DATA NEAR* NPSUBSTR_DATA;
  1154. typedef SUBSTR_DATA FAR* LPSUBSTR_DATA;
  1155. BOOL WINAPI InitSubstrData(LPSUBSTR_DATA lpSubstrData, LPSTR lpStr);
  1156. BOOL WINAPI GetFirstSubstr(LPSUBSTR_DATA lpSubstrData);
  1157. BOOL WINAPI GetNextSubstr(LPSUBSTR_DATA lpSubStrData);
  1158. /*---------------------------------------------------------------------------*
  1159. * Misc. Di functions
  1160. *---------------------------------------------------------------------------*/
  1161. BOOL WINAPI DiBuildPotentialDuplicatesList
  1162. (
  1163. LPDEVICE_INFO lpdi,
  1164. LPSTR lpDuplicateList,
  1165. DWORD cbSize,
  1166. LPDWORD lpcbData,
  1167. LPSTR lpstrDupType
  1168. );
  1169. //***************************************************************************
  1170. #endif // SETUPX_INC