source: trunk/src/setupapi/setupx16.h@ 22015

Last change on this file since 22015 was 9403, checked in by sandervl, 23 years ago

Wine resync

File size: 14.2 KB
Line 
1/*
2 * Copyright 2000 Andreas Mohr for Codeweavers
3 *
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.
8 *
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.
13 *
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
17 */
18
19#ifndef __SETUPX16_H
20#define __SETUPX16_H
21
22#include "wine/windef16.h"
23
24typedef UINT16 HINF16;
25typedef UINT16 LOGDISKID16;
26typedef UINT16 VHSTR;
27
28#define LINE_LEN 256
29
30/* error codes stuff */
31
32typedef UINT16 RETERR16;
33#define OK 0
34#define IP_ERROR (UINT16)100
35#define TP_ERROR (UINT16)200
36#define VCP_ERROR (UINT16)300
37#define GEN_ERROR (UINT16)400
38#define DI_ERROR (UINT16)500
39
40enum {
41 ERR_IP_INVALID_FILENAME = IP_ERROR+1,
42 ERR_IP_ALLOC_ERR,
43 ERR_IP_INVALID_SECT_NAME,
44 ERR_IP_OUT_OF_HANDLES,
45 ERR_IP_INF_NOT_FOUND,
46 ERR_IP_INVALID_INFFILE,
47 ERR_IP_INVALID_HINF,
48 ERR_IP_INVALID_FIELD,
49 ERR_IP_SECT_NOT_FOUND,
50 ERR_IP_END_OF_SECTION,
51 ERR_IP_PROFILE_NOT_FOUND,
52 ERR_IP_LINE_NOT_FOUND,
53 ERR_IP_FILEREAD,
54 ERR_IP_TOOMANYINFFILES,
55 ERR_IP_INVALID_SAVERESTORE,
56 ERR_IP_INVALID_INFTYPE
57};
58
59/****** virtual copy operations ******/
60
61typedef DWORD LPEXPANDVTBL;
62
63typedef struct {
64 DWORD dwSoFar;
65 DWORD dwTotal;
66} VCPPROGRESS, *LPVCPPROGRESS;
67
68typedef struct {
69 WORD cbSize;
70 LOGDISKID16 ldid;
71 VHSTR vhstrRoot;
72 VHSTR vhstrVolumeLabel;
73 VHSTR vhstrDiskName;
74 WORD wVolumeTime;
75 WORD wVolumeDate;
76 DWORD dwSerialNumber;
77 WORD fl;
78 LPARAM lparamRef;
79
80 VCPPROGRESS prgFileRead;
81 VCPPROGRESS prgByteRead;
82
83 VCPPROGRESS prgFileWrite;
84 VCPPROGRESS prgByteWrite;
85} VCPDISKINFO, *LPVCPDISKINFO;
86
87typedef struct {
88 LOGDISKID16 ldid;
89 VHSTR vhstrDir;
90 VHSTR vhstrFileName;
91} VCPFILESPEC, *LPVCPFILESPEC;
92
93typedef struct {
94 UINT16 uiMDate;
95 UINT16 uiMTime;
96 UINT16 uiADate;
97 UINT16 uiATime;
98 UINT16 uiAttr;
99 DWORD llenIn;
100 DWORD llenOut;
101} VCPFATTR, *LPVCPFATTR;
102
103typedef struct {
104 UINT16 uDate;
105 UINT16 uTime;
106 DWORD dwSize;
107} VCPFILESTAT, *LPVCPFILESTAT;
108
109typedef struct
110{
111 HFILE16 hFileSrc;
112 HFILE16 hFileDst;
113 VCPFATTR fAttr;
114 WORD dosError;
115 VHSTR vhstrFileName;
116 WPARAM vcpm;
117} VIRTNODEEX, *LPVIRTNODEEX;
118
119typedef struct {
120 WORD cbSize;
121 VCPFILESPEC vfsSrc;
122 VCPFILESPEC vfsDst;
123 WORD fl;
124 LPARAM lParam;
125 LPEXPANDVTBL lpExpandVtbl;
126 LPVIRTNODEEX lpvnex;
127 VHSTR vhstrDstFinalName;
128 VCPFILESTAT vFileStat;
129} VIRTNODE, *LPVIRTNODE;
130
131typedef struct {
132 WORD cbSize;
133 VCPPROGRESS prgDiskRead;
134 VCPPROGRESS prgFileRead;
135 VCPPROGRESS prgByteRead;
136
137 VCPPROGRESS prgDiskWrite;
138 VCPPROGRESS prgFileWrite;
139 VCPPROGRESS prgByteWrite;
140
141 LPVCPDISKINFO lpvdiIn;
142 LPVCPDISKINFO lpvdiOut;
143 LPVIRTNODE lpvn;
144} VCPSTATUS, *LPVCPSTATUS;
145
146#define CNFL_BACKUP 0x0001
147#define CNFL_DELETEONFAILURE 0x0002
148#define CNFL_RENAMEONSUCCESS 0x0004
149#define CNFL_CONTINUATION 0x0008
150#define CNFL_SKIPPED 0x0010
151#define CNFL_IGNOREERRORS 0x0020
152#define CNFL_RETRYFILE 0x0040
153#define CNFL_COPIED 0x0080
154#define VNFL_UNIQUE 0x0000
155#define VNFL_MULTIPLEOK 0x0100
156#define VNFL_DESTROYOLD 0x0200
157#define VNFL_COPY 0x0000
158#define VNFL_DELETE 0x0800
159#define VNFL_RENAME 0x1000
160#define VNFL_NODE_TYPE (VNFL_RENAME|VNFL_DELETE|VNFL_COPY)
161#define VNFL_CREATED 0x2000
162#define VNFL_REJECTED 0x4000
163#define VNFL_DEVICEINSTALLER 0x8000
164
165enum {
166 ERR_VCP_IOFAIL = VCP_ERROR+1,
167 ERR_VCP_STRINGTOOLONG,
168 ERR_VCP_NOMEM,
169 ERR_VCP_QUEUEFULL,
170 ERR_VCP_NOVHSTR,
171 ERR_VCP_OVERFLOW,
172 ERR_VCP_BADARG,
173 ERR_VCP_UNINIT,
174 ERR_VCP_NOTFOUND,
175 ERR_VCP_BUSY,
176 ERR_VCP_INTERRUPTED,
177 ERR_VCP_BADDEST,
178 ERR_VCP_SKIPPED,
179 ERR_VCP_IO,
180 ERR_VCP_LOCKED,
181 ERR_VCP_WRONGDISK,
182 ERR_VCP_CHANGEMODE,
183 ERR_VCP_LDDINVALID,
184 ERR_VCP_LDDFIND,
185 ERR_VCP_LDDUNINIT,
186 ERR_VCP_LDDPATH_INVALID,
187 ERR_VCP_NOEXPANSION,
188 ERR_VCP_NOTOPEN,
189 ERR_VCP_NO_DIGITAL_SIGNATURE_CATALOG,
190 ERR_VCP_NO_DIGITAL_SIGNATURE_FILE
191};
192
193#define VCPN_OK 0
194#define VCPN_PROCEED 0
195#define VCPN_ABORT -1
196#define VCPN_RETRY -2
197#define VCPN_IGNORE -3
198#define VCPN_SKIP -4
199#define VCPN_FORCE -5
200#define VCPN_DEFER -6
201#define VCPN_FAIL -7
202#define VCPN_RETRYFILE -8
203
204#define VCPFL_ABANDON 0x00
205#define VCPFL_BACKUP 0x01
206#define VCPFL_COPY 0x02
207#define VCPFL_BACKUPANDCOPY (VCPFL_BACKUP|VCPFL_COPY)
208#define VCPFL_INSPECIFIEDORDER 0x04
209#define VCPFL_DELETE 0x08
210#define VCPFL_RENAME 0x10
211#define VCPFL_ALL (VCPFL_COPY|VCPFL_DELETE|VCPFL_RENAME)
212
213#define CFNL_BACKUP 0x0001
214#define CFNL_DELETEONFAILURE 0x0002
215#define CFNL_RENAMEONSUCCESS 0x0004
216#define CFNL_CONTINUATION 0x0008
217#define CFNL_SKIPPED 0x0010
218#define CFNL_IGNOREERRORS 0x0020
219#define CFNL_RETRYFILE 0x0040
220#define CFNL_COPIED 0x0080
221#define VFNL_MULTIPLEOK 0x0100
222#define VFNL_DESTROYOLD 0x0200
223#define VFNL_NOW 0x0400
224#define VFNL_COPY 0x0000
225#define VFNL_DELETE 0x0800
226#define VFNL_RENAME 0x1000
227#define VFNL_CREATED 0x2000
228#define VFNL_REJECTED 0x4000
229#define VCPM_DISKCLASS 0x01
230#define VCPM_DISKFIRST 0x0100
231#define VCPM_DISKLAST 0x01ff
232
233enum {
234 VCPM_DISKCREATEINFO = VCPM_DISKFIRST,
235 VCPM_DISKGETINFO,
236 VCPM_DISKDESTROYINFO,
237 VCPM_DISKPREPINFO,
238 VCPM_DISKENSURE,
239 VCPM_DISKPROMPT,
240 VCPM_DISKFORMATBEGIN,
241 VCPM_DISKFORMATTING,
242 VCPM_DISKFORMATEND
243};
244
245#define VCPM_FILEINCLASS 0x02
246#define VCPM_FILEOUTCLASS 0x03
247#define VCPM_FILEFIRSTIN 0x0200
248#define VCPM_FILEFIRSTOUT 0x0300
249#define VCPM_FILELAST 0x03ff
250
251enum {
252 VCPM_FILEOPENIN = VCPM_FILEFIRSTIN,
253 VCPM_FILEGETFATTR,
254 VCPM_FILECLOSEIN,
255 VCPM_FILECOPY,
256 VCPM_FILENEEDED,
257
258 VCPM_FILEOPENOUT = VCPM_FILEFIRSTOUT,
259 VCPM_FILESETFATTR,
260 VCPM_FILECLOSEOUT,
261 VCPM_FILEFINALIZE,
262 VCPM_FILEDELETE,
263 VCPM_FILERENAME
264};
265
266#define VCPM_NODECLASS 0x04
267#define VCPM_NODEFIRST 0x0400
268#define VCPM_NODELAST 0x04ff
269
270enum {
271 VCPM_NODECREATE = VCPM_NODEFIRST,
272 VCPM_NODEACCEPT,
273 VCPM_NODEREJECT,
274 VCPM_NODEDESTROY,
275 VCPM_NODECHANGEDESTDIR,
276 VCPM_NODECOMPARE
277};
278
279#define VCPM_TALLYCLASS 0x05
280#define VCPM_TALLYFIRST 0x0500
281#define VCPM_TALLYLAST 0x05ff
282
283enum {
284 VCPM_TALLYSTART = VCPM_TALLYFIRST,
285 VCPM_TALLYEND,
286 VCPM_TALLYFILE,
287 VCPM_TALLYDISK
288};
289
290#define VCPM_VERCLASS 0x06
291#define VCPM_VERFIRST 0x0600
292#define VCPM_VERLAST 0x06ff
293
294enum {
295 VCPM_VERCHECK = VCPM_VERFIRST,
296 VCPM_VERCHECKDONE,
297 VCPM_VERRESOLVECONFLICT
298};
299
300#define VCPM_VSTATCLASS 0x07
301#define VCPM_VSTATFIRST 0x0700
302#define VCPM_VSTATLAST 0x07ff
303
304enum {
305 VCPM_VSTATSTART = VCPM_VSTATFIRST,
306 VCPM_VSTATEND,
307 VCPM_VSTATREAD,
308 VCPM_VSTATWRITE,
309 VCPM_VSTATNEWDISK,
310 VCPM_VSTATCLOSESTART,
311 VCPM_VSTATCLOSEEND,
312 VCPM_VSTATBACKUPSTART,
313 VCPM_VSTATBACKUPEND,
314 VCPM_VSTATRENAMESTART,
315 VCPM_VSTATRENAMEEND,
316 VCPM_VSTATCOPYSTART,
317 VCPM_VSTATCOPYEND,
318 VCPM_VSTATDELETESTART,
319 VCPM_VSTATDELETEEND,
320 VCPM_VSTATPATHCHECKSTART,
321 VCPM_VSTATPATHCHECKEND,
322 VCPM_VSTATCERTIFYSTART,
323 VCPM_VSTATCERTIFYEND,
324 VCPM_VSTATUSERABORT,
325 VCPM_VSTATYIELD
326};
327
328#define VCPM_PATHCLASS 0x08
329#define VCPM_PATHFIRST 0x0800
330#define VCPM_PATHLAST 0x08ff
331
332enum {
333 VCPM_BUILDPATH = VCPM_PATHFIRST,
334 VCPM_UNIQUEPATH,
335 VCPM_CHECKPATH
336};
337
338#define VCPM_PATCHCLASS 0x09
339#define VCPM_PATCHFIRST 0x0900
340#define VCPM_PATCHLAST 0x09ff
341
342enum {
343 VCPM_FILEPATCHBEFORECPY = VCPM_PATCHFIRST,
344 VCPM_FILEPATCHAFTERCPY,
345 VCPM_FILEPATCHINFOPEN,
346 VCPM_FILEPATCHINFCLOSE
347};
348
349#define VCPM_CERTCLASS 0x0a
350#define VCPM_CERTFIRST 0x0a00
351#define VCPM_CERTLAST 0x0aff
352
353enum {
354 VCPM_FILECERTIFY = VCPM_CERTFIRST,
355 VCPM_FILECERTIFYWARN
356};
357
358#ifdef __WIN32OS2__
359typedef LRESULT (* CALLBACK VIFPROC)(LPVOID lpvObj, UINT16 uMsg, WPARAM wParam, LPARAM lParam, LPARAM lparamRef);
360typedef int (* CALLBACK VCPENUMPROC)(LPVIRTNODE lpvn, LPARAM lparamRef);
361#else
362typedef LRESULT (CALLBACK *VIFPROC)(LPVOID lpvObj, UINT16 uMsg, WPARAM wParam, LPARAM lParam, LPARAM lparamRef);
363
364typedef int (CALLBACK *VCPENUMPROC)(LPVIRTNODE lpvn, LPARAM lparamRef);
365#endif
366
367RETERR16 WINAPI VcpOpen16(VIFPROC vifproc, LPARAM lparamMsgRef);
368
369/* VcpQueueCopy flags */
370#define VNLP_SYSCRITICAL 0x0001
371#define VNLP_SETUPCRITICAL 0x0002
372#define VNLP_NOVERCHECK 0x0004
373#define VNLP_FORCETEMP 0x0008
374#define VNLP_IFEXISTS 0x0010
375#define VNLP_KEEPNEWER 0x0020
376#define VNLP_PATCHIFEXIST 0x0040
377#define VNLP_NOPATCH 0x0080
378#define VNLP_CATALOGCERT 0x0100
379#define VNLP_NEEDCERTIFY 0x0200
380#define VNLP_COPYIFEXISTS 0x0400
381
382RETERR16 WINAPI VcpQueueCopy16(
383 LPCSTR lpszSrcFileName, LPCSTR lpszDstFileName,
384 LPCSTR lpszSrcDir, LPCSTR lpszDstDir,
385 LOGDISKID16 ldidSrc, LOGDISKID16 ldidDst,
386 LPEXPANDVTBL lpExpandVtbl,
387 WORD fl, LPARAM lParam
388);
389RETERR16 VcpFlush16(WORD fl, LPCSTR lpszBackupDest);
390RETERR16 WINAPI VcpClose16(WORD fl, LPCSTR lpszBackupDest);
391
392/* VcpExplain flags */
393enum {
394 VCPEX_SRC_DISK,
395 VCPEX_SRC_CABINET,
396 VCPEX_SRC_LOCN,
397 VCPEX_DST_LOCN,
398 VCPEX_SRC_FILE,
399 VCPEX_DST_FILE,
400 VCPEX_DST_FILE_FINAL,
401 VCPEX_DOS_ERROR,
402 VCPEX_MESSAGE,
403 VCPEX_DOS_SOLUTION,
404 VCPEX_SRC_FULL,
405 VCPEX_DST_FULL,
406 VCPEX_DST_FULL_FINAL
407};
408
409LPCSTR WINAPI VcpExplain16(LPVIRTNODE lpVn, DWORD dwWhat);
410
411/****** logical disk management ******/
412
413typedef struct _LOGDISKDESC_S { /* ldd */
414 WORD cbSize; /* struct size */
415 LOGDISKID16 ldid; /* logical disk ID */
416 LPSTR pszPath; /* path this descriptor points to */
417 LPSTR pszVolLabel; /* volume label of the disk related to it */
418 LPSTR pszDiskName; /* name of this disk */
419 WORD wVolTime; /* modification time of volume label */
420 WORD wVolDate; /* modification date */
421 DWORD dwSerNum; /* serial number of disk */
422 WORD wFlags;
423} LOGDISKDESC_S, *LPLOGDISKDESC;
424
425/** logical disk identifiers (LDID) **/
426
427/* predefined LDIDs */
428#define LDID_PREDEF_START 0x0001
429#define LDID_PREDEF_END 0x7fff
430
431/* registry-assigned LDIDs */
432#define LDID_VAR_START 0x7000
433#define LDID_VAR_END 0x7fff
434
435/* dynamically assigned LDIDs */
436#define LDID_ASSIGN_START 0x8000
437#define LDID_ASSIGN_END 0xbfff
438
439#define LDID_NULL 0
440#define LDID_ABSOLUTE ((UINT)-1)
441#define LDID_SRCPATH 1 /* setup source path */
442#define LDID_SETUPTEMP 2 /* setup temp dir */
443#define LDID_UNINSTALL 3 /* uninstall dir */
444#define LDID_BACKUP 4 /* backup dir */
445#define LDID_SETUPSCRATCH 5 /* setup scratch dir */
446#define LDID_WIN 10 /* win dir */
447#define LDID_SYS 11 /* win system dir */
448#define LDID_IOS 12 /* win Iosubsys dir */
449#define LDID_CMD 13 /* win command dir */
450#define LDID_CPL 14 /* win control panel dir */
451#define LDID_PRINT 15 /* win printer dir */
452#define LDID_MAIL 16 /* win mail dir */
453#define LDID_INF 17 /* win inf dir */
454#define LDID_HELP 18 /* win help dir */
455#define LDID_WINADMIN 19 /* admin dir */
456#define LDID_FONTS 20 /* win fonts dir */
457#define LDID_VIEWERS 21 /* win viewers dir */
458#define LDID_VMM32 22 /* win VMM32 dir */
459#define LDID_COLOR 23 /* win color mngment dir */
460#define LDID_APPS 24 /* win apps dir */
461#define LDID_SHARED 25 /* win shared dir */
462#define LDID_WINBOOT 26 /* guaranteed win boot drive */
463#define LDID_MACHINE 27 /* machine specific files */
464#define LDID_HOST_WINBOOT 28
465#define LDID_BOOT 30 /* boot drive root dir */
466#define LDID_BOOT_HOST 31 /* boot drive host root dir */
467#define LDID_OLD_WINBOOT 32 /* root subdir */
468#define LDID_OLD_WIN 33 /* old windows dir */
469
470/* flags for GenInstall() */
471#define GENINSTALL_DO_FILES 1
472#define GENINSTALL_DO_INI 2
473#define GENINSTALL_DO_REG 4
474#define GENINSTALL_DO_INI2REG 8
475#define GENINSTALL_DO_CFGAUTO 16
476#define GENINSTALL_DO_LOGCONFIG 32
477#define GENINSTALL_DO_REGSRCPATH 64
478#define GENINSTALL_DO_PERUSER 128
479
480#define GEINISTALL_DO_INIREG 14
481#define GENINSTALL_DO_ALL 255
482
483/*
484 * flags for InstallHinfSection()
485 * 128 can be added, too. This means that the .inf file is provided by you
486 * instead of being a 32 bit file (i.e. Windows .inf file).
487 * In this case all files you install must be in the same dir
488 * as your .inf file on the install disk.
489 */
490#define HOW_NEVER_REBOOT 0
491#define HOW_ALWAYS_SILENT_REBOOT 1
492#define HOW_ALWAYS_PROMPT_REBOOT 2
493#define HOW_SILENT_REBOOT 3
494#define HOW_PROMPT_REBOOT 4
495
496/****** device installation stuff ******/
497
498#define MAX_CLASS_NAME_LEN 32
499#define MAX_DEVNODE_ID_LEN 256
500#define MAX_GUID_STR 50
501
502typedef struct _DEVICE_INFO
503{
504 UINT16 cbSize;
505 struct _DEVICE_INFO *lpNextDi;
506 char szDescription[LINE_LEN];
507 DWORD dnDevnode;
508 HKEY hRegKey;
509 char szRegSubkey[MAX_DEVNODE_ID_LEN];
510 char szClassName[MAX_CLASS_NAME_LEN];
511 DWORD Flags;
512 HWND16 hwndParent;
513 /*LPDRIVER_NODE*/ LPVOID lpCompatDrvList;
514 /*LPDRIVER_NODE*/ LPVOID lpClassDrvList;
515 /*LPDRIVER_NODE*/ LPVOID lpSelectedDriver;
516 ATOM atDriverPath;
517 ATOM atTempInfFile;
518 HINSTANCE16 hinstClassInstaller;
519 HINSTANCE16 hinstClassPropProvidor;
520 HINSTANCE16 hinstDevicePropProvidor;
521 HINSTANCE16 hinstBasicPropProvidor;
522 FARPROC16 fpClassInstaller;
523 FARPROC16 fpClassEnumPropPages;
524 FARPROC16 fpDeviceEnumPropPages;
525 FARPROC16 fpEnumBasicProperties;
526 DWORD dwSetupReserved;
527 DWORD dwClassInstallReserved;
528 /*GENCALLBACKPROC*/ LPVOID gicpGenInstallCallBack;
529
530 LPARAM gicplParam;
531 UINT16 InfType;
532
533 HINSTANCE16 hinstPrivateProblemHandler;
534 FARPROC16 fpPrivateProblemHandler;
535 LPARAM lpClassInstallParams;
536 struct _DEVICE_INFO *lpdiChildList;
537 DWORD dwFlagsEx;
538 /*LPDRIVER_INFO*/ LPVOID lpCompatDrvInfoList;
539 /*LPDRIVER_INFO*/ LPVOID lpClassDrvInfoList;
540 char szClassGUID[MAX_GUID_STR];
541} DEVICE_INFO16, *LPDEVICE_INFO16, **LPLPDEVICE_INFO16;
542
543
544extern void WINAPI GenFormStrWithoutPlaceHolders16(LPSTR,LPCSTR,HINF16);
545extern RETERR16 WINAPI IpOpen16(LPCSTR,HINF16 *);
546extern RETERR16 WINAPI IpClose16(HINF16);
547extern RETERR16 WINAPI CtlSetLdd16(LPLOGDISKDESC);
548extern RETERR16 WINAPI CtlGetLdd16(LPLOGDISKDESC);
549extern RETERR16 WINAPI CtlFindLdd16(LPLOGDISKDESC);
550extern RETERR16 WINAPI CtlAddLdd16(LPLOGDISKDESC);
551extern RETERR16 WINAPI CtlDelLdd16(LOGDISKID16);
552extern RETERR16 WINAPI CtlGetLddPath16(LOGDISKID16 ldid, LPSTR szPath);
553extern RETERR16 WINAPI GenInstall16(HINF16,LPCSTR,WORD);
554
555#endif /* __SETUPX16_H */
Note: See TracBrowser for help on using the repository browser.