- implemented proper LDD/LDID handling

- implement Ctl*Ldd(), Ctl[GS]etLddPath, GenInstall (no real operations
  yet, I want help), InstallHinfSection
- Stubbed out DiGetClassDevs16 (needed for e.g. Monkey Island 3 ;)
- many new .spec stubs
This commit is contained in:
Andreas Mohr 2000-12-13 21:31:37 +00:00 committed by Alexandre Julliard
parent 2c5efe31c0
commit 559f432126
7 changed files with 1225 additions and 350 deletions

View File

@ -10,6 +10,7 @@ LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o SYMBOLFILE = $(MODULE).tmp.o
C_SRCS = \ C_SRCS = \
devinst.c \
infparse.c \ infparse.c \
setupx_main.c \ setupx_main.c \
stubs.c stubs.c

28
dlls/setupapi/devinst.c Normal file
View File

@ -0,0 +1,28 @@
/*
* SetupAPI device installer
*
*/
#include "debugtools.h"
#include "windef.h"
#include "setupx16.h"
#include "heap.h"
DEFAULT_DEBUG_CHANNEL(setupapi);
/*
* Return a list of installed system devices.
* Uses HKLM\\ENUM to list devices.
*/
RETERR16 WINAPI DiGetClassDevs16(LPLPDEVICE_INFO16 lplpdi,
LPCSTR lpszClassName, HWND16 hwndParent, INT16 iFlags)
{
LPDEVICE_INFO16 lpdi;
FIXME("(%p, '%s', %04x, %04x), semi-stub.\n",
lplpdi, lpszClassName, hwndParent, iFlags);
lpdi = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DEVICE_INFO16));
lpdi->cbSize = sizeof(DEVICE_INFO16);
*lplpdi = lpdi;
return OK;
}

View File

@ -1,7 +1,12 @@
/* /*
* SetupX .inf file parsing functions * SetupX .inf file parsing functions
* *
* FIXME: return values ??? * FIXME:
* - return values ???
* - this should be reimplemented at some point to have its own
* file parsing instead of using profile functions,
* as some SETUPX exports probably demand that
* (IpSaveRestorePosition, IpFindNextMatchLine, ...).
*/ */
#include "debugtools.h" #include "debugtools.h"
@ -10,6 +15,7 @@
#include "heap.h" #include "heap.h"
#include "wine/winbase16.h" #include "wine/winbase16.h"
#include "setupx16.h" #include "setupx16.h"
#include "setupx_private.h"
DEFAULT_DEBUG_CHANNEL(setupx); DEFAULT_DEBUG_CHANNEL(setupx);

View File

@ -4,83 +4,84 @@ owner setupapi
1 stub WEP 1 stub WEP
2 pascal16 IpOpen(str ptr) IpOpen16 2 pascal16 IpOpen(str ptr) IpOpen16
3 stub IPOPENAPPEND 3 stub IpOpenAppend #(str word)
4 pascal16 IpClose(word) IpClose16 4 pascal16 IpClose(word) IpClose16
5 stub IPGETLONGFIELD 5 stub IpGetLongField #(word ptr word ptr)
6 stub IPGETSTRINGFIELD 6 stub IpGetStringField #(word ptr word ptr word ptr)
7 stub IPFINDFIRSTLINE 7 stub IpFindFirstLine #(word str str ptr)
8 stub IPGETLINECOUNT 8 stub IpGetLineCount #(word str ptr)
9 stub IPGETFIELDCOUNT 9 stub IpGetFieldCount #(word ptr ptr)
10 stub IPGETINTFIELD 10 stub IpGetIntField #(word ptr word ptr)
11 stub IPFINDNEXTLINE 11 stub IpFindNextLine #(word ptr)
12 stub IPGETFILENAME 12 stub IpGetFileName #(word ptr word)
13 stub VCPQUEUECOPY 13 stub VcpQueueCopy #(str str str str word word ptr word long)
14 stub NOAUTORUNWNDPROC 14 stub NOAUTORUNWNDPROC
15 stub __DEBUGMSG 15 stub __DEBUGMSG
16 stub __ASSERTMSG 16 stub __ASSERTMSG
17 stub VCPQUEUEDELETE 17 stub VcpQueueDelete #(str str word long)
18 stub TPOPENFILE 18 stub TpOpenFile #(str ptr word)
19 stub TPCLOSEFILE 19 stub TpCloseFile #(word)
20 stub TPOPENSECTION 20 stub TpOpenSection #(word ptr str word)
21 stub TPCLOSESECTION 21 stub TpCloseSection #(word)
22 stub TPCOMMITSECTION 22 stub TpCommitSection #(word word str word)
23 stub TPGETLINE 23 stub TpGetLine #(word str str word word ptr)
24 stub TPGETNEXTLINE 24 stub TpGetNextLine #(word str str ptr)
25 stub TPINSERTLINE 25 stub TpInsertLine #(word str str word word word)
26 stub TPREPLACELINE 26 stub TpReplaceLine #(word str str word word word)
27 stub TPDELETELINE 27 stub TpDeleteLine #(word word word word)
28 stub TPMOVELINE 28 stub TpMoveLine #(word word word word word word)
29 stub TPGETLINECONTENTS 29 stub TpGetLineContents #(word ptr word ptr word word word)
30 stub TPGETPRIVATEPROFILESTRING 30 stub TpGetPrivateProfileString #(str str str ptr word str)
31 stub TPWRITEPRIVATEPROFILESTRING 31 stub TpWritePrivateProfileString #(str str str str)
32 stub TPGETPROFILESTRING 32 stub TpGetProfileString #(str str str ptr word)
33 stub CTLSETLDD 33 pascal16 CtlSetLdd(ptr) CtlSetLdd16
34 stub CTLGETLDD 34 pascal16 CtlGetLdd(ptr) CtlGetLdd16
35 stub CTLFINDLDD 35 pascal16 CtlFindLdd(ptr) CtlFindLdd16
36 stub CTLADDLDD 36 pascal16 CtlAddLdd(ptr) CtlAddLdd16
37 stub CTLDELLDD 37 pascal16 CtlDelLdd(word) CtlDelLdd16
38 pascal16 CtlGetLddPath(word ptr) CtlGetLddPath16 38 pascal16 CtlGetLddPath(word ptr) CtlGetLddPath16
39 stub SUREGCLOSEKEY 39 stub SURegCloseKey #(word)
40 stub SUREGCREATEKEY 40 stub SURegCreateKey #(word)
41 stub SUREGDELETEKEY 41 stub SURegDeleteKey #(word str)
42 stub SUREGDELETEVALUE 42 stub SURegDeleteValue #(word str)
43 stub SUREGENUMKEY 43 stub SURegEnumKey #(word long ptr long)
44 stub SUREGENUMVALUE 44 stub SURegEnumValue #(word long str ptr ptr ptr ptr ptr)
45 stub SUREGFLUSH 45 stub SURegFlush #()
46 stub SUREGINIT 46 stub SURegInit #()
47 pascal SURegOpenKey(word str ptr) SURegOpenKey 47 pascal SURegOpenKey(word str ptr) SURegOpenKey
48 stub SUREGQUERYVALUE 48 stub SURegQueryValue
49 stub SUREGQUERYVALUE16 49 stub SURegQueryValue16 #(word str ptr ptr)
50 pascal SURegQueryValueEx(long str ptr ptr ptr ptr) SURegQueryValueEx 50 pascal SURegQueryValueEx(long str ptr ptr ptr ptr) SURegQueryValueEx
51 stub SUREGSETVALUE 51 stub SURegSetValue
52 stub SUREGSETVALUE16 52 stub SURegSetValue16 #(word str long ptr long)
53 stub SUREGSETVALUEEX 53 stub SURegSetValueEx #(word str long long ptr long)
54 stub SUREGSAVEKEY 54 stub SURegSaveKey #(word str ptr)
55 stub SUREGLOADKEY 55 stub SURegLoadKey #(word str str)
56 stub SUREGUNLOADKEY 56 stub SURegUnLoadKey #(word str)
60 stub DISKINFOFROMLDID 60 stub DiskInfoFromLdid #(word ptr)
61 stub SUERRORTOIDS 61 stub suErrorToIds #(word word)
62 stub TPWRITEPROFILESTRING 62 stub TPWriteProfileString #(str str str)
63 stub SURPLSETUP 63 stub SURPLSETUP
64 stub SUSTORELDIDPATH 64 stub SUSTORELDIDPATH
65 stub WILDCARDSTRCMPI 65 stub WILDCARDSTRCMPI
101 pascal16 GenInstall(word str word) GenInstall16 101 pascal16 GenInstall(word str word) GenInstall16
102 stub GENWININITRENAME 102 stub GenWinInitRename #(str str word)
103 pascal GenFormStrWithoutPlaceHolders(str str word) GenFormStrWithoutPlaceHolders16 103 pascal GenFormStrWithoutPlaceHolders(str str word) GenFormStrWithoutPlaceHolders16
104 stub SETUPX 104 stub SETUPX
105 stub CFGSETUPMERGE 105 stub CfgSetupMerge #(word)
106 stub INITDEPENDANTLDIDS 106 stub INITDEPENDANTLDIDS
107 stub CFGOBJFINDKEYCMD 107 stub CFGOBJFINDKEYCMD
108 stub GENSUREGSETVALUEEX 108 stub GenSURegSetValueEx
110 stub GENINSTALLEX 109 stub GENINSTALLWITHQUEUE
111 stub GENCOPYLOGCONFIG2REG 110 stub GenInstallEx #(word str word word ptr long)
112 stub SUGETSETSETUPFLAGS 111 stub GenCopyLogConfig2Reg #(word word str)
114 stub CFGPARSELINE 112 stub SUGetSetSetupFlags #(ptr word)
114 stub CFGPARSELINE # returns array
115 stub CFGSETAUTOPROCESS 115 stub CFGSETAUTOPROCESS
116 stub CFGOBJTOSTR 116 stub CFGOBJTOSTR
117 stub CFGLNTOOBJ 117 stub CFGLNTOOBJ
118 stub MATCHCMDEXT 118 stub MATCHCMDEXT
119 stub IPFINDNEXTMATCHLINE 119 stub IpFindNextMatchLine #(word str ptr)
120 stub P_SETDEFAULTOPTION 120 stub P_SETDEFAULTOPTION
121 stub CFGCLEANBOOT 121 stub CFGCLEANBOOT
122 stub CFGMATCHCMDEXT 122 stub CFGMATCHCMDEXT
@ -90,16 +91,24 @@ owner setupapi
126 stub GENMAPROOTREGSTR2KEY 126 stub GENMAPROOTREGSTR2KEY
127 stub P_CDROMOC 127 stub P_CDROMOC
128 stub P_MEDIAOC 128 stub P_MEDIAOC
130 stub _SUFORMATMESSAGE 129 stub CFGCLEAN1STBOOT
131 stub SUVFORMATMESSAGE 130 stub suFormatMessage
132 stub _SUFORMATMESSAGEBOX 131 stub suvFormatMessage #(word str str word ptr)
135 stub SUHELP 132 stub suFormatMessageBox
140 stub SUVERCONFLICT #133 stub suHelp # W98SE conflict !!
141 stub SUVERCONFLICTINIT 135 stub suHelp #(word word)
142 stub SUVERCONFLICTTERM #135 stub P_WEBTVOC # W98SE conflict !!
143 stub SUCREATEEBD 136 stub P_WBEMOC
144 stub SUCOPYTOEBD 137 stub P_THEMESOC
145 stub SXISMSDOS7RUNNING 138 stub P_IMAGINGOC
139 stub P_SCHEMESOC
140 stub suVerConflict #(word ptr word ptr)
141 stub suVerConflictInit #(word)
142 stub suVerConflictTerm #(ptr)
# Emergency Boot Disk
143 stub suCreateEBD #(word ptr long)
144 stub suCopyToEBD
145 stub sxIsMSDOS7Running #()
150 stub DS_INIT 150 stub DS_INIT
151 stub DS_DESTROY 151 stub DS_DESTROY
152 stub DS_SSYNCDRIVES 152 stub DS_SSYNCDRIVES
@ -112,60 +121,64 @@ owner setupapi
159 stub DS_SETAVAILABLEPAD 159 stub DS_SETAVAILABLEPAD
160 stub SXUPDATEDS 160 stub SXUPDATEDS
170 stub SUSETMEM 170 stub SUSETMEM
171 stub WRITEDMFBOOTDATA 171 stub WriteDMFBootData #(word ptr word)
200 pascal vcpOpen(ptr str) vcpOpen16 200 pascal VcpOpen(ptr str) VcpOpen16
201 pascal vcpClose(word word word) vcpClose16 201 pascal VcpClose(word word word) VcpClose16
202 stub VCPDEFCALLBACKPROC 202 stub vcpDefCallbackProc #(ptr word word long long)
203 stub VCPENUMFILES 203 stub vcpEnumFiles #(ptr long)
204 stub VCPQUEUERENAME 204 stub VcpQueueRename #(str str str str word word long)
205 stub VSMGETSTRINGNAME 205 stub vsmGetStringName #(word ptr word)
206 stub VSMSTRINGDELETE 206 stub vsmStringDelete #(word)
207 stub VSMSTRINGADD 207 stub vsmStringAdd #(str)
208 stub VSMGETSTRINGRAWNAME 208 stub vsmGetStringRawName #(word)
209 stub IPSAVERESTOREPOSITION 209 stub IpSaveRestorePosition #(word word)
210 pascal16 IpGetProfileString(word str str ptr word) IpGetProfileString16 210 pascal16 IpGetProfileString(word str str ptr word) IpGetProfileString16
211 stub IPOPENEX 211 stub IpOpenEx #(str ptr word)
212 stub IPOPENAPPENDEX 212 stub IpOpenAppendEx #(str word word)
213 stub VCPUICALLBACKPROC 213 stub vcpUICallbackProc #(ptr word word long long)
214 stub VCPADDMRUPATH 214 stub VcpAddMRUPath #(str)
300 stub DIBUILDCOMPATDRVLIST 300 stub DiBuildCompatDrvList #(ptr)
301 stub DIBUILDCLASSDRVLIST 301 stub DiBuildClassDrvList #(ptr)
302 stub DIDESTROYDRIVERNODELIST 302 stub DiDestroyDriverNodeList #(ptr)
303 stub DICREATEDEVICEINFO 303 stub DiCreateDeviceInfo #(ptr str long str str word)
304 stub DIGETCLASSDEVS 304 pascal16 DiGetClassDevs(ptr str word word) DiGetClassDevs16
305 stub DIDESTROYDEVICEINFOLIST 305 stub DiDestroyDeviceInfoList #(ptr)
306 stub DIREMOVEDEVICE 306 stub DiRemoveDevice #(ptr)
308 stub DICALLCLASSINSTALLER 308 stub DiCallClassInstaller #(word ptr)
309 stub DICREATEDRIVERNODE 309 stub DiCreateDriverNode #(ptr word word word str str str str str str long)
310 stub DIDRAWMINIICON 310 stub DiDrawMiniIcon
311 stub DIGETCLASSBITMAPINDEX 311 stub DiGetClassBitmapIndex #(str ptr)
312 stub DISELECTDEVICE 312 stub DiSelectDevice #(ptr)
313 stub DIINSTALLDEVICE 313 stub DiInstallDevice #(ptr)
314 stub DILOADCLASSICON 314 stub DiLoadClassIcon #(str ptr ptr)
315 stub DIASKFOROEMDISK 315 stub DiAskForOEMDisk #(ptr)
316 stub DISPLAY_SETMODE 316 stub Display_SetMode #(ptr word word word)
317 stub DISPLAY_CLASSINSTALLER 317 stub Display_ClassInstaller #(word ptr)
318 stub DICREATEDEVREGKEY 318 stub DiCreateDevRegKey #(ptr ptr word str word)
319 stub DIOPENDEVREGKEY 319 stub DiOpenDevRegKey #(ptr ptr word)
320 stub DIINSTALLDRVSECTION 320 stub DiInstallDrvSection #(str str str str long)
321 stub DIINSTALLCLASS 321 stub DiInstallClass #(str long)
322 stub DIOPENCLASSREGKEY 322 stub DiOpenClassRegKey #(ptr str)
323 stub DISPLAY_SETFONTSIZE 323 stub Display_SetFontSize #(str)
324 stub DISPLAY_OPENFONTSIZEKEY 324 stub Display_OpenFontSizeKey #(ptr)
325 stub DIBUILDCLASSDRVLISTFROMOLDINF 325 stub DiBuildClassDrvListFromOldInf #(ptr str ptr long)
326 stub DIISTHERENEEDTOCOPY 326 stub DiIsThereNeedToCopy #(word long)
333 stub DICHANGESTATE 333 stub DiChangeState #(ptr long long long)
340 stub GETFCTN 334 stub WALKSUBTREE
341 stub DIBUILDCLASSINFOLIST 340 stub GetFctn #(word str str ptr ptr)
342 stub DIDESTROYCLASSINFOLIST 341 stub DiBuildClassInfoList #(ptr)
343 stub DIGETDEVICECLASSINFO 342 stub DiDestroyClassInfoList #(ptr)
344 stub DIDELETEDEVREGKEY 343 stub DiGetDeviceClassInfo #(ptr ptr)
350 stub DISELECTOEMDRV 344 stub DiDeleteDevRegKey #(ptr word)
351 stub DIGETINFCLASS 350 stub DiSelectOEMDrv #(word ptr)
360 stub GENINFLCTODEVNODE 351 stub DiGetINFClass #(str word str long)
353 stub DIPICKBESTDRIVER
355 stub COPYINFFILE
360 stub GenInfLCToDevNode #(word str word word long)
361 stub GETDOSMESSAGE 361 stub GETDOSMESSAGE
362 stub MOUSE_CLASSINSTALLER 362 stub Mouse_ClassInstaller #(word ptr)
363 stub SXCOMPAREDOSAPPVER 363 stub sxCompareDosAppVer #(str str)
364 stub MONITOR_CLASSINSTALLER
365 stub FCEGETRESDESOFFSET 365 stub FCEGETRESDESOFFSET
366 stub FCEGETALLOCVALUE 366 stub FCEGETALLOCVALUE
367 stub FCEADDRESDES 367 stub FCEADDRESDES
@ -176,27 +189,30 @@ owner setupapi
372 stub FCEGETOTHERVALUE 372 stub FCEGETOTHERVALUE
373 stub FCEGETVALIDATEVALUE 373 stub FCEGETVALIDATEVALUE
374 stub FCEWRITETHISFORCEDCONFIGNOW 374 stub FCEWRITETHISFORCEDCONFIGNOW
375 stub SUCREATEPROPERTYSHEETPAGE 375 stub SUCreatePropertySheetPage #(ptr)
376 stub SUDESTROYPROPERTYSHEETPAGE 376 stub SUDestroyPropertySheetPage #(word)
377 stub SUPROPERTYSHEET 377 stub SUPropertySheet #(ptr)
380 stub DIREADREGLOGCONF 380 stub DiReadRegLogConf #(ptr str ptr ptr)
381 stub DIREADREGCONF 381 stub DiReadRegConf #(ptr ptr ptr long)
390 stub DIBUILDPOTENTIALDUPLICATESLIST 390 stub DiBuildPotentialDuplicatesList #(ptr ptr long ptr ptr)
395 stub INITSUBSTRDATA 395 stub InitSubstrData #(ptr str)
396 stub GETFIRSTSUBSTR 396 stub GetFirstSubstr #(ptr)
397 stub GETNEXTSUBSTR 397 stub GetNextSubstr #(ptr)
400 stub BISFILEINVMM32 398 stub INITSUBSTRDATAEX
401 stub DIINSTALLDRIVERFILES 400 stub bIsFileInVMM32 #(str)
405 stub DIBUILDCLASSINFOLISTEX 401 stub DiInstallDriverFiles #(ptr)
406 stub DIGETCLASSDEVSEX 405 stub DiBuildClassInfoListEx #(ptr long)
407 stub DICOPYREGSUBKEYVALUE 406 stub DiGetClassDevsEx #(ptr str str word word)
410 stub IPGETVERSIONSTRING 407 stub DiCopyRegSubKeyValue #(word str str str)
411 stub VCPEXPLAIN 408 stub IPGETDRIVERDATE
412 stub DIBUILDDRIVERINDEX 409 stub IPGETDRIVERVERSION
413 stub DIADDSINGLEINFTODRVIDX 410 stub IpGetVersionString #(str str ptr word str)
411 stub VcpExplain #(ptr long)
412 stub DiBuildDriverIndex #(word)
413 stub DiAddSingleInfToDrvIdx #(str word word)
414 stub FCEGETFLAGS 414 stub FCEGETFLAGS
450 stub UIMAKEDLGNONBOLD 450 stub UiMakeDlgNonBold #(word)
451 stub UIDELETENONBOLDFONT 451 stub UiDeleteNonBoldFont #(word)
500 stub SUEBDPAGE 500 stub SUEBDPAGE
501 stub SUOCPAGE 501 stub SUOCPAGE
502 stub SXLISTSUBPROC 502 stub SXLISTSUBPROC
@ -206,15 +222,51 @@ owner setupapi
507 stub SXOCFIXNEEDS 507 stub SXOCFIXNEEDS
508 pascal16 CtlSetLddPath(word str) CtlSetLddPath16 508 pascal16 CtlSetLddPath(word str) CtlSetLddPath16
509 stub SXCALLOCPROC 509 stub SXCALLOCPROC
520 stub DIBUILDCLASSDRVINFOLIST 510 stub BUILDINFOCS
521 stub DIBUILDCOMPATDRVINFOLIST 511 stub BUILDREGOCS
522 stub DIDESTROYDRVINFOLIST 512 stub DELETEOCS
523 stub DICONVERTDRIVERINFOTODRIVERNODE 520 stub DiBuildClassDrvInfoList #(ptr)
525 stub FIRSTBOOTMOVETODOSSTART 521 stub DiBuildCompatDrvInfoList #(ptr)
526 stub DOSOPTENABLECURCFG 522 stub DiDestroyDrvInfoList #(ptr)
527 pascal InstallHinfSection(word word str word) InstallHinfSection16 523 stub DiConvertDriverInfoToDriverNode #(ptr ptr)
524 stub DISELECTBESTCOMPATDRV
525 stub FirstBootMoveToDOSSTART #(str word)
526 stub DOSOptEnableCurCfg #(str)
527 pascal16 InstallHinfSection(word word str word) InstallHinfSection16
528 stub SXMAKEUNCPATH 528 stub SXMAKEUNCPATH
529 stub SXISSBSSERVERFILE 529 stub SXISSBSSERVERFILE
530 stub SXFINDBATCHFILES 530 stub SXFINDBATCHFILES
600 stub PIDCONSTRUCT 531 stub ISPANEUROPEAN
601 stub PIDVALIDATE 532 stub UPGRADENIGGLINGS
533 stub DISPLAY_ISSECONDDISPLAY
534 stub ISWINDOWSFILE
540 stub VERIFYSELECTEDDRIVER
575 stub SXCALLMIGRATIONDLLS
576 stub SXCALLMIGRATIONDLLS_RUNDLL
600 stub PidConstruct #(str str str word)
601 stub PidValidate #(str str)
602 stub GETJAPANESEKEYBOARDTYPE
610 stub CRC32COMPUTE
621 stub SXSAVEINFO
622 stub SXADDPAGEEX
623 stub OPKREMOVEINSTALLEDNETDEVICE
640 stub DOFIRSTRUNSCREENS
700 stub SXSHOWREBOOTDLG
701 stub SXSHOWREBOOTDLG_RUNDLL
750 stub UIPOSITIONDIALOG
775 stub ASPICLEAN
800 stub EXTRACTCABFILE
825 stub PIDGEN3
826 stub GETSETUPINFO
827 stub SETSETUPINFO
828 stub GETKEYBOARDOPTIONS
829 stub GETLOCALEOPTIONS
830 stub SETINTLOPTIONS
831 stub GETPRODUCTTYPE
832 stub ISOPKMODE
833 stub AUDITONETIMEINSTALL
834 stub DISKDUP
835 stub OPKPREINSTALL
836 stub ISAUDITMODE
837 stub ISAUDITAUTO
838 stub GETVALIDEULA

View File

@ -6,11 +6,17 @@
typedef UINT16 HINF16; typedef UINT16 HINF16;
typedef UINT16 LOGDISKID16; typedef UINT16 LOGDISKID16;
#define LINE_LEN 256
/* error codes stuff */ /* error codes stuff */
typedef UINT16 RETERR16; typedef UINT16 RETERR16;
#define OK 0 #define OK 0
#define IP_ERROR (UINT16)100 #define IP_ERROR (UINT16)100
#define TP_ERROR (UINT16)200
#define VCP_ERROR (UINT16)300
#define GEN_ERROR (UINT16)400
#define DI_ERROR (UINT16)500
enum _IP_ERR { enum _IP_ERR {
ERR_IP_INVALID_FILENAME = IP_ERROR+1, ERR_IP_INVALID_FILENAME = IP_ERROR+1,
@ -21,7 +27,7 @@ enum _IP_ERR {
ERR_IP_INVALID_INFFILE, ERR_IP_INVALID_INFFILE,
ERR_IP_INVALID_HINF, ERR_IP_INVALID_HINF,
ERR_IP_INVALID_FIELD, ERR_IP_INVALID_FIELD,
ERR_IP_SECTION_NOT_FOUND, ERR_IP_SECT_NOT_FOUND,
ERR_IP_END_OF_SECTION, ERR_IP_END_OF_SECTION,
ERR_IP_PROFILE_NOT_FOUND, ERR_IP_PROFILE_NOT_FOUND,
ERR_IP_LINE_NOT_FOUND, ERR_IP_LINE_NOT_FOUND,
@ -31,7 +37,62 @@ enum _IP_ERR {
ERR_IP_INVALID_INFTYPE ERR_IP_INVALID_INFTYPE
}; };
/* logical disk identifiers (LDID) */ enum _ERR_VCP {
ERR_VCP_IOFAIL = VCP_ERROR+1,
ERR_VCP_STRINGTOOLONG,
ERR_VCP_NOMEM,
ERR_VCP_QUEUEFULL,
ERR_VCP_NOVHSTR,
ERR_VCP_OVERFLOW,
ERR_VCP_BADARG,
ERR_VCP_UNINIT,
ERR_VCP_NOTFOUND,
ERR_VCP_BUSY,
ERR_VCP_INTERRUPTED,
ERR_VCP_BADDEST,
ERR_VCP_SKIPPED,
ERR_VCP_IO,
ERR_VCP_LOCKED,
ERR_VCP_WRONGDISK,
ERR_VCP_CHANGEMODE,
ERR_VCP_LDDINVALID,
ERR_VCP_LDDFIND,
ERR_VCP_LDDUNINIT,
ERR_VCP_LDDPATH_INVALID,
ERR_VCP_NOEXPANSION,
ERR_VCP_NOTOPEN,
ERR_VCP_NO_DIGITAL_SIGNATURE_CATALOG,
ERR_VCP_NO_DIGITAL_SIGNATURE_FILE
};
/****** logical disk management ******/
typedef struct _LOGDISKDESC_S { /* ldd */
WORD cbSize; /* struct size */
LOGDISKID16 ldid; /* logical disk ID */
LPSTR pszPath; /* path this descriptor points to */
LPSTR pszVolLabel; /* volume label of the disk related to it */
LPSTR pszDiskName; /* name of this disk */
WORD wVolTime; /* modification time of volume label */
WORD wVolDate; /* modification date */
DWORD dwSerNum; /* serial number of disk */
WORD wFlags;
} LOGDISKDESC_S, *LPLOGDISKDESC;
/** logical disk identifiers (LDID) **/
/* predefined LDIDs */
#define LDID_PREDEF_START 0x0001
#define LDID_PREDEF_END 0x7fff
/* registry-assigned LDIDs */
#define LDID_VAR_START 0x7000
#define LDID_VAR_END 0x7fff
/* dynamically assigned LDIDs */
#define LDID_ASSIGN_START 0x8000
#define LDID_ASSIGN_END 0xbfff
#define LDID_NULL 0 #define LDID_NULL 0
#define LDID_ABSOLUTE ((UINT)-1) #define LDID_ABSOLUTE ((UINT)-1)
#define LDID_SRCPATH 1 /* setup source path */ #define LDID_SRCPATH 1 /* setup source path */
@ -63,16 +124,90 @@ enum _IP_ERR {
#define LDID_OLD_WINBOOT 32 /* root subdir */ #define LDID_OLD_WINBOOT 32 /* root subdir */
#define LDID_OLD_WIN 33 /* old windows dir */ #define LDID_OLD_WIN 33 /* old windows dir */
typedef struct { /* flags for GenInstall() */
HINF16 hInf; #define GENINSTALL_DO_FILES 1
HFILE hInfFile; #define GENINSTALL_DO_INI 2
LPSTR lpInfFileName; #define GENINSTALL_DO_REG 4
} INF_FILE; #define GENINSTALL_DO_INI2REG 8
#define GENINSTALL_DO_CFGAUTO 16
#define GENINSTALL_DO_LOGCONFIG 32
#define GENINSTALL_DO_REGSRCPATH 64
#define GENINSTALL_DO_PERUSER 128
extern INF_FILE *InfList; #define GEINISTALL_DO_INIREG 14
extern WORD InfNumEntries; #define GENINSTALL_DO_ALL 255
extern LPCSTR IP_GetFileName(HINF16 hInf); /*
extern void WINAPI GenFormStrWithoutPlaceHolders16( LPSTR szDst, LPCSTR szSrc, HINF16 hInf); * flags for InstallHinfSection()
* 128 can be added, too. This means that the .inf file is provided by you
* instead of being a 32 bit file (i.e. Windows .inf file).
* In this case all files you install must be in the same dir
* as your .inf file on the install disk.
*/
#define HOW_NEVER_REBOOT 0
#define HOW_ALWAYS_SILENT_REBOOT 1
#define HOW_ALWAYS_PROMPT_REBOOT 2
#define HOW_SILENT_REBOOT 3
#define HOW_PROMPT_REBOOT 4
/****** device installation stuff ******/
#define MAX_CLASS_NAME_LEN 32
#define MAX_DEVNODE_ID_LEN 256
#define MAX_GUID_STR 50
typedef struct _DEVICE_INFO
{
UINT16 cbSize;
struct _DEVICE_INFO *lpNextDi;
char szDescription[LINE_LEN];
DWORD dnDevnode;
HKEY hRegKey;
char szRegSubkey[MAX_DEVNODE_ID_LEN];
char szClassName[MAX_CLASS_NAME_LEN];
DWORD Flags;
HWND16 hwndParent;
/*LPDRIVER_NODE*/ LPVOID lpCompatDrvList;
/*LPDRIVER_NODE*/ LPVOID lpClassDrvList;
/*LPDRIVER_NODE*/ LPVOID lpSelectedDriver;
ATOM atDriverPath;
ATOM atTempInfFile;
HINSTANCE16 hinstClassInstaller;
HINSTANCE16 hinstClassPropProvidor;
HINSTANCE16 hinstDevicePropProvidor;
HINSTANCE16 hinstBasicPropProvidor;
FARPROC16 fpClassInstaller;
FARPROC16 fpClassEnumPropPages;
FARPROC16 fpDeviceEnumPropPages;
FARPROC16 fpEnumBasicProperties;
DWORD dwSetupReserved;
DWORD dwClassInstallReserved;
/*GENCALLBACKPROC*/ LPVOID gicpGenInstallCallBack;
LPARAM gicplParam;
UINT16 InfType;
HINSTANCE16 hinstPrivateProblemHandler;
FARPROC16 fpPrivateProblemHandler;
LPARAM lpClassInstallParams;
struct _DEVICE_INFO *lpdiChildList;
DWORD dwFlagsEx;
/*LPDRIVER_INFO*/ LPVOID lpCompatDrvInfoList;
/*LPDRIVER_INFO*/ LPVOID lpClassDrvInfoList;
char szClassGUID[MAX_GUID_STR];
} DEVICE_INFO16, *LPDEVICE_INFO16, **LPLPDEVICE_INFO16;
typedef LRESULT (CALLBACK *VIFPROC)(LPVOID lpvObj, UINT uMsg, WPARAM wParam, LPARAM lParam, LPARAM lparamRef);
extern void WINAPI GenFormStrWithoutPlaceHolders16(LPSTR,LPCSTR,HINF16);
extern RETERR16 WINAPI IpOpen16(LPCSTR,HINF16 *);
extern RETERR16 WINAPI IpClose16(HINF16);
extern RETERR16 WINAPI CtlSetLdd16(LPLOGDISKDESC);
extern RETERR16 WINAPI CtlGetLdd16(LPLOGDISKDESC);
extern RETERR16 WINAPI CtlFindLdd16(LPLOGDISKDESC);
extern RETERR16 WINAPI CtlAddLdd16(LPLOGDISKDESC);
extern RETERR16 WINAPI CtlDelLdd16(LOGDISKID16);
extern RETERR16 WINAPI GenInstall16(HINF16,LPCSTR,WORD);
#endif /* __SETUPX16_H */ #endif /* __SETUPX16_H */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,29 @@
#ifndef __SETUPX_PRIVATE_H
#define __SETUPX_PRIVATE_H
#include "wine/windef16.h"
typedef struct tagLDD_LIST {
LPLOGDISKDESC pldd;
struct tagLDD_LIST *next;
} LDD_LIST;
#define INIT_LDD(ldd, LDID) \
do { \
memset(&(ldd), 0, sizeof(LOGDISKDESC_S)); \
(ldd).cbSize = sizeof(LOGDISKDESC_S); \
ldd.ldid = LDID; \
} while(0)
typedef struct {
HINF16 hInf;
HFILE hInfFile;
LPSTR lpInfFileName;
} INF_FILE;
extern INF_FILE *InfList;
extern WORD InfNumEntries;
extern LPCSTR IP_GetFileName(HINF16 hInf);
#endif /* __SETUPX_PRIVATE_H */