d3dcompiler: Store (and begin to use) location information for variables.
[wine/multimedia.git] / dlls / setupx.dll16 / setupx16.h
blobf348340d016301a4fd6dbc8b42444818fabf1ccc
1 /*
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __SETUPX16_H
20 #define __SETUPX16_H
22 #include "wine/windef16.h"
24 typedef UINT16 DI_FUNCTION16;
25 typedef UINT16 HINF16;
26 typedef UINT16 LOGDISKID16;
27 typedef UINT16 VHSTR;
29 #define LINE_LEN 256
31 /* error codes stuff */
33 typedef UINT16 RETERR16;
34 #define OK 0
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
41 enum {
42 ERR_IP_INVALID_FILENAME = IP_ERROR+1,
43 ERR_IP_ALLOC_ERR,
44 ERR_IP_INVALID_SECT_NAME,
45 ERR_IP_OUT_OF_HANDLES,
46 ERR_IP_INF_NOT_FOUND,
47 ERR_IP_INVALID_INFFILE,
48 ERR_IP_INVALID_HINF,
49 ERR_IP_INVALID_FIELD,
50 ERR_IP_SECT_NOT_FOUND,
51 ERR_IP_END_OF_SECTION,
52 ERR_IP_PROFILE_NOT_FOUND,
53 ERR_IP_LINE_NOT_FOUND,
54 ERR_IP_FILEREAD,
55 ERR_IP_TOOMANYINFFILES,
56 ERR_IP_INVALID_SAVERESTORE,
57 ERR_IP_INVALID_INFTYPE
60 /****** virtual copy operations ******/
62 typedef DWORD LPEXPANDVTBL;
64 typedef struct {
65 DWORD dwSoFar;
66 DWORD dwTotal;
67 } VCPPROGRESS, *LPVCPPROGRESS;
69 typedef struct {
70 WORD cbSize;
71 LOGDISKID16 ldid;
72 VHSTR vhstrRoot;
73 VHSTR vhstrVolumeLabel;
74 VHSTR vhstrDiskName;
75 WORD wVolumeTime;
76 WORD wVolumeDate;
77 DWORD dwSerialNumber;
78 WORD fl;
79 LPARAM lparamRef;
81 VCPPROGRESS prgFileRead;
82 VCPPROGRESS prgByteRead;
84 VCPPROGRESS prgFileWrite;
85 VCPPROGRESS prgByteWrite;
86 } VCPDISKINFO, *LPVCPDISKINFO;
88 typedef struct {
89 LOGDISKID16 ldid;
90 VHSTR vhstrDir;
91 VHSTR vhstrFileName;
92 } VCPFILESPEC, *LPVCPFILESPEC;
94 typedef struct {
95 UINT16 uiMDate;
96 UINT16 uiMTime;
97 UINT16 uiADate;
98 UINT16 uiATime;
99 UINT16 uiAttr;
100 DWORD llenIn;
101 DWORD llenOut;
102 } VCPFATTR, *LPVCPFATTR;
104 typedef struct {
105 UINT16 uDate;
106 UINT16 uTime;
107 DWORD dwSize;
108 } VCPFILESTAT, *LPVCPFILESTAT;
110 typedef struct
112 HFILE16 hFileSrc;
113 HFILE16 hFileDst;
114 VCPFATTR fAttr;
115 WORD dosError;
116 VHSTR vhstrFileName;
117 WPARAM vcpm;
118 } VIRTNODEEX, *LPVIRTNODEEX;
120 typedef struct {
121 WORD cbSize;
122 VCPFILESPEC vfsSrc;
123 VCPFILESPEC vfsDst;
124 WORD fl;
125 LPARAM lParam;
126 LPEXPANDVTBL lpExpandVtbl;
127 LPVIRTNODEEX lpvnex;
128 VHSTR vhstrDstFinalName;
129 VCPFILESTAT vFileStat;
130 } VIRTNODE, *LPVIRTNODE;
132 typedef struct {
133 WORD cbSize;
134 VCPPROGRESS prgDiskRead;
135 VCPPROGRESS prgFileRead;
136 VCPPROGRESS prgByteRead;
138 VCPPROGRESS prgDiskWrite;
139 VCPPROGRESS prgFileWrite;
140 VCPPROGRESS prgByteWrite;
142 LPVCPDISKINFO lpvdiIn;
143 LPVCPDISKINFO lpvdiOut;
144 LPVIRTNODE lpvn;
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
166 enum {
167 ERR_VCP_IOFAIL = VCP_ERROR+1,
168 ERR_VCP_STRINGTOOLONG,
169 ERR_VCP_NOMEM,
170 ERR_VCP_QUEUEFULL,
171 ERR_VCP_NOVHSTR,
172 ERR_VCP_OVERFLOW,
173 ERR_VCP_BADARG,
174 ERR_VCP_UNINIT,
175 ERR_VCP_NOTFOUND,
176 ERR_VCP_BUSY,
177 ERR_VCP_INTERRUPTED,
178 ERR_VCP_BADDEST,
179 ERR_VCP_SKIPPED,
180 ERR_VCP_IO,
181 ERR_VCP_LOCKED,
182 ERR_VCP_WRONGDISK,
183 ERR_VCP_CHANGEMODE,
184 ERR_VCP_LDDINVALID,
185 ERR_VCP_LDDFIND,
186 ERR_VCP_LDDUNINIT,
187 ERR_VCP_LDDPATH_INVALID,
188 ERR_VCP_NOEXPANSION,
189 ERR_VCP_NOTOPEN,
190 ERR_VCP_NO_DIGITAL_SIGNATURE_CATALOG,
191 ERR_VCP_NO_DIGITAL_SIGNATURE_FILE
194 #define VCPN_OK 0
195 #define VCPN_PROCEED 0
196 #define VCPN_ABORT -1
197 #define VCPN_RETRY -2
198 #define VCPN_IGNORE -3
199 #define VCPN_SKIP -4
200 #define VCPN_FORCE -5
201 #define VCPN_DEFER -6
202 #define VCPN_FAIL -7
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
234 enum {
235 VCPM_DISKCREATEINFO = VCPM_DISKFIRST,
236 VCPM_DISKGETINFO,
237 VCPM_DISKDESTROYINFO,
238 VCPM_DISKPREPINFO,
239 VCPM_DISKENSURE,
240 VCPM_DISKPROMPT,
241 VCPM_DISKFORMATBEGIN,
242 VCPM_DISKFORMATTING,
243 VCPM_DISKFORMATEND
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
252 enum {
253 VCPM_FILEOPENIN = VCPM_FILEFIRSTIN,
254 VCPM_FILEGETFATTR,
255 VCPM_FILECLOSEIN,
256 VCPM_FILECOPY,
257 VCPM_FILENEEDED,
259 VCPM_FILEOPENOUT = VCPM_FILEFIRSTOUT,
260 VCPM_FILESETFATTR,
261 VCPM_FILECLOSEOUT,
262 VCPM_FILEFINALIZE,
263 VCPM_FILEDELETE,
264 VCPM_FILERENAME
267 #define VCPM_NODECLASS 0x04
268 #define VCPM_NODEFIRST 0x0400
269 #define VCPM_NODELAST 0x04ff
271 enum {
272 VCPM_NODECREATE = VCPM_NODEFIRST,
273 VCPM_NODEACCEPT,
274 VCPM_NODEREJECT,
275 VCPM_NODEDESTROY,
276 VCPM_NODECHANGEDESTDIR,
277 VCPM_NODECOMPARE
280 #define VCPM_TALLYCLASS 0x05
281 #define VCPM_TALLYFIRST 0x0500
282 #define VCPM_TALLYLAST 0x05ff
284 enum {
285 VCPM_TALLYSTART = VCPM_TALLYFIRST,
286 VCPM_TALLYEND,
287 VCPM_TALLYFILE,
288 VCPM_TALLYDISK
291 #define VCPM_VERCLASS 0x06
292 #define VCPM_VERFIRST 0x0600
293 #define VCPM_VERLAST 0x06ff
295 enum {
296 VCPM_VERCHECK = VCPM_VERFIRST,
297 VCPM_VERCHECKDONE,
298 VCPM_VERRESOLVECONFLICT
301 #define VCPM_VSTATCLASS 0x07
302 #define VCPM_VSTATFIRST 0x0700
303 #define VCPM_VSTATLAST 0x07ff
305 enum {
306 VCPM_VSTATSTART = VCPM_VSTATFIRST,
307 VCPM_VSTATEND,
308 VCPM_VSTATREAD,
309 VCPM_VSTATWRITE,
310 VCPM_VSTATNEWDISK,
311 VCPM_VSTATCLOSESTART,
312 VCPM_VSTATCLOSEEND,
313 VCPM_VSTATBACKUPSTART,
314 VCPM_VSTATBACKUPEND,
315 VCPM_VSTATRENAMESTART,
316 VCPM_VSTATRENAMEEND,
317 VCPM_VSTATCOPYSTART,
318 VCPM_VSTATCOPYEND,
319 VCPM_VSTATDELETESTART,
320 VCPM_VSTATDELETEEND,
321 VCPM_VSTATPATHCHECKSTART,
322 VCPM_VSTATPATHCHECKEND,
323 VCPM_VSTATCERTIFYSTART,
324 VCPM_VSTATCERTIFYEND,
325 VCPM_VSTATUSERABORT,
326 VCPM_VSTATYIELD
329 #define VCPM_PATHCLASS 0x08
330 #define VCPM_PATHFIRST 0x0800
331 #define VCPM_PATHLAST 0x08ff
333 enum {
334 VCPM_BUILDPATH = VCPM_PATHFIRST,
335 VCPM_UNIQUEPATH,
336 VCPM_CHECKPATH
339 #define VCPM_PATCHCLASS 0x09
340 #define VCPM_PATCHFIRST 0x0900
341 #define VCPM_PATCHLAST 0x09ff
343 enum {
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
354 enum {
355 VCPM_FILECERTIFY = VCPM_CERTFIRST,
356 VCPM_FILECERTIFYWARN
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 WINAPI VcpClose16(WORD fl, LPCSTR lpszBackupDest);
387 /* VcpExplain flags */
388 enum {
389 VCPEX_SRC_DISK,
390 VCPEX_SRC_CABINET,
391 VCPEX_SRC_LOCN,
392 VCPEX_DST_LOCN,
393 VCPEX_SRC_FILE,
394 VCPEX_DST_FILE,
395 VCPEX_DST_FILE_FINAL,
396 VCPEX_DOS_ERROR,
397 VCPEX_MESSAGE,
398 VCPEX_DOS_SOLUTION,
399 VCPEX_SRC_FULL,
400 VCPEX_DST_FULL,
401 VCPEX_DST_FULL_FINAL
404 LPCSTR WINAPI VcpExplain16(LPVIRTNODE lpVn, DWORD dwWhat);
406 /****** logical disk management ******/
408 typedef struct _LOGDISKDESC_S { /* ldd */
409 WORD cbSize; /* struct size */
410 LOGDISKID16 ldid; /* logical disk ID */
411 LPSTR pszPath; /* path this descriptor points to */
412 LPSTR pszVolLabel; /* volume label of the disk related to it */
413 LPSTR pszDiskName; /* name of this disk */
414 WORD wVolTime; /* modification time of volume label */
415 WORD wVolDate; /* modification date */
416 DWORD dwSerNum; /* serial number of disk */
417 WORD wFlags;
418 } LOGDISKDESC_S, *LPLOGDISKDESC;
420 /** logical disk identifiers (LDID) **/
422 /* predefined LDIDs */
423 #define LDID_PREDEF_START 0x0001
424 #define LDID_PREDEF_END 0x7fff
426 /* registry-assigned LDIDs */
427 #define LDID_VAR_START 0x7000
428 #define LDID_VAR_END 0x7fff
430 /* dynamically assigned LDIDs */
431 #define LDID_ASSIGN_START 0x8000
432 #define LDID_ASSIGN_END 0xbfff
434 #define LDID_NULL 0
435 #define LDID_ABSOLUTE ((UINT)-1)
436 #define LDID_SRCPATH 1 /* setup source path */
437 #define LDID_SETUPTEMP 2 /* setup temp dir */
438 #define LDID_UNINSTALL 3 /* uninstall dir */
439 #define LDID_BACKUP 4 /* backup dir */
440 #define LDID_SETUPSCRATCH 5 /* setup scratch dir */
441 #define LDID_WIN 10 /* win dir */
442 #define LDID_SYS 11 /* win system dir */
443 #define LDID_IOS 12 /* win Iosubsys dir */
444 #define LDID_CMD 13 /* win command dir */
445 #define LDID_CPL 14 /* win control panel dir */
446 #define LDID_PRINT 15 /* win printer dir */
447 #define LDID_MAIL 16 /* win mail dir */
448 #define LDID_INF 17 /* win inf dir */
449 #define LDID_HELP 18 /* win help dir */
450 #define LDID_WINADMIN 19 /* admin dir */
451 #define LDID_FONTS 20 /* win fonts dir */
452 #define LDID_VIEWERS 21 /* win viewers dir */
453 #define LDID_VMM32 22 /* win VMM32 dir */
454 #define LDID_COLOR 23 /* win color mngment dir */
455 #define LDID_APPS 24 /* win apps dir */
456 #define LDID_SHARED 25 /* win shared dir */
457 #define LDID_WINBOOT 26 /* guaranteed win boot drive */
458 #define LDID_MACHINE 27 /* machine specific files */
459 #define LDID_HOST_WINBOOT 28
460 #define LDID_BOOT 30 /* boot drive root dir */
461 #define LDID_BOOT_HOST 31 /* boot drive host root dir */
462 #define LDID_OLD_WINBOOT 32 /* root subdir */
463 #define LDID_OLD_WIN 33 /* old windows dir */
465 /* flags for GenInstall() */
466 #define GENINSTALL_DO_FILES 1
467 #define GENINSTALL_DO_INI 2
468 #define GENINSTALL_DO_REG 4
469 #define GENINSTALL_DO_INI2REG 8
470 #define GENINSTALL_DO_CFGAUTO 16
471 #define GENINSTALL_DO_LOGCONFIG 32
472 #define GENINSTALL_DO_REGSRCPATH 64
473 #define GENINSTALL_DO_PERUSER 128
475 #define GEINISTALL_DO_INIREG 14
476 #define GENINSTALL_DO_ALL 255
479 * flags for InstallHinfSection()
480 * 128 can be added, too. This means that the .inf file is provided by you
481 * instead of being a 32 bit file (i.e. Windows .inf file).
482 * In this case all files you install must be in the same dir
483 * as your .inf file on the install disk.
485 #define HOW_NEVER_REBOOT 0
486 #define HOW_ALWAYS_SILENT_REBOOT 1
487 #define HOW_ALWAYS_PROMPT_REBOOT 2
488 #define HOW_SILENT_REBOOT 3
489 #define HOW_PROMPT_REBOOT 4
491 /****** device installation stuff ******/
493 #define MAX_CLASS_NAME_LEN 32
494 #define MAX_DEVNODE_ID_LEN 256
495 #define MAX_GUID_STR 50
497 typedef struct _DEVICE_INFO
499 UINT16 cbSize;
500 struct _DEVICE_INFO *lpNextDi;
501 char szDescription[LINE_LEN];
502 DWORD dnDevnode;
503 HKEY hRegKey;
504 char szRegSubkey[MAX_DEVNODE_ID_LEN];
505 char szClassName[MAX_CLASS_NAME_LEN];
506 DWORD Flags;
507 HWND16 hwndParent;
508 /*LPDRIVER_NODE*/ LPVOID lpCompatDrvList;
509 /*LPDRIVER_NODE*/ LPVOID lpClassDrvList;
510 /*LPDRIVER_NODE*/ LPVOID lpSelectedDriver;
511 ATOM atDriverPath;
512 ATOM atTempInfFile;
513 HINSTANCE16 hinstClassInstaller;
514 HINSTANCE16 hinstClassPropProvidor;
515 HINSTANCE16 hinstDevicePropProvidor;
516 HINSTANCE16 hinstBasicPropProvidor;
517 FARPROC16 fpClassInstaller;
518 FARPROC16 fpClassEnumPropPages;
519 FARPROC16 fpDeviceEnumPropPages;
520 FARPROC16 fpEnumBasicProperties;
521 DWORD dwSetupReserved;
522 DWORD dwClassInstallReserved;
523 /*GENCALLBACKPROC*/ LPVOID gicpGenInstallCallBack;
525 LPARAM gicplParam;
526 UINT16 InfType;
528 HINSTANCE16 hinstPrivateProblemHandler;
529 FARPROC16 fpPrivateProblemHandler;
530 LPARAM lpClassInstallParams;
531 struct _DEVICE_INFO *lpdiChildList;
532 DWORD dwFlagsEx;
533 /*LPDRIVER_INFO*/ LPVOID lpCompatDrvInfoList;
534 /*LPDRIVER_INFO*/ LPVOID lpClassDrvInfoList;
535 char szClassGUID[MAX_GUID_STR];
536 } DEVICE_INFO16, *LPDEVICE_INFO16, **LPLPDEVICE_INFO16;
539 extern void WINAPI GenFormStrWithoutPlaceHolders16(LPSTR,LPCSTR,HINF16);
540 extern RETERR16 WINAPI IpOpen16(LPCSTR,HINF16 *);
541 extern RETERR16 WINAPI IpClose16(HINF16);
542 extern RETERR16 WINAPI CtlSetLdd16(LPLOGDISKDESC);
543 extern RETERR16 WINAPI CtlGetLdd16(LPLOGDISKDESC);
544 extern RETERR16 WINAPI CtlFindLdd16(LPLOGDISKDESC);
545 extern RETERR16 WINAPI CtlAddLdd16(LPLOGDISKDESC);
546 extern RETERR16 WINAPI CtlDelLdd16(LOGDISKID16);
547 extern RETERR16 WINAPI CtlGetLddPath16(LOGDISKID16 ldid, LPSTR szPath);
548 extern RETERR16 WINAPI GenInstall16(HINF16,LPCSTR,WORD);
550 typedef struct tagLDD_LIST {
551 LPLOGDISKDESC pldd;
552 struct tagLDD_LIST *next;
553 } LDD_LIST;
555 #define INIT_LDD(ldd, LDID) \
556 do { \
557 memset(&(ldd), 0, sizeof(LOGDISKDESC_S)); \
558 (ldd).cbSize = sizeof(LOGDISKDESC_S); \
559 ldd.ldid = LDID; \
560 } while(0)
562 #endif /* __SETUPX16_H */