1891e6913fa9c36ff56d5f7122a4fe13b0b8c6a3
[reactos.git] / reactos / lib / setupapi / stubs.c
1 /*
2 * SetupAPI stubs
3 *
4 * Copyright 2000 James Hatheway
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21 #include "setupapi_private.h"
22
23 WINE_DEFAULT_DEBUG_CHANNEL(setupapi);
24
25 /***********************************************************************
26 * TPWriteProfileString (SETUPX.62)
27 */
28 BOOL WINAPI TPWriteProfileString16( LPCSTR section, LPCSTR entry, LPCSTR string )
29 {
30 FIXME( "%s %s %s: stub\n", debugstr_a(section), debugstr_a(entry), debugstr_a(string) );
31 return TRUE;
32 }
33
34
35 /***********************************************************************
36 * suErrorToIds (SETUPX.61)
37 */
38 DWORD WINAPI suErrorToIds16( WORD w1, WORD w2 )
39 {
40 FIXME( "%x %x: stub\n", w1, w2 );
41 return 0;
42 }
43
44 /***********************************************************************
45 * SetupDiGetDeviceInfoListDetailA (SETUPAPI.@)
46 */
47 BOOL WINAPI SetupDiGetDeviceInfoListDetailA(HDEVINFO devinfo, PSP_DEVINFO_LIST_DETAIL_DATA_A devinfo_data )
48 {
49 FIXME("\n");
50 return FALSE;
51 }
52
53 /***********************************************************************
54 * SetupCopyOEMInfA (SETUPAPI.@)
55 */
56 BOOL WINAPI SetupCopyOEMInfA(PCSTR sourceinffile, PCSTR sourcemedialoc,
57 DWORD mediatype, DWORD copystyle, PSTR destinfname,
58 DWORD destnamesize, PDWORD required,
59 PSTR *destinfnamecomponent)
60 {
61 FIXME("stub: source %s location %s ...\n", debugstr_a(sourceinffile),
62 debugstr_a(sourcemedialoc));
63 return FALSE;
64 }
65
66 /***********************************************************************
67 * SetupCopyOEMInfW (SETUPAPI.@)
68 */
69 BOOL WINAPI SetupCopyOEMInfW(PCWSTR sourceinffile, PCWSTR sourcemedialoc,
70 DWORD mediatype, DWORD copystyle, PWSTR destinfname,
71 DWORD destnamesize, PDWORD required,
72 PWSTR *destinfnamecomponent)
73 {
74 FIXME("stub: source %s location %s ...\n", debugstr_w(sourceinffile),
75 debugstr_w(sourcemedialoc));
76 //return FALSE;
77 return TRUE;
78 }
79
80 /***********************************************************************
81 * SetupGetInfInformationA (SETUPAPI.@)
82 */
83 BOOL WINAPI SetupGetInfInformationA( LPCVOID InfSpec, DWORD SearchControl,
84 PSP_INF_INFORMATION ReturnBuffer,
85 DWORD ReturnBufferSize, PDWORD RequiredSize)
86 {
87 FIXME("(%p, %ld, %p, %ld, %p) Stub!\n",
88 InfSpec, SearchControl, ReturnBuffer, ReturnBufferSize, RequiredSize );
89 return TRUE;
90 }
91
92 /***********************************************************************
93 * SetupInitializeFileLogW(SETUPAPI.@)
94 */
95 HANDLE WINAPI SetupInitializeFileLogW(LPCWSTR LogFileName, DWORD Flags)
96 {
97 FIXME("Stub %s, 0x%lx\n",debugstr_w(LogFileName),Flags);
98 return INVALID_HANDLE_VALUE;
99 }
100
101 /***********************************************************************
102 * SetupInitializeFileLogA(SETUPAPI.@)
103 */
104 HANDLE WINAPI SetupInitializeFileLogA(LPCSTR LogFileName, DWORD Flags)
105 {
106 FIXME("Stub %s, 0x%lx\n",debugstr_a(LogFileName),Flags);
107 return INVALID_HANDLE_VALUE;
108 }
109
110 /***********************************************************************
111 * SetupPromptReboot(SETUPAPI.@)
112 */
113 INT WINAPI SetupPromptReboot(HSPFILEQ FileQueue, HWND Owner, BOOL ScanOnly)
114 {
115 #if 0
116 int ret;
117 TCHAR RebootText[RC_STRING_MAX_SIZE];
118 TCHAR RebootCaption[RC_STRING_MAX_SIZE];
119 INT rc = 0;
120
121 TRACE("%p %p %d\n", FileQueue, Owner, ScanOnly);
122
123 if (ScanOnly && !FileQueue)
124 {
125 SetLastError(ERROR_INVALID_PARAMETER);
126 return -1;
127 }
128
129 if (FileQueue)
130 {
131 FIXME("Case 'FileQueue != NULL' not implemented\n");
132 /* In some cases, do 'rc |= SPFILEQ_FILE_IN_USE' */
133 }
134
135 if (ScanOnly)
136 return rc;
137
138 /* We need to ask the question to the user. */
139 rc |= SPFILEQ_REBOOT_RECOMMENDED;
140 if (0 == LoadString(hInstance, IDS_QUERY_REBOOT_TEXT, RebootText, RC_STRING_MAX_SIZE))
141 return -1;
142 if (0 == LoadString(hInstance, IDS_QUERY_REBOOT_CAPTION, RebootCaption, RC_STRING_MAX_SIZE))
143 return -1;
144 ret = MessageBox(Owner, RebootText, RebootCaption, MB_YESNO | MB_DEFBUTTON1);
145 if (IDNO == ret)
146 return rc;
147 else
148 {
149 if (ExitWindowsEx(EWX_REBOOT, 0))
150 return rc | SPFILEQ_REBOOT_IN_PROGRESS;
151 else
152 return -1;
153 }
154 #endif
155 FIXME("Stub %p %p %d\n", FileQueue, Owner, ScanOnly);
156 SetLastError(ERROR_GEN_FAILURE);
157 return -1;
158 }
159
160
161 /***********************************************************************
162 * SetupTerminateFileLog(SETUPAPI.@)
163 */
164 BOOL WINAPI SetupTerminateFileLog(HANDLE FileLogHandle)
165 {
166 FIXME ("Stub %p\n",FileLogHandle);
167 return TRUE;
168 }
169
170
171 /***********************************************************************
172 * SetupDiGetClassImageList(SETUPAPI.@)
173 */
174 BOOL WINAPI SetupDiGetClassImageList(PSP_CLASSIMAGELIST_DATA ClassImageListData)
175 {
176 FIXME ("Stub %p\n", ClassImageListData);
177 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
178 return FALSE;
179 }
180
181
182 /***********************************************************************
183 * SetupDiGetClassImageListExA(SETUPAPI.@)
184 */
185 BOOL WINAPI SetupDiGetClassImageListExA(PSP_CLASSIMAGELIST_DATA ClassImageListData,
186 PCSTR MachineName, PVOID Reserved)
187 {
188 FIXME ("Stub %p %s %p\n", ClassImageListData, debugstr_a(MachineName), Reserved);
189 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
190 return FALSE;
191 }
192
193
194 /***********************************************************************
195 * SetupDiGetClassImageListExW(SETUPAPI.@)
196 */
197 BOOL WINAPI SetupDiGetClassImageListExW(PSP_CLASSIMAGELIST_DATA ClassImageListData,
198 PCWSTR MachineName, PVOID Reserved)
199 {
200 FIXME ("Stub %p %s %p\n", ClassImageListData, debugstr_w(MachineName), Reserved);
201 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
202 return FALSE;
203 }
204
205
206 /***********************************************************************
207 * SetupDiGetClassImageIndex(SETUPAPI.@)
208 */
209 BOOL WINAPI SetupDiGetClassImageIndex(PSP_CLASSIMAGELIST_DATA ClassImageListData,
210 CONST GUID *ClassGuid, PINT ImageIndex)
211 {
212 FIXME ("Stub %p %p %p\n", ClassImageListData, ClassGuid, ImageIndex);
213 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
214 return FALSE;
215 }
216
217
218 /***********************************************************************
219 * SetupDiDestroyClassImageList(SETUPAPI.@)
220 */
221 BOOL WINAPI SetupDiDestroyClassImageList(PSP_CLASSIMAGELIST_DATA ClassImageListData)
222 {
223 FIXME ("Stub %p\n", ClassImageListData);
224 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
225 return TRUE;
226 }
227
228 /***********************************************************************
229 * SetupDiGetDeviceInstanceIdA(SETUPAPI.@)
230 */
231 BOOL WINAPI SetupDiGetDeviceInstanceIdA(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData,
232 PSTR DeviceInstanceId, DWORD DeviceInstanceIdSize,
233 PDWORD RequiredSize)
234 {
235 FIXME ("Stub %p %p %p %d %p\n",
236 DeviceInfoSet, DeviceInfoData, DeviceInstanceId, DeviceInstanceIdSize, RequiredSize);
237 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
238 return FALSE;
239 }
240
241 /***********************************************************************
242 * SetupDiGetDeviceInstanceIdW(SETUPAPI.@)
243 */
244 BOOL WINAPI SetupDiGetDeviceInstanceIdW(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData,
245 PWSTR DeviceInstanceId, DWORD DeviceInstanceIdSize,
246 PDWORD RequiredSize)
247 {
248 FIXME ("Stub %p %p %p %d %p\n",
249 DeviceInfoSet, DeviceInfoData, DeviceInstanceId, DeviceInstanceIdSize, RequiredSize);
250 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
251 return FALSE;
252 }
253
254 /***********************************************************************
255 * SetupDiGetClassDevPropertySheetsA(SETUPAPI.@)
256 */
257 BOOL WINAPI SetupDiGetClassDevPropertySheetsA(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData,
258 LPPROPSHEETHEADERA PropertySheetHeader,
259 DWORD PropertySheetHeaderPageListSize, PDWORD RequiredSize,
260 DWORD PropertySheetType)
261 {
262 FIXME ("Stub %p %p %p %d %p %d\n",
263 DeviceInfoSet, DeviceInfoData, PropertySheetHeader, PropertySheetHeaderPageListSize,
264 RequiredSize, PropertySheetType);
265 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
266 return FALSE;
267 }
268
269 /***********************************************************************
270 * SetupDiGetClassDevPropertySheetsW(SETUPAPI.@)
271 */
272 BOOL WINAPI SetupDiGetClassDevPropertySheetsW(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData,
273 LPPROPSHEETHEADERW PropertySheetHeader,
274 DWORD PropertySheetHeaderPageListSize, PDWORD RequiredSize,
275 DWORD PropertySheetType)
276 {
277 FIXME ("Stub %p %p %p %d %p %d\n",
278 DeviceInfoSet, DeviceInfoData, PropertySheetHeader, PropertySheetHeaderPageListSize,
279 RequiredSize, PropertySheetType);
280 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
281 return FALSE;
282 }