4 #include "wine/windef16.h"
7 typedef UINT16 LOGDISKID16;
12 /* error codes stuff */
14 typedef UINT16 RETERR16;
16 #define IP_ERROR (UINT16)100
17 #define TP_ERROR (UINT16)200
18 #define VCP_ERROR (UINT16)300
19 #define GEN_ERROR (UINT16)400
20 #define DI_ERROR (UINT16)500
23 ERR_IP_INVALID_FILENAME = IP_ERROR+1,
25 ERR_IP_INVALID_SECT_NAME,
26 ERR_IP_OUT_OF_HANDLES,
28 ERR_IP_INVALID_INFFILE,
31 ERR_IP_SECT_NOT_FOUND,
32 ERR_IP_END_OF_SECTION,
33 ERR_IP_PROFILE_NOT_FOUND,
34 ERR_IP_LINE_NOT_FOUND,
36 ERR_IP_TOOMANYINFFILES,
37 ERR_IP_INVALID_SAVERESTORE,
38 ERR_IP_INVALID_INFTYPE
41 /****** virtual copy operations ******/
43 typedef DWORD LPEXPANDVTBL;
48 } VCPPROGRESS, *LPVCPPROGRESS;
54 VHSTR vhstrVolumeLabel;
62 VCPPROGRESS prgFileRead;
63 VCPPROGRESS prgByteRead;
65 VCPPROGRESS prgFileWrite;
66 VCPPROGRESS prgByteWrite;
67 } VCPDISKINFO, *LPVCPDISKINFO;
73 } VCPFILESPEC, *LPVCPFILESPEC;
83 } VCPFATTR, *LPVCPFATTR;
89 } VCPFILESTAT, *LPVCPFILESTAT;
99 } VIRTNODEEX, *LPVIRTNODEEX;
107 LPEXPANDVTBL lpExpandVtbl;
109 VHSTR vhstrDstFinalName;
110 VCPFILESTAT vFileStat;
111 } VIRTNODE, *LPVIRTNODE;
115 VCPPROGRESS prgDiskRead;
116 VCPPROGRESS prgFileRead;
117 VCPPROGRESS prgByteRead;
119 VCPPROGRESS prgDiskWrite;
120 VCPPROGRESS prgFileWrite;
121 VCPPROGRESS prgByteWrite;
123 LPVCPDISKINFO lpvdiIn;
124 LPVCPDISKINFO lpvdiOut;
126 } VCPSTATUS, *LPVCPSTATUS;
128 #define CNFL_BACKUP 0x0001
129 #define CNFL_DELETEONFAILURE 0x0002
130 #define CNFL_RENAMEONSUCCESS 0x0004
131 #define CNFL_CONTINUATION 0x0008
132 #define CNFL_SKIPPED 0x0010
133 #define CNFL_IGNOREERRORS 0x0020
134 #define CNFL_RETRYFILE 0x0040
135 #define CNFL_COPIED 0x0080
136 #define VNFL_UNIQUE 0x0000
137 #define VNFL_MULTIPLEOK 0x0100
138 #define VNFL_DESTROYOLD 0x0200
139 #define VNFL_COPY 0x0000
140 #define VNFL_DELETE 0x0800
141 #define VNFL_RENAME 0x1000
142 #define VNFL_NODE_TYPE (VNFL_RENAME|VNFL_DELETE|VNFL_COPY)
143 #define VNFL_CREATED 0x2000
144 #define VNFL_REJECTED 0x4000
145 #define VNFL_DEVICEINSTALLER 0x8000
148 ERR_VCP_IOFAIL = VCP_ERROR+1,
149 ERR_VCP_STRINGTOOLONG,
168 ERR_VCP_LDDPATH_INVALID,
171 ERR_VCP_NO_DIGITAL_SIGNATURE_CATALOG,
172 ERR_VCP_NO_DIGITAL_SIGNATURE_FILE
176 #define VCPN_PROCEED 0
177 #define VCPN_ABORT -1
178 #define VCPN_RETRY -2
179 #define VCPN_IGNORE -3
181 #define VCPN_FORCE -5
182 #define VCPN_DEFER -6
184 #define VCPN_RETRYFILE -8
186 #define VCPFL_ABANDON 0x00
187 #define VCPFL_BACKUP 0x01
188 #define VCPFL_COPY 0x02
189 #define VCPFL_BACKUPANDCOPY (VCPFL_BACKUP|VCPFL_COPY)
190 #define VCPFL_INSPECIFIEDORDER 0x04
191 #define VCPFL_DELETE 0x08
192 #define VCPFL_RENAME 0x10
193 #define VCPFL_ALL (VCPFL_COPY|VCPFL_DELETE|VCPFL_RENAME)
195 #define CFNL_BACKUP 0x0001
196 #define CFNL_DELETEONFAILURE 0x0002
197 #define CFNL_RENAMEONSUCCESS 0x0004
198 #define CFNL_CONTINUATION 0x0008
199 #define CFNL_SKIPPED 0x0010
200 #define CFNL_IGNOREERRORS 0x0020
201 #define CFNL_RETRYFILE 0x0040
202 #define CFNL_COPIED 0x0080
203 #define VFNL_MULTIPLEOK 0x0100
204 #define VFNL_DESTROYOLD 0x0200
205 #define VFNL_NOW 0x0400
206 #define VFNL_COPY 0x0000
207 #define VFNL_DELETE 0x0800
208 #define VFNL_RENAME 0x1000
209 #define VFNL_CREATED 0x2000
210 #define VFNL_REJECTED 0x4000
211 #define VCPM_DISKCLASS 0x01
212 #define VCPM_DISKFIRST 0x0100
213 #define VCPM_DISKLAST 0x01ff
216 VCPM_DISKCREATEINFO = VCPM_DISKFIRST,
218 VCPM_DISKDESTROYINFO,
222 VCPM_DISKFORMATBEGIN,
227 #define VCPM_FILEINCLASS 0x02
228 #define VCPM_FILEOUTCLASS 0x03
229 #define VCPM_FILEFIRSTIN 0x0200
230 #define VCPM_FILEFIRSTOUT 0x0300
231 #define VCPM_FILELAST 0x03ff
234 VCPM_FILEOPENIN = VCPM_FILEFIRSTIN,
240 VCPM_FILEOPENOUT = VCPM_FILEFIRSTOUT,
248 #define VCPM_NODECLASS 0x04
249 #define VCPM_NODEFIRST 0x0400
250 #define VCPM_NODELAST 0x04ff
253 VCPM_NODECREATE = VCPM_NODEFIRST,
257 VCPM_NODECHANGEDESTDIR,
261 #define VCPM_TALLYCLASS 0x05
262 #define VCPM_TALLYFIRST 0x0500
263 #define VCPM_TALLYLAST 0x05ff
266 VCPM_TALLYSTART = VCPM_TALLYFIRST,
272 #define VCPM_VERCLASS 0x06
273 #define VCPM_VERFIRST 0x0600
274 #define VCPM_VERLAST 0x06ff
277 VCPM_VERCHECK = VCPM_VERFIRST,
279 VCPM_VERRESOLVECONFLICT
282 #define VCPM_VSTATCLASS 0x07
283 #define VCPM_VSTATFIRST 0x0700
284 #define VCPM_VSTATLAST 0x07ff
287 VCPM_VSTATSTART = VCPM_VSTATFIRST,
292 VCPM_VSTATCLOSESTART,
294 VCPM_VSTATBACKUPSTART,
296 VCPM_VSTATRENAMESTART,
300 VCPM_VSTATDELETESTART,
302 VCPM_VSTATPATHCHECKSTART,
303 VCPM_VSTATPATHCHECKEND,
304 VCPM_VSTATCERTIFYSTART,
305 VCPM_VSTATCERTIFYEND,
310 #define VCPM_PATHCLASS 0x08
311 #define VCPM_PATHFIRST 0x0800
312 #define VCPM_PATHLAST 0x08ff
315 VCPM_BUILDPATH = VCPM_PATHFIRST,
320 #define VCPM_PATCHCLASS 0x09
321 #define VCPM_PATCHFIRST 0x0900
322 #define VCPM_PATCHLAST 0x09ff
325 VCPM_FILEPATCHBEFORECPY = VCPM_PATCHFIRST,
326 VCPM_FILEPATCHAFTERCPY,
327 VCPM_FILEPATCHINFOPEN,
328 VCPM_FILEPATCHINFCLOSE
331 #define VCPM_CERTCLASS 0x0a
332 #define VCPM_CERTFIRST 0x0a00
333 #define VCPM_CERTLAST 0x0aff
336 VCPM_FILECERTIFY = VCPM_CERTFIRST,
340 typedef LRESULT CALLBACK (*VIFPROC)(LPVOID lpvObj, UINT16 uMsg, WPARAM wParam, LPARAM lParam, LPARAM lparamRef);
342 typedef int CALLBACK (*VCPENUMPROC)(LPVIRTNODE lpvn, LPARAM lparamRef);
344 RETERR16 WINAPI VcpOpen16(VIFPROC vifproc, LPARAM lparamMsgRef);
345 RETERR16 WINAPI VcpQueueCopy16(
346 LPCSTR lpszSrcFileName, LPCSTR lpszDstFileName,
347 LPCSTR lpszSrcDir, LPCSTR lpszDstDir,
348 LOGDISKID16 ldidSrc, LOGDISKID16 ldidDst,
349 LPEXPANDVTBL lpExpandVtbl,
350 WORD fl, LPARAM lParam
352 RETERR16 VcpFlush16(WORD fl, LPCSTR lpszBackupDest);
353 RETERR16 WINAPI VcpClose16(WORD fl, LPCSTR lpszBackupDest);
355 /* VcpExplain flags */
363 VCPEX_DST_FILE_FINAL,
372 LPCSTR WINAPI VcpExplain16(LPVIRTNODE lpVn, DWORD dwWhat);
374 /****** logical disk management ******/
376 typedef struct _LOGDISKDESC_S { /* ldd */
377 WORD cbSize; /* struct size */
378 LOGDISKID16 ldid; /* logical disk ID */
379 LPSTR pszPath; /* path this descriptor points to */
380 LPSTR pszVolLabel; /* volume label of the disk related to it */
381 LPSTR pszDiskName; /* name of this disk */
382 WORD wVolTime; /* modification time of volume label */
383 WORD wVolDate; /* modification date */
384 DWORD dwSerNum; /* serial number of disk */
386 } LOGDISKDESC_S, *LPLOGDISKDESC;
388 /** logical disk identifiers (LDID) **/
390 /* predefined LDIDs */
391 #define LDID_PREDEF_START 0x0001
392 #define LDID_PREDEF_END 0x7fff
394 /* registry-assigned LDIDs */
395 #define LDID_VAR_START 0x7000
396 #define LDID_VAR_END 0x7fff
398 /* dynamically assigned LDIDs */
399 #define LDID_ASSIGN_START 0x8000
400 #define LDID_ASSIGN_END 0xbfff
403 #define LDID_ABSOLUTE ((UINT)-1)
404 #define LDID_SRCPATH 1 /* setup source path */
405 #define LDID_SETUPTEMP 2 /* setup temp dir */
406 #define LDID_UNINSTALL 3 /* uninstall dir */
407 #define LDID_BACKUP 4 /* backup dir */
408 #define LDID_SETUPSCRATCH 5 /* setup scratch dir */
409 #define LDID_WIN 10 /* win dir */
410 #define LDID_SYS 11 /* win system dir */
411 #define LDID_IOS 12 /* win Iosubsys dir */
412 #define LDID_CMD 13 /* win command dir */
413 #define LDID_CPL 14 /* win control panel dir */
414 #define LDID_PRINT 15 /* win printer dir */
415 #define LDID_MAIL 16 /* win mail dir */
416 #define LDID_INF 17 /* win inf dir */
417 #define LDID_HELP 18 /* win help dir */
418 #define LDID_WINADMIN 19 /* admin dir */
419 #define LDID_FONTS 20 /* win fonts dir */
420 #define LDID_VIEWERS 21 /* win viewers dir */
421 #define LDID_VMM32 22 /* win VMM32 dir */
422 #define LDID_COLOR 23 /* win color mngment dir */
423 #define LDID_APPS 24 /* win apps dir */
424 #define LDID_SHARED 25 /* win shared dir */
425 #define LDID_WINBOOT 26 /* guaranteed win boot drive */
426 #define LDID_MACHINE 27 /* machine specific files */
427 #define LDID_HOST_WINBOOT 28
428 #define LDID_BOOT 30 /* boot drive root dir */
429 #define LDID_BOOT_HOST 31 /* boot drive host root dir */
430 #define LDID_OLD_WINBOOT 32 /* root subdir */
431 #define LDID_OLD_WIN 33 /* old windows dir */
433 /* flags for GenInstall() */
434 #define GENINSTALL_DO_FILES 1
435 #define GENINSTALL_DO_INI 2
436 #define GENINSTALL_DO_REG 4
437 #define GENINSTALL_DO_INI2REG 8
438 #define GENINSTALL_DO_CFGAUTO 16
439 #define GENINSTALL_DO_LOGCONFIG 32
440 #define GENINSTALL_DO_REGSRCPATH 64
441 #define GENINSTALL_DO_PERUSER 128
443 #define GEINISTALL_DO_INIREG 14
444 #define GENINSTALL_DO_ALL 255
447 * flags for InstallHinfSection()
448 * 128 can be added, too. This means that the .inf file is provided by you
449 * instead of being a 32 bit file (i.e. Windows .inf file).
450 * In this case all files you install must be in the same dir
451 * as your .inf file on the install disk.
453 #define HOW_NEVER_REBOOT 0
454 #define HOW_ALWAYS_SILENT_REBOOT 1
455 #define HOW_ALWAYS_PROMPT_REBOOT 2
456 #define HOW_SILENT_REBOOT 3
457 #define HOW_PROMPT_REBOOT 4
459 /****** device installation stuff ******/
461 #define MAX_CLASS_NAME_LEN 32
462 #define MAX_DEVNODE_ID_LEN 256
463 #define MAX_GUID_STR 50
465 typedef struct _DEVICE_INFO
468 struct _DEVICE_INFO *lpNextDi;
469 char szDescription[LINE_LEN];
472 char szRegSubkey[MAX_DEVNODE_ID_LEN];
473 char szClassName[MAX_CLASS_NAME_LEN];
476 /*LPDRIVER_NODE*/ LPVOID lpCompatDrvList;
477 /*LPDRIVER_NODE*/ LPVOID lpClassDrvList;
478 /*LPDRIVER_NODE*/ LPVOID lpSelectedDriver;
481 HINSTANCE16 hinstClassInstaller;
482 HINSTANCE16 hinstClassPropProvidor;
483 HINSTANCE16 hinstDevicePropProvidor;
484 HINSTANCE16 hinstBasicPropProvidor;
485 FARPROC16 fpClassInstaller;
486 FARPROC16 fpClassEnumPropPages;
487 FARPROC16 fpDeviceEnumPropPages;
488 FARPROC16 fpEnumBasicProperties;
489 DWORD dwSetupReserved;
490 DWORD dwClassInstallReserved;
491 /*GENCALLBACKPROC*/ LPVOID gicpGenInstallCallBack;
496 HINSTANCE16 hinstPrivateProblemHandler;
497 FARPROC16 fpPrivateProblemHandler;
498 LPARAM lpClassInstallParams;
499 struct _DEVICE_INFO *lpdiChildList;
501 /*LPDRIVER_INFO*/ LPVOID lpCompatDrvInfoList;
502 /*LPDRIVER_INFO*/ LPVOID lpClassDrvInfoList;
503 char szClassGUID[MAX_GUID_STR];
504 } DEVICE_INFO16, *LPDEVICE_INFO16, **LPLPDEVICE_INFO16;
507 extern void WINAPI GenFormStrWithoutPlaceHolders16(LPSTR,LPCSTR,HINF16);
508 extern RETERR16 WINAPI IpOpen16(LPCSTR,HINF16 *);
509 extern RETERR16 WINAPI IpClose16(HINF16);
510 extern RETERR16 WINAPI CtlSetLdd16(LPLOGDISKDESC);
511 extern RETERR16 WINAPI CtlGetLdd16(LPLOGDISKDESC);
512 extern RETERR16 WINAPI CtlFindLdd16(LPLOGDISKDESC);
513 extern RETERR16 WINAPI CtlAddLdd16(LPLOGDISKDESC);
514 extern RETERR16 WINAPI CtlDelLdd16(LOGDISKID16);
515 extern RETERR16 WINAPI CtlGetLddPath16(LOGDISKID16 ldid, LPSTR szPath);
516 extern RETERR16 WINAPI GenInstall16(HINF16,LPCSTR,WORD);
518 #endif /* __SETUPX16_H */