Authors: Andreas Mohr <amohr@codeweavers.com>, Dimitrie O. Paun <dimi@cs.toronto...
[wine] / dlls / setupapi / setupx_main.c
1 /*
2  *      SETUPX library
3  *
4  *      Copyright 1998,2000  Andreas Mohr
5  *
6  * FIXME: Rather non-functional functions for now.
7  *
8  * See:
9  * http://www.geocities.com/SiliconValley/Network/5317/drivers.html
10  * http://www.microsoft.com/ddk/ddkdocs/win98ddk/devinst_12uw.htm
11  * DDK: setupx.h
12  * http://mmatrix.tripod.com/customsystemfolder/infsysntaxfull.html
13  * http://www.rdrop.com/~cary/html/inf_faq.html
14  *
15  * Stuff tested with rs405deu.exe (German Acroread 4.05 setup)
16  */
17
18 #include "winreg.h"
19 #include "wine/winuser16.h"
20 #include "setupx16.h"
21 #include "debugtools.h"
22
23 DEFAULT_DEBUG_CHANNEL(setupx);
24
25 /***********************************************************************
26  *              SURegOpenKey
27  */
28 DWORD WINAPI SURegOpenKey( HKEY hkey, LPCSTR lpszSubKey, LPHKEY retkey )
29 {
30     FIXME("(%x,%s,%p), semi-stub.\n",hkey,debugstr_a(lpszSubKey),retkey);
31     return RegOpenKeyA( hkey, lpszSubKey, retkey );
32 }
33
34 /***********************************************************************
35  *              SURegQueryValueEx
36  */
37 DWORD WINAPI SURegQueryValueEx( HKEY hkey, LPSTR lpszValueName,
38                                 LPDWORD lpdwReserved, LPDWORD lpdwType,
39                                 LPBYTE lpbData, LPDWORD lpcbData )
40 {
41     FIXME("(%x,%s,%p,%p,%p,%ld), semi-stub.\n",hkey,debugstr_a(lpszValueName),
42           lpdwReserved,lpdwType,lpbData,lpcbData?*lpcbData:0);
43     return RegQueryValueExA( hkey, lpszValueName, lpdwReserved, lpdwType,
44                                lpbData, lpcbData );
45 }
46
47 /*
48  * hwnd = parent window
49  * hinst = instance of SETUPX.DLL
50  * lpszCmdLine = e.g. "DefaultInstall 132 C:\MYINSTALL\MYDEV.INF"
51  * Here "DefaultInstall" is the .inf file section to be installed (optional).
52  * 132 is the standard parameter, it seems.
53  * 133 means don't prompt user for reboot.
54  * 
55  * nCmdShow = nCmdShow of CreateProcess
56  * FIXME: is the return type correct ?
57  */
58 DWORD WINAPI InstallHinfSection16( HWND16 hwnd, HINSTANCE16 hinst, LPCSTR lpszCmdLine, INT16 nCmdShow)
59 {
60         FIXME("(%04x, %04x, %s, %d), stub.\n", hwnd, hinst, lpszCmdLine, nCmdShow);
61     return 0;
62 }
63
64
65 /*
66  * GenFormStrWithoutPlaceholders
67  *
68  * Any real docu ?
69  */
70 void WINAPI GenFormStrWithoutPlaceHolders16( LPSTR szDst, LPCSTR szSrc, HINF16 hInf)
71 {
72     FIXME("(%p, '%s', %04x), stub.\n", szDst, szSrc, hInf);
73     strcpy(szDst, szSrc);
74 }
75
76 RETERR16 WINAPI CtlGetLddPath16(LOGDISKID16 ldid, LPSTR szPath)
77 {
78     FIXME("(%04x, %p), stub.\n", ldid, szPath);
79     strcpy(szPath, "FIXME_BogusLddPath");
80     return OK;
81 }
82
83 RETERR16 WINAPI CtlSetLddPath16(LOGDISKID16 ldid, LPSTR szPath)
84 {
85     FIXME("(%04x, '%s'), stub.\n", ldid, szPath);
86     return OK;
87 }
88
89 RETERR16 WINAPI vcpOpen16(LPWORD p1, LPWORD p2)
90 {
91     FIXME("(%p, %p), stub.\n", p1, p2);
92     return OK;
93 }
94
95 RETERR16 WINAPI vcpClose16(WORD w1, WORD w2, WORD w3)
96 {
97     FIXME("(%04x, %04x %04x), stub.\n", w1, w2, w3);
98     return OK;
99 }
100
101 RETERR16 WINAPI GenInstall16(HINF16 hInfFile, LPCSTR szInstallSection, WORD wFlags)
102 {
103     FIXME("(%04x, '%s', %04x), stub. This doesn't install anything yet !\n", hInfFile, szInstallSection, wFlags);
104     return OK;
105 }