Implement SetupDiGetClassImageIndex, SetupDiGetClassImageList, SetupDiGetClassImageLi...
[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 * SetupDiDestroyClassImageList(SETUPAPI.@)
173 */
174 BOOL WINAPI SetupDiDestroyClassImageList(PSP_CLASSIMAGELIST_DATA ClassImageListData)
175 {
176 FIXME ("Stub %p\n", ClassImageListData);
177 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
178 return TRUE;
179 }
180