2 * Copyright 2000 Andreas Mohr for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include "wine/windef16.h"
24 typedef UINT16 DI_FUNCTION16;
25 typedef UINT16 HINF16;
26 typedef UINT16 LOGDISKID16;
31 /* error codes stuff */
33 typedef UINT16 RETERR16;
35 #define IP_ERROR (UINT16)100
36 #define TP_ERROR (UINT16)200
37 #define VCP_ERROR (UINT16)300
38 #define GEN_ERROR (UINT16)400
39 #define DI_ERROR (UINT16)500
42 ERR_IP_INVALID_FILENAME = IP_ERROR+1,
44 ERR_IP_INVALID_SECT_NAME,
45 ERR_IP_OUT_OF_HANDLES,
47 ERR_IP_INVALID_INFFILE,
50 ERR_IP_SECT_NOT_FOUND,
51 ERR_IP_END_OF_SECTION,
52 ERR_IP_PROFILE_NOT_FOUND,
53 ERR_IP_LINE_NOT_FOUND,
55 ERR_IP_TOOMANYINFFILES,
56 ERR_IP_INVALID_SAVERESTORE,
57 ERR_IP_INVALID_INFTYPE
60 /****** virtual copy operations ******/
62 typedef DWORD LPEXPANDVTBL;
67 } VCPPROGRESS, *LPVCPPROGRESS;
73 VHSTR vhstrVolumeLabel;
81 VCPPROGRESS prgFileRead;
82 VCPPROGRESS prgByteRead;
84 VCPPROGRESS prgFileWrite;
85 VCPPROGRESS prgByteWrite;
86 } VCPDISKINFO, *LPVCPDISKINFO;
92 } VCPFILESPEC, *LPVCPFILESPEC;
102 } VCPFATTR, *LPVCPFATTR;
108 } VCPFILESTAT, *LPVCPFILESTAT;
118 } VIRTNODEEX, *LPVIRTNODEEX;
126 LPEXPANDVTBL lpExpandVtbl;
128 VHSTR vhstrDstFinalName;
129 VCPFILESTAT vFileStat;
130 } VIRTNODE, *LPVIRTNODE;
134 VCPPROGRESS prgDiskRead;
135 VCPPROGRESS prgFileRead;
136 VCPPROGRESS prgByteRead;
138 VCPPROGRESS prgDiskWrite;
139 VCPPROGRESS prgFileWrite;
140 VCPPROGRESS prgByteWrite;
142 LPVCPDISKINFO lpvdiIn;
143 LPVCPDISKINFO lpvdiOut;
145 } VCPSTATUS, *LPVCPSTATUS;
147 #define CNFL_BACKUP 0x0001
148 #define CNFL_DELETEONFAILURE 0x0002
149 #define CNFL_RENAMEONSUCCESS 0x0004
150 #define CNFL_CONTINUATION 0x0008
151 #define CNFL_SKIPPED 0x0010
152 #define CNFL_IGNOREERRORS 0x0020
153 #define CNFL_RETRYFILE 0x0040
154 #define CNFL_COPIED 0x0080
155 #define VNFL_UNIQUE 0x0000
156 #define VNFL_MULTIPLEOK 0x0100
157 #define VNFL_DESTROYOLD 0x0200
158 #define VNFL_COPY 0x0000
159 #define VNFL_DELETE 0x0800
160 #define VNFL_RENAME 0x1000
161 #define VNFL_NODE_TYPE (VNFL_RENAME|VNFL_DELETE|VNFL_COPY)
162 #define VNFL_CREATED 0x2000
163 #define VNFL_REJECTED 0x4000
164 #define VNFL_DEVICEINSTALLER 0x8000
167 ERR_VCP_IOFAIL = VCP_ERROR+1,
168 ERR_VCP_STRINGTOOLONG,
187 ERR_VCP_LDDPATH_INVALID,
190 ERR_VCP_NO_DIGITAL_SIGNATURE_CATALOG,
191 ERR_VCP_NO_DIGITAL_SIGNATURE_FILE
195 #define VCPN_PROCEED 0
196 #define VCPN_ABORT -1
197 #define VCPN_RETRY -2
198 #define VCPN_IGNORE -3
200 #define VCPN_FORCE -5
201 #define VCPN_DEFER -6
203 #define VCPN_RETRYFILE -8
205 #define VCPFL_ABANDON 0x00
206 #define VCPFL_BACKUP 0x01
207 #define VCPFL_COPY 0x02
208 #define VCPFL_BACKUPANDCOPY (VCPFL_BACKUP|VCPFL_COPY)
209 #define VCPFL_INSPECIFIEDORDER 0x04
210 #define VCPFL_DELETE 0x08
211 #define VCPFL_RENAME 0x10
212 #define VCPFL_ALL (VCPFL_COPY|VCPFL_DELETE|VCPFL_RENAME)
214 #define CFNL_BACKUP 0x0001
215 #define CFNL_DELETEONFAILURE 0x0002
216 #define CFNL_RENAMEONSUCCESS 0x0004
217 #define CFNL_CONTINUATION 0x0008
218 #define CFNL_SKIPPED 0x0010
219 #define CFNL_IGNOREERRORS 0x0020
220 #define CFNL_RETRYFILE 0x0040
221 #define CFNL_COPIED 0x0080
222 #define VFNL_MULTIPLEOK 0x0100
223 #define VFNL_DESTROYOLD 0x0200
224 #define VFNL_NOW 0x0400
225 #define VFNL_COPY 0x0000
226 #define VFNL_DELETE 0x0800
227 #define VFNL_RENAME 0x1000
228 #define VFNL_CREATED 0x2000
229 #define VFNL_REJECTED 0x4000
230 #define VCPM_DISKCLASS 0x01
231 #define VCPM_DISKFIRST 0x0100
232 #define VCPM_DISKLAST 0x01ff
235 VCPM_DISKCREATEINFO = VCPM_DISKFIRST,
237 VCPM_DISKDESTROYINFO,
241 VCPM_DISKFORMATBEGIN,
246 #define VCPM_FILEINCLASS 0x02
247 #define VCPM_FILEOUTCLASS 0x03
248 #define VCPM_FILEFIRSTIN 0x0200
249 #define VCPM_FILEFIRSTOUT 0x0300
250 #define VCPM_FILELAST 0x03ff
253 VCPM_FILEOPENIN = VCPM_FILEFIRSTIN,
259 VCPM_FILEOPENOUT = VCPM_FILEFIRSTOUT,
267 #define VCPM_NODECLASS 0x04
268 #define VCPM_NODEFIRST 0x0400
269 #define VCPM_NODELAST 0x04ff
272 VCPM_NODECREATE = VCPM_NODEFIRST,
276 VCPM_NODECHANGEDESTDIR,
280 #define VCPM_TALLYCLASS 0x05
281 #define VCPM_TALLYFIRST 0x0500
282 #define VCPM_TALLYLAST 0x05ff
285 VCPM_TALLYSTART = VCPM_TALLYFIRST,
291 #define VCPM_VERCLASS 0x06
292 #define VCPM_VERFIRST 0x0600
293 #define VCPM_VERLAST 0x06ff
296 VCPM_VERCHECK = VCPM_VERFIRST,
298 VCPM_VERRESOLVECONFLICT
301 #define VCPM_VSTATCLASS 0x07
302 #define VCPM_VSTATFIRST 0x0700
303 #define VCPM_VSTATLAST 0x07ff
306 VCPM_VSTATSTART = VCPM_VSTATFIRST,
311 VCPM_VSTATCLOSESTART,
313 VCPM_VSTATBACKUPSTART,
315 VCPM_VSTATRENAMESTART,
319 VCPM_VSTATDELETESTART,
321 VCPM_VSTATPATHCHECKSTART,
322 VCPM_VSTATPATHCHECKEND,
323 VCPM_VSTATCERTIFYSTART,
324 VCPM_VSTATCERTIFYEND,
329 #define VCPM_PATHCLASS 0x08
330 #define VCPM_PATHFIRST 0x0800
331 #define VCPM_PATHLAST 0x08ff
334 VCPM_BUILDPATH = VCPM_PATHFIRST,
339 #define VCPM_PATCHCLASS 0x09
340 #define VCPM_PATCHFIRST 0x0900
341 #define VCPM_PATCHLAST 0x09ff
344 VCPM_FILEPATCHBEFORECPY = VCPM_PATCHFIRST,
345 VCPM_FILEPATCHAFTERCPY,
346 VCPM_FILEPATCHINFOPEN,
347 VCPM_FILEPATCHINFCLOSE
350 #define VCPM_CERTCLASS 0x0a
351 #define VCPM_CERTFIRST 0x0a00
352 #define VCPM_CERTLAST 0x0aff
355 VCPM_FILECERTIFY = VCPM_CERTFIRST,
359 typedef LRESULT (CALLBACK *VIFPROC)(LPVOID lpvObj, UINT16 uMsg, WPARAM wParam, LPARAM lParam, LPARAM lparamRef);
361 typedef int (CALLBACK *VCPENUMPROC)(LPVIRTNODE lpvn, LPARAM lparamRef);
363 RETERR16 WINAPI VcpOpen16(VIFPROC vifproc, LPARAM lparamMsgRef);
365 /* VcpQueueCopy flags */
366 #define VNLP_SYSCRITICAL 0x0001
367 #define VNLP_SETUPCRITICAL 0x0002
368 #define VNLP_NOVERCHECK 0x0004
369 #define VNLP_FORCETEMP 0x0008
370 #define VNLP_IFEXISTS 0x0010
371 #define VNLP_KEEPNEWER 0x0020
372 #define VNLP_PATCHIFEXIST 0x0040
373 #define VNLP_NOPATCH 0x0080
374 #define VNLP_CATALOGCERT 0x0100
375 #define VNLP_NEEDCERTIFY 0x0200
376 #define VNLP_COPYIFEXISTS 0x0400
378 RETERR16 WINAPI VcpQueueCopy16(
379 LPCSTR lpszSrcFileName, LPCSTR lpszDstFileName,
380 LPCSTR lpszSrcDir, LPCSTR lpszDstDir,
381 LOGDISKID16 ldidSrc, LOGDISKID16 ldidDst,
382 LPEXPANDVTBL lpExpandVtbl,
383 WORD fl, LPARAM lParam
385 RETERR16 VcpFlush16(WORD fl, LPCSTR lpszBackupDest);
386 RETERR16 WINAPI VcpClose16(WORD fl, LPCSTR lpszBackupDest);
388 /* VcpExplain flags */
396 VCPEX_DST_FILE_FINAL,
405 LPCSTR WINAPI VcpExplain16(LPVIRTNODE lpVn, DWORD dwWhat);
407 /****** logical disk management ******/
409 typedef struct _LOGDISKDESC_S { /* ldd */
410 WORD cbSize; /* struct size */
411 LOGDISKID16 ldid; /* logical disk ID */
412 LPSTR pszPath; /* path this descriptor points to */
413 LPSTR pszVolLabel; /* volume label of the disk related to it */
414 LPSTR pszDiskName; /* name of this disk */
415 WORD wVolTime; /* modification time of volume label */
416 WORD wVolDate; /* modification date */
417 DWORD dwSerNum; /* serial number of disk */
419 } LOGDISKDESC_S, *LPLOGDISKDESC;
421 /** logical disk identifiers (LDID) **/
423 /* predefined LDIDs */
424 #define LDID_PREDEF_START 0x0001
425 #define LDID_PREDEF_END 0x7fff
427 /* registry-assigned LDIDs */
428 #define LDID_VAR_START 0x7000
429 #define LDID_VAR_END 0x7fff
431 /* dynamically assigned LDIDs */
432 #define LDID_ASSIGN_START 0x8000
433 #define LDID_ASSIGN_END 0xbfff
436 #define LDID_ABSOLUTE ((UINT)-1)
437 #define LDID_SRCPATH 1 /* setup source path */
438 #define LDID_SETUPTEMP 2 /* setup temp dir */
439 #define LDID_UNINSTALL 3 /* uninstall dir */
440 #define LDID_BACKUP 4 /* backup dir */
441 #define LDID_SETUPSCRATCH 5 /* setup scratch dir */
442 #define LDID_WIN 10 /* win dir */
443 #define LDID_SYS 11 /* win system dir */
444 #define LDID_IOS 12 /* win Iosubsys dir */
445 #define LDID_CMD 13 /* win command dir */
446 #define LDID_CPL 14 /* win control panel dir */
447 #define LDID_PRINT 15 /* win printer dir */
448 #define LDID_MAIL 16 /* win mail dir */
449 #define LDID_INF 17 /* win inf dir */
450 #define LDID_HELP 18 /* win help dir */
451 #define LDID_WINADMIN 19 /* admin dir */
452 #define LDID_FONTS 20 /* win fonts dir */
453 #define LDID_VIEWERS 21 /* win viewers dir */
454 #define LDID_VMM32 22 /* win VMM32 dir */
455 #define LDID_COLOR 23 /* win color mngment dir */
456 #define LDID_APPS 24 /* win apps dir */
457 #define LDID_SHARED 25 /* win shared dir */
458 #define LDID_WINBOOT 26 /* guaranteed win boot drive */
459 #define LDID_MACHINE 27 /* machine specific files */
460 #define LDID_HOST_WINBOOT 28
461 #define LDID_BOOT 30 /* boot drive root dir */
462 #define LDID_BOOT_HOST 31 /* boot drive host root dir */
463 #define LDID_OLD_WINBOOT 32 /* root subdir */
464 #define LDID_OLD_WIN 33 /* old windows dir */
466 /* flags for GenInstall() */
467 #define GENINSTALL_DO_FILES 1
468 #define GENINSTALL_DO_INI 2
469 #define GENINSTALL_DO_REG 4
470 #define GENINSTALL_DO_INI2REG 8
471 #define GENINSTALL_DO_CFGAUTO 16
472 #define GENINSTALL_DO_LOGCONFIG 32
473 #define GENINSTALL_DO_REGSRCPATH 64
474 #define GENINSTALL_DO_PERUSER 128
476 #define GEINISTALL_DO_INIREG 14
477 #define GENINSTALL_DO_ALL 255
480 * flags for InstallHinfSection()
481 * 128 can be added, too. This means that the .inf file is provided by you
482 * instead of being a 32 bit file (i.e. Windows .inf file).
483 * In this case all files you install must be in the same dir
484 * as your .inf file on the install disk.
486 #define HOW_NEVER_REBOOT 0
487 #define HOW_ALWAYS_SILENT_REBOOT 1
488 #define HOW_ALWAYS_PROMPT_REBOOT 2
489 #define HOW_SILENT_REBOOT 3
490 #define HOW_PROMPT_REBOOT 4
492 /****** device installation stuff ******/
494 #define MAX_CLASS_NAME_LEN 32
495 #define MAX_DEVNODE_ID_LEN 256
496 #define MAX_GUID_STR 50
498 typedef struct _DEVICE_INFO
501 struct _DEVICE_INFO *lpNextDi;
502 char szDescription[LINE_LEN];
505 char szRegSubkey[MAX_DEVNODE_ID_LEN];
506 char szClassName[MAX_CLASS_NAME_LEN];
509 /*LPDRIVER_NODE*/ LPVOID lpCompatDrvList;
510 /*LPDRIVER_NODE*/ LPVOID lpClassDrvList;
511 /*LPDRIVER_NODE*/ LPVOID lpSelectedDriver;
514 HINSTANCE16 hinstClassInstaller;
515 HINSTANCE16 hinstClassPropProvidor;
516 HINSTANCE16 hinstDevicePropProvidor;
517 HINSTANCE16 hinstBasicPropProvidor;
518 FARPROC16 fpClassInstaller;
519 FARPROC16 fpClassEnumPropPages;
520 FARPROC16 fpDeviceEnumPropPages;
521 FARPROC16 fpEnumBasicProperties;
522 DWORD dwSetupReserved;
523 DWORD dwClassInstallReserved;
524 /*GENCALLBACKPROC*/ LPVOID gicpGenInstallCallBack;
529 HINSTANCE16 hinstPrivateProblemHandler;
530 FARPROC16 fpPrivateProblemHandler;
531 LPARAM lpClassInstallParams;
532 struct _DEVICE_INFO *lpdiChildList;
534 /*LPDRIVER_INFO*/ LPVOID lpCompatDrvInfoList;
535 /*LPDRIVER_INFO*/ LPVOID lpClassDrvInfoList;
536 char szClassGUID[MAX_GUID_STR];
537 } DEVICE_INFO16, *LPDEVICE_INFO16, **LPLPDEVICE_INFO16;
540 extern void WINAPI GenFormStrWithoutPlaceHolders16(LPSTR,LPCSTR,HINF16);
541 extern RETERR16 WINAPI IpOpen16(LPCSTR,HINF16 *);
542 extern RETERR16 WINAPI IpClose16(HINF16);
543 extern RETERR16 WINAPI CtlSetLdd16(LPLOGDISKDESC);
544 extern RETERR16 WINAPI CtlGetLdd16(LPLOGDISKDESC);
545 extern RETERR16 WINAPI CtlFindLdd16(LPLOGDISKDESC);
546 extern RETERR16 WINAPI CtlAddLdd16(LPLOGDISKDESC);
547 extern RETERR16 WINAPI CtlDelLdd16(LOGDISKID16);
548 extern RETERR16 WINAPI CtlGetLddPath16(LOGDISKID16 ldid, LPSTR szPath);
549 extern RETERR16 WINAPI GenInstall16(HINF16,LPCSTR,WORD);
551 typedef struct tagLDD_LIST {
553 struct tagLDD_LIST *next;
556 #define INIT_LDD(ldd, LDID) \
558 memset(&(ldd), 0, sizeof(LOGDISKDESC_S)); \
559 (ldd).cbSize = sizeof(LOGDISKDESC_S); \
563 #endif /* __SETUPX16_H */