- Create KD branch. All debugging support is removed in this branch (no symbols,...
[reactos.git] / reactos / dll / win32 / 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, 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 * SetupInitializeFileLogW(SETUPAPI.@)
55 */
56 HANDLE WINAPI SetupInitializeFileLogW(LPCWSTR LogFileName, DWORD Flags)
57 {
58 FIXME("Stub %s, 0x%lx\n",debugstr_w(LogFileName),Flags);
59 return INVALID_HANDLE_VALUE;
60 }
61
62 /***********************************************************************
63 * SetupInitializeFileLogA(SETUPAPI.@)
64 */
65 HANDLE WINAPI SetupInitializeFileLogA(LPCSTR LogFileName, DWORD Flags)
66 {
67 FIXME("Stub %s, 0x%lx\n",debugstr_a(LogFileName),Flags);
68 return INVALID_HANDLE_VALUE;
69 }
70
71 /***********************************************************************
72 * SetupPromptReboot(SETUPAPI.@)
73 */
74 INT WINAPI SetupPromptReboot(HSPFILEQ FileQueue, HWND Owner, BOOL ScanOnly)
75 {
76 #if 0
77 int ret;
78 TCHAR RebootText[RC_STRING_MAX_SIZE];
79 TCHAR RebootCaption[RC_STRING_MAX_SIZE];
80 INT rc = 0;
81
82 TRACE("%p %p %d\n", FileQueue, Owner, ScanOnly);
83
84 if (ScanOnly && !FileQueue)
85 {
86 SetLastError(ERROR_INVALID_PARAMETER);
87 return -1;
88 }
89
90 if (FileQueue)
91 {
92 FIXME("Case 'FileQueue != NULL' not implemented\n");
93 /* In some cases, do 'rc |= SPFILEQ_FILE_IN_USE' */
94 }
95
96 if (ScanOnly)
97 return rc;
98
99 /* We need to ask the question to the user. */
100 rc |= SPFILEQ_REBOOT_RECOMMENDED;
101 if (0 == LoadString(hInstance, IDS_QUERY_REBOOT_TEXT, RebootText, RC_STRING_MAX_SIZE))
102 return -1;
103 if (0 == LoadString(hInstance, IDS_QUERY_REBOOT_CAPTION, RebootCaption, RC_STRING_MAX_SIZE))
104 return -1;
105 ret = MessageBox(Owner, RebootText, RebootCaption, MB_YESNO | MB_DEFBUTTON1);
106 if (IDNO == ret)
107 return rc;
108 else
109 {
110 if (ExitWindowsEx(EWX_REBOOT, 0))
111 return rc | SPFILEQ_REBOOT_IN_PROGRESS;
112 else
113 return -1;
114 }
115 #endif
116 FIXME("Stub %p %p %d\n", FileQueue, Owner, ScanOnly);
117 SetLastError(ERROR_GEN_FAILURE);
118 return -1;
119 }
120
121
122 /***********************************************************************
123 * SetupTerminateFileLog(SETUPAPI.@)
124 */
125 BOOL WINAPI SetupTerminateFileLog(HANDLE FileLogHandle)
126 {
127 FIXME ("Stub %p\n",FileLogHandle);
128 return TRUE;
129 }
130
131
132 /***********************************************************************
133 * SetupCloseLog(SETUPAPI.@)
134 */
135 void WINAPI SetupCloseLog()
136 {
137 FIXME("() stub\n");
138 }
139
140 /***********************************************************************
141 * SetupLogErrorW(SETUPAPI.@)
142 */
143 BOOL WINAPI SetupLogErrorW(PCWSTR MessageString, LogSeverity Severity)
144 {
145 FIXME("(%s, %ld) stub\n", debugstr_w(MessageString), Severity);
146 return TRUE;
147 }
148
149 /***********************************************************************
150 * SetupOpenLog(SETUPAPI.@)
151 */
152 BOOL WINAPI SetupOpenLog(BOOL Reserved)
153 {
154 FIXME("(%d) stub\n", Reserved);
155 return TRUE;
156 }
157
158 /***********************************************************************
159 * SetupDiRegisterDeviceInfo(SETUPAPI.@)
160 */
161 BOOL WINAPI
162 SetupDiRegisterDeviceInfo(
163 IN HDEVINFO DeviceInfoSet,
164 IN PSP_DEVINFO_DATA DeviceInfoData,
165 IN DWORD Flags,
166 IN PSP_DETSIG_CMPPROC CompareProc OPTIONAL,
167 IN PVOID CompareContext OPTIONAL,
168 OUT PSP_DEVINFO_DATA DupDeviceInfoData OPTIONAL)
169 {
170 FIXME ("Stub %p %p 0x%lx %p %p %p\n", DeviceInfoSet, DeviceInfoData,
171 Flags, CompareProc, CompareContext, DupDeviceInfoData);
172 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
173 return FALSE;
174 }
175
176
177 /***********************************************************************
178 * SetupDiRemoveDevice(SETUPAPI.@)
179 */
180 BOOL WINAPI
181 SetupDiRemoveDevice(
182 IN HDEVINFO DeviceInfoSet,
183 IN PSP_DEVINFO_DATA DeviceInfoData)
184 {
185 FIXME ("Stub %p %p\n", DeviceInfoSet, DeviceInfoData);
186 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
187 return FALSE;
188 }
189
190
191 /***********************************************************************
192 * SetupDiUnremoveDevice(SETUPAPI.@)
193 */
194 BOOL WINAPI
195 SetupDiUnremoveDevice(
196 IN HDEVINFO DeviceInfoSet,
197 IN PSP_DEVINFO_DATA DeviceInfoData)
198 {
199 FIXME ("Stub %p %p\n", DeviceInfoSet, DeviceInfoData);
200 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
201 return FALSE;
202 }