a4768ee13ea5c5fac47b075230730cfc22415168
[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 * SetupDiGetDeviceInfoListDetailW (SETUPAPI.@)
55 */
56 BOOL WINAPI SetupDiGetDeviceInfoListDetailW(HDEVINFO devinfo, PSP_DEVINFO_LIST_DETAIL_DATA_W devinfo_data )
57 {
58 FIXME("\n");
59 return FALSE;
60 }
61
62 /***********************************************************************
63 * SetupCopyOEMInfA (SETUPAPI.@)
64 */
65 BOOL WINAPI SetupCopyOEMInfA(PCSTR sourceinffile, PCSTR sourcemedialoc,
66 DWORD mediatype, DWORD copystyle, PSTR destinfname,
67 DWORD destnamesize, PDWORD required,
68 PSTR *destinfnamecomponent)
69 {
70 FIXME("stub: source %s location %s ...\n", debugstr_a(sourceinffile),
71 debugstr_a(sourcemedialoc));
72 return FALSE;
73 }
74
75 /***********************************************************************
76 * SetupCopyOEMInfW (SETUPAPI.@)
77 */
78 BOOL WINAPI SetupCopyOEMInfW(PCWSTR sourceinffile, PCWSTR sourcemedialoc,
79 DWORD mediatype, DWORD copystyle, PWSTR destinfname,
80 DWORD destnamesize, PDWORD required,
81 PWSTR *destinfnamecomponent)
82 {
83 FIXME("stub: source %s location %s ...\n", debugstr_w(sourceinffile),
84 debugstr_w(sourcemedialoc));
85 //return FALSE;
86 return TRUE;
87 }
88
89 /***********************************************************************
90 * SetupGetInfInformationA (SETUPAPI.@)
91 */
92 BOOL WINAPI SetupGetInfInformationA( LPCVOID InfSpec, DWORD SearchControl,
93 PSP_INF_INFORMATION ReturnBuffer,
94 DWORD ReturnBufferSize, PDWORD RequiredSize)
95 {
96 FIXME("(%p, %ld, %p, %ld, %p) Stub!\n",
97 InfSpec, SearchControl, ReturnBuffer, ReturnBufferSize, RequiredSize );
98 return TRUE;
99 }
100
101 /***********************************************************************
102 * SetupInitializeFileLogW(SETUPAPI.@)
103 */
104 HANDLE WINAPI SetupInitializeFileLogW(LPCWSTR LogFileName, DWORD Flags)
105 {
106 FIXME("Stub %s, 0x%lx\n",debugstr_w(LogFileName),Flags);
107 return INVALID_HANDLE_VALUE;
108 }
109
110 /***********************************************************************
111 * SetupInitializeFileLogA(SETUPAPI.@)
112 */
113 HANDLE WINAPI SetupInitializeFileLogA(LPCSTR LogFileName, DWORD Flags)
114 {
115 FIXME("Stub %s, 0x%lx\n",debugstr_a(LogFileName),Flags);
116 return INVALID_HANDLE_VALUE;
117 }
118
119 /***********************************************************************
120 * SetupPromptReboot(SETUPAPI.@)
121 */
122 INT WINAPI SetupPromptReboot(HSPFILEQ FileQueue, HWND Owner, BOOL ScanOnly)
123 {
124 #if 0
125 int ret;
126 TCHAR RebootText[RC_STRING_MAX_SIZE];
127 TCHAR RebootCaption[RC_STRING_MAX_SIZE];
128 INT rc = 0;
129
130 TRACE("%p %p %d\n", FileQueue, Owner, ScanOnly);
131
132 if (ScanOnly && !FileQueue)
133 {
134 SetLastError(ERROR_INVALID_PARAMETER);
135 return -1;
136 }
137
138 if (FileQueue)
139 {
140 FIXME("Case 'FileQueue != NULL' not implemented\n");
141 /* In some cases, do 'rc |= SPFILEQ_FILE_IN_USE' */
142 }
143
144 if (ScanOnly)
145 return rc;
146
147 /* We need to ask the question to the user. */
148 rc |= SPFILEQ_REBOOT_RECOMMENDED;
149 if (0 == LoadString(hInstance, IDS_QUERY_REBOOT_TEXT, RebootText, RC_STRING_MAX_SIZE))
150 return -1;
151 if (0 == LoadString(hInstance, IDS_QUERY_REBOOT_CAPTION, RebootCaption, RC_STRING_MAX_SIZE))
152 return -1;
153 ret = MessageBox(Owner, RebootText, RebootCaption, MB_YESNO | MB_DEFBUTTON1);
154 if (IDNO == ret)
155 return rc;
156 else
157 {
158 if (ExitWindowsEx(EWX_REBOOT, 0))
159 return rc | SPFILEQ_REBOOT_IN_PROGRESS;
160 else
161 return -1;
162 }
163 #endif
164 FIXME("Stub %p %p %d\n", FileQueue, Owner, ScanOnly);
165 SetLastError(ERROR_GEN_FAILURE);
166 return -1;
167 }
168
169
170 /***********************************************************************
171 * SetupTerminateFileLog(SETUPAPI.@)
172 */
173 BOOL WINAPI SetupTerminateFileLog(HANDLE FileLogHandle)
174 {
175 FIXME ("Stub %p\n",FileLogHandle);
176 return TRUE;
177 }