[ODBCCP32_WINETEST] Sync with Wine Staging 1.7.55. CORE-10536
[reactos.git] / rostests / winetests / odbccp32 / misc.c
1 /*
2 * Copyright 2007 Bill Medland
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19 #include <wine/test.h>
20 #include <stdarg.h>
21
22 #include "windef.h"
23 #include "winbase.h"
24 #include "winreg.h"
25 #include "odbcinst.h"
26
27 static const WCHAR abcd_key[] = {'S','o','f','t','w','a','r','e','\\','O','D','B','C','\\','a','b','c','d','.','I','N','I','\\','w','i','n','e','o','d','b','c',0};
28 static const WCHAR abcdini_key[] = {'S','o','f','t','w','a','r','e','\\','O','D','B','C','\\','a','b','c','d','.','I','N','I',0 };
29
30
31 static void test_SQLConfigMode(void)
32 {
33 BOOL bool_ret;
34 DWORD error_code;
35 RETCODE sql_ret;
36 UWORD config_mode;
37 int i;
38
39 ok(SQLGetConfigMode(NULL), "SQLGetConfigMode(NULL) should succeed\n");
40
41 bool_ret = SQLGetConfigMode(&config_mode);
42 ok(bool_ret && config_mode == ODBC_BOTH_DSN, "Failed to get the initial SQLGetConfigMode or it was not both\n");
43
44 /* try to set invalid mode */
45 bool_ret = SQLSetConfigMode(ODBC_SYSTEM_DSN+1);
46 sql_ret = SQLInstallerErrorW(1, &error_code, NULL, 0, NULL);
47 ok(!bool_ret && sql_ret == SQL_SUCCESS_WITH_INFO && error_code == ODBC_ERROR_INVALID_PARAM_SEQUENCE, "SQLSetConfigMode with invalid argument did not fail correctly\n");
48
49 for (i = ODBC_SYSTEM_DSN; i >= ODBC_BOTH_DSN; --i)
50 {
51 ok(SQLSetConfigMode((UWORD)i), "SQLSetConfigMode Failed to set config mode\n");
52 bool_ret = SQLGetConfigMode(&config_mode);
53 ok(bool_ret && config_mode == i, "Failed to confirm SQLSetConfigMode.\n");
54 }
55 /* And that leaves it correctly on BOTH */
56 }
57
58 static void test_SQLInstallerError(void)
59 {
60 RETCODE sql_ret;
61
62 /* MSDN states that the error number should be between 1 and 8. Passing 0 is an error */
63 sql_ret = SQLInstallerError(0, NULL, NULL, 0, NULL);
64 ok(sql_ret == SQL_ERROR, "SQLInstallerError(0...) failed with %d instead of SQL_ERROR\n", sql_ret);
65 /* However numbers greater than 8 do not return SQL_ERROR.
66 * I am currently unsure as to whether it should return SQL_NO_DATA or "the same as for error 8";
67 * I have never been able to generate 8 errors to test it
68 */
69 sql_ret = SQLInstallerError(65535, NULL, NULL, 0, NULL);
70 ok(sql_ret == SQL_NO_DATA, "SQLInstallerError(>8...) failed with %d instead of SQL_NO_DATA\n", sql_ret);
71
72 /* Force an error to work with. This should generate ODBC_ERROR_INVALID_BUFF_LEN */
73 ok(!SQLGetInstalledDrivers(0, 0, 0), "Failed to force an error for testing\n");
74 sql_ret = SQLInstallerError(2, NULL, NULL, 0, NULL);
75 ok(sql_ret == SQL_NO_DATA, "Too many errors when forcing an error for testing\n");
76
77 /* Null pointers are acceptable in all obvious places */
78 sql_ret = SQLInstallerError(1, NULL, NULL, 0, NULL);
79 ok(sql_ret == SQL_SUCCESS_WITH_INFO, "SQLInstallerError(null addresses) failed with %d instead of SQL_SUCCESS_WITH_INFO\n", sql_ret);
80 }
81
82 static void test_SQLInstallDriverManager(void)
83 {
84 BOOL bool_ret;
85 RETCODE sql_ret;
86 DWORD error_code;
87 CHAR target_path[MAX_PATH];
88 WORD path_out;
89
90 /* NULL check */
91 bool_ret = SQLInstallDriverManager(NULL, 0, NULL);
92 sql_ret = SQLInstallerErrorW(1, &error_code, NULL, 0, NULL);
93 ok(!bool_ret, "SQLInstallDriverManager unexpectedly succeeded\n");
94 ok(sql_ret == SQL_SUCCESS_WITH_INFO && error_code == ODBC_ERROR_INVALID_BUFF_LEN,
95 "Expected SQLInstallDriverManager to fail with ODBC_ERROR_INVALID_BUFF_LEN\n");
96
97 /* Length smaller than MAX_PATH */
98 bool_ret = SQLInstallDriverManager(target_path, MAX_PATH / 2, NULL);
99 sql_ret = SQLInstallerErrorW(1, &error_code, NULL, 0, NULL);
100 ok(!bool_ret, "SQLInstallDriverManager unexpectedly succeeded\n");
101 ok(sql_ret == SQL_SUCCESS_WITH_INFO && error_code == ODBC_ERROR_INVALID_BUFF_LEN,
102 "Expected SQLInstallDriverManager to fail with ODBC_ERROR_INVALID_BUFF_LEN\n");
103
104 path_out = 0xcafe;
105 bool_ret = SQLInstallDriverManager(target_path, MAX_PATH / 2, &path_out);
106 sql_ret = SQLInstallerErrorW(1, &error_code, NULL, 0, NULL);
107 ok(!bool_ret, "SQLInstallDriverManager unexpectedly succeeded\n");
108 ok(sql_ret == SQL_SUCCESS_WITH_INFO && error_code == ODBC_ERROR_INVALID_BUFF_LEN,
109 "Expected SQLInstallDriverManager to fail with ODBC_ERROR_INVALID_BUFF_LEN\n");
110 ok(path_out == 0xcafe, "Expected path_out to not have changed\n");
111
112 /* Length OK */
113 bool_ret = SQLInstallDriverManager(target_path, MAX_PATH, NULL);
114 sql_ret = SQLInstallerErrorW(1, &error_code, NULL, 0, NULL);
115 ok(bool_ret, "SQLInstallDriverManager unexpectedly failed: %d\n",
116 error_code);
117 if (bool_ret)
118 ok(sql_ret == SQL_NO_DATA, "Expected SQL_NO_DATA, got %d\n", sql_ret);
119 else
120 ok(sql_ret == SQL_SUCCESS_WITH_INFO,
121 "Expected SQL_SUCCESS_WITH_INFO, got %d\n", sql_ret);
122
123 path_out = 0xcafe;
124 bool_ret = SQLInstallDriverManager(target_path, MAX_PATH, &path_out);
125 sql_ret = SQLInstallerErrorW(1, &error_code, NULL, 0, NULL);
126 ok(bool_ret, "SQLInstallDriverManager unexpectedly failed: %d\n",
127 error_code);
128 if (bool_ret)
129 ok(sql_ret == SQL_NO_DATA, "Expected SQL_NO_DATA, got %d\n", sql_ret);
130 else
131 ok(sql_ret == SQL_SUCCESS_WITH_INFO,
132 "Expected SQL_SUCCESS_WITH_INFO, got %d\n", sql_ret);
133 /* path_out should in practice be less than 0xcafe */
134 ok(path_out != 0xcafe, "Expected path_out to show the correct amount of bytes\n");
135 }
136
137 static void test_SQLWritePrivateProfileString(void)
138 {
139 static const WCHAR odbc_key[] = {'S','o','f','t','w','a','r','e','\\','O','D','B','C','\\','O','D','B','C','.','I','N','I','\\','w','i','n','e','o','d','b','c',0};
140 BOOL ret;
141 LONG reg_ret;
142 DWORD error_code;
143
144 ret = SQLWritePrivateProfileString("wineodbc", "testing" , "value", "");
145 ok(!ret, "SQLWritePrivateProfileString passed\n");
146 SQLInstallerErrorW(1, &error_code, NULL, 0, NULL);
147 ok(error_code == ODBC_ERROR_INVALID_STR, "SQLInstallerErrorW ret: %d\n", error_code);
148
149 ret = SQLWritePrivateProfileString("wineodbc", "testing" , "value", NULL);
150 ok(!ret, "SQLWritePrivateProfileString passed\n");
151 SQLInstallerErrorW(1, &error_code, NULL, 0, NULL);
152 ok(error_code == ODBC_ERROR_INVALID_STR, "SQLInstallerErrorW ret: %d\n", error_code);
153
154 ret = SQLWritePrivateProfileString("wineodbc", "testing" , "value", "odbc.ini");
155 ok(ret, "SQLWritePrivateProfileString failed\n");
156 if(ret)
157 {
158 HKEY hkey;
159
160 reg_ret = RegOpenKeyExW(HKEY_CURRENT_USER, odbc_key, 0, KEY_READ, &hkey);
161 ok(reg_ret == ERROR_SUCCESS, "RegOpenKeyExW failed\n");
162 if(reg_ret == ERROR_SUCCESS)
163 {
164 reg_ret = RegDeleteKeyW(HKEY_CURRENT_USER, odbc_key);
165 ok(reg_ret == ERROR_SUCCESS, "RegDeleteKeyW failed\n");
166
167 RegCloseKey(hkey);
168 }
169 }
170
171 ret = SQLWritePrivateProfileString("wineodbc", "testing" , "value", "abcd.ini");
172 ok(ret, "SQLWritePrivateProfileString failed\n");
173 if(ret)
174 {
175 HKEY hkey;
176
177 reg_ret = RegOpenKeyExW(HKEY_CURRENT_USER, abcd_key, 0, KEY_READ, &hkey);
178 ok(reg_ret == ERROR_SUCCESS, "RegOpenKeyExW failed\n");
179 if(reg_ret == ERROR_SUCCESS)
180 {
181 reg_ret = RegDeleteKeyW(HKEY_CURRENT_USER, abcd_key);
182 ok(reg_ret == ERROR_SUCCESS, "RegDeleteKeyW failed\n");
183
184 RegCloseKey(hkey);
185 }
186
187 /* Cleanup key */
188 reg_ret = RegDeleteKeyW(HKEY_CURRENT_USER, abcdini_key);
189 ok(reg_ret == ERROR_SUCCESS, "RegDeleteKeyW failed\n");
190 }
191 }
192
193 static void test_SQLGetPrivateProfileString(void)
194 {
195 int ret;
196 char buffer[256] = {0};
197 LONG reg_ret;
198
199 strcpy(buffer, "wine");
200 ret = SQLGetPrivateProfileString(NULL, "testing" , "default", buffer, 256, "ODBC.INI");
201 ok(ret == 0, "SQLGetPrivateProfileString returned %d\n", ret);
202 ok(!strcmp(buffer, ""), "incorrect string '%s'\n", buffer);
203
204 strcpy(buffer, "wine");
205 ret = SQLGetPrivateProfileString("wineodbc", NULL , "default", buffer, 256, "ODBC.INI");
206 ok(ret == 0, "SQLGetPrivateProfileString returned %d\n", ret);
207 ok(!strcmp(buffer, ""), "incorrect string '%s'\n", buffer);
208
209 strcpy(buffer, "value");
210 ret = SQLGetPrivateProfileString("wineodbc", "testing" , NULL, buffer, 256, "ODBC.INI");
211 ok(ret == 0, "SQLGetPrivateProfileString returned %d\n", ret);
212 ok(!strcmp(buffer, ""), "incorrect string '%s'\n", buffer);
213
214 ret = SQLGetPrivateProfileString("wineodbc", "testing" , "defaultX", buffer, 256, "ODBC.INI");
215 ok(ret == strlen("defaultX"), "SQLGetPrivateProfileString returned %d\n", ret);
216 ok(!strcmp(buffer, "defaultX"), "incorrect string '%s'\n", buffer);
217
218 ret = SQLGetPrivateProfileString("wineodbc", "testing" , "defaultX", buffer, 4, "ODBC.INI");
219 ok(ret == strlen("def"), "SQLGetPrivateProfileString returned %d\n", ret);
220 ok(!strcmp(buffer, "def"), "incorrect string '%s'\n", buffer);
221
222 ret = SQLGetPrivateProfileString("wineodbc", "testing" , "defaultX", buffer, 8, "ODBC.INI");
223 ok(ret == strlen("default"), "SQLGetPrivateProfileString returned %d\n", ret);
224 ok(!strcmp(buffer, "default"), "incorrect string '%s'\n", buffer);
225
226 ret = SQLGetPrivateProfileString("wineodbc", "testing" , "defaultX", NULL, 256, "ODBC.INI");
227 ok(ret == 0, "SQLGetPrivateProfileString returned %d\n", ret);
228
229 strcpy(buffer, "value");
230 ret = SQLGetPrivateProfileString("wineodbc", "testing" , "defaultX", buffer, 0, "ODBC.INI");
231 ok(ret == 0, "SQLGetPrivateProfileString returned %d\n", ret);
232 ok(!strcmp(buffer, "value"), "incorrect string '%s'\n", buffer);
233
234 ret = SQLWritePrivateProfileString("wineodbc", "testing" , "value0123456789", "abcd.ini");
235 ok(ret, "SQLWritePrivateProfileString failed\n");
236 if(ret)
237 {
238 HKEY hkey;
239
240 ret = SQLGetPrivateProfileString("wineodbc", "testing" , "defaultY", buffer, 256, "abcd.ini");
241 ok(ret == strlen("value0123456789"), "SQLGetPrivateProfileString returned %d\n", ret);
242 ok(!strcmp(buffer, "value0123456789"), "incorrect string '%s'\n", buffer);
243
244 ret = SQLGetPrivateProfileString("wineodbc", "testing" , "defaultY", NULL, 0, "abcd.ini");
245 ok(ret == 0, "SQLGetPrivateProfileString returned %d\n", ret);
246
247 ret = SQLGetPrivateProfileString("wineodbc", "testing" , "defaultY", buffer, 7, "abcd.ini");
248 ok(ret == 6, "SQLGetPrivateProfileString returned %d\n", ret);
249
250 strcpy(buffer, "wine");
251 ret = SQLGetPrivateProfileString("wineodbc", NULL , "", buffer, 10, "abcd.ini");
252 ok(ret == (strlen("testing")+1), "SQLGetPrivateProfileString returned %d\n", ret);
253 ok(!strcmp(buffer, "testing"), "incorrect string '%s'\n", buffer);
254
255 ret = SQLWritePrivateProfileString("wineodbc", "value" , "0", "abcd.ini");
256 ok(ret, "SQLWritePrivateProfileString failed\n");
257
258 strcpy(buffer, "wine");
259 ret = SQLGetPrivateProfileString("wineodbc", NULL , "", buffer, 256, "abcd.ini");
260 ok(ret == (strlen("testing") + strlen("value")+2), "SQLGetPrivateProfileString returned %d\n", ret);
261 if(ret >= (strlen("testing") + strlen("value")+2))
262 {
263 ok(memcmp(buffer, "testing\0value\0", 14) == 0, "incorrect string '%s'\n", buffer);
264 }
265
266 strcpy(buffer, "XXXXXXXXXXXXXXX");
267 ret = SQLGetPrivateProfileString("wineodbc", NULL , "", buffer, 10, "abcd.ini");
268 ok(ret == (strlen("testing")+1), "SQLGetPrivateProfileString returned %d\n", ret);
269 if(ret >= (strlen("testing")+1))
270 {
271 ok(!strcmp(buffer, "testing"), "incorrect string '%s'\n", buffer);
272 /* Show that the buffer is cleared and partial enteries aren't added */
273 ok(memcmp(buffer, "testing\0X", 9) != 0, "incorrect string '%s'\n", buffer);
274 }
275
276 strcpy(buffer, "wine");
277 ret = SQLGetPrivateProfileString("wineodbc", NULL , "", buffer, 2, "abcd.ini");
278 ok(ret == 0, "SQLGetPrivateProfileString returned %d\n", ret);
279
280 reg_ret = RegOpenKeyExW(HKEY_CURRENT_USER, abcd_key, 0, KEY_READ, &hkey);
281 ok(reg_ret == ERROR_SUCCESS, "RegOpenKeyExW failed\n");
282 if(reg_ret == ERROR_SUCCESS)
283 {
284 reg_ret = RegDeleteKeyW(HKEY_CURRENT_USER, abcd_key);
285 ok(reg_ret == ERROR_SUCCESS, "RegDeleteKeyW failed\n");
286
287 RegCloseKey(hkey);
288 }
289
290 /* Cleanup key */
291 reg_ret = RegDeleteKeyW(HKEY_CURRENT_USER, abcdini_key);
292 ok(reg_ret == ERROR_SUCCESS, "RegDeleteKeyW failed\n");
293 }
294 }
295
296 static void test_SQLGetPrivateProfileStringW(void)
297 {
298 static WCHAR testing[] = {'t','e','s','t','i','n','g',0};
299 static WCHAR wineodbc[] = {'w','i','n','e','o','d','b','c',0};
300 static WCHAR defaultval[] = {'d','e','f','a','u','l','t',0};
301 static WCHAR odbcini[] = {'O','D','B','C','.','I','N','I',0};
302 static WCHAR abcdini[] = {'a','b','c','d','.','I','N','I',0};
303 static WCHAR wine[] = {'w','i','n','e',0};
304 static WCHAR value[] = {'v','a','l','u','e',0};
305 static WCHAR empty[] = {0};
306 static WCHAR defaultX[] = {'d','e','f','a','u','l','t',0};
307 static WCHAR def[] = {'d','e','f',0};
308 static WCHAR value0[] = {'v','a','l','u','e','0','1','2','3','4','5','6','7','8','9',0};
309 static WCHAR testingvalue[] = {'t','e','s','t','i','n','g',0,'v','a','l','u','e',0};
310 int ret;
311 WCHAR buffer[256] = {0};
312 LONG reg_ret;
313
314 lstrcpyW(buffer, wine);
315 ret = SQLGetPrivateProfileStringW(NULL, testing , defaultval, buffer, 256, odbcini);
316 ok(ret == 0, "SQLGetPrivateProfileStringW returned %d\n", ret);
317 ok(!lstrcmpW(buffer, wine), "incorrect string '%s'\n", wine_dbgstr_w(buffer));
318
319 lstrcpyW(buffer, wine);
320 ret = SQLGetPrivateProfileStringW(wineodbc, NULL , defaultval, buffer, 256, odbcini);
321 ok(ret == 0, "SQLGetPrivateProfileStringW returned %d\n", ret);
322 ok(!lstrcmpW(buffer, empty), "incorrect string '%s'\n", wine_dbgstr_w(buffer));
323
324 lstrcpyW(buffer, value);
325 ret = SQLGetPrivateProfileStringW(wineodbc, testing , NULL, buffer, 256, odbcini);
326 ok(ret == 0, "SQLGetPrivateProfileStringW returned %d\n", ret);
327 ok(!lstrcmpW(buffer, empty), "incorrect string '%s'\n", wine_dbgstr_w(buffer));
328
329 ret = SQLGetPrivateProfileStringW(wineodbc, testing , defaultX, buffer, 256, odbcini);
330 ok(ret == lstrlenW(defaultX), "SQLGetPrivateProfileStringW returned %d\n", ret);
331 ok(!lstrcmpW(buffer, defaultX), "incorrect string '%s'\n", wine_dbgstr_w(buffer));
332
333 ret = SQLGetPrivateProfileStringW(wineodbc, testing , defaultX, buffer, 4, odbcini);
334 ok(ret == lstrlenW(def), "SQLGetPrivateProfileStringW returned %d\n", ret);
335 ok(!lstrcmpW(buffer, def), "incorrect string '%s'\n", wine_dbgstr_w(buffer));
336
337 ret = SQLGetPrivateProfileStringW(wineodbc, testing , defaultX, buffer, 8, odbcini);
338 ok(ret == lstrlenW(defaultX), "SQLGetPrivateProfileStringW returned %d\n", ret);
339 ok(!lstrcmpW(buffer, defaultX), "incorrect string '%s'\n", wine_dbgstr_w(buffer));
340
341 ret = SQLGetPrivateProfileStringW(wineodbc, testing , defaultX, NULL, 256, odbcini);
342 ok(ret == 0, "SQLGetPrivateProfileStringW returned %d\n", ret);
343
344 lstrcpyW(buffer, value);
345 ret = SQLGetPrivateProfileStringW(wineodbc, testing , defaultX, buffer, 0, odbcini);
346 ok(ret == 0, "SQLGetPrivateProfileStringW returned %d\n", ret);
347 ok(!lstrcmpW(buffer, value), "incorrect string '%s'\n", wine_dbgstr_w(buffer));
348
349 ret = SQLWritePrivateProfileString("wineodbc", "testing" , "value0123456789", "abcd.ini");
350 ok(ret, "SQLWritePrivateProfileString failed\n");
351 if(ret)
352 {
353 HKEY hkey;
354
355 ret = SQLGetPrivateProfileStringW(wineodbc, testing , defaultX, buffer, 256, abcdini);
356 ok(ret == lstrlenW(value0), "SQLGetPrivateProfileStringW returned %d\n", ret);
357 ok(!lstrcmpW(buffer, value0), "incorrect string '%s'\n", wine_dbgstr_w(buffer));
358
359 ret = SQLGetPrivateProfileStringW(wineodbc, testing , defaultX, NULL, 0, abcdini);
360 ok(ret == 0, "SQLGetPrivateProfileStringW returned %d\n", ret);
361
362 ret = SQLGetPrivateProfileStringW(wineodbc, testing , defaultX, buffer, 7, abcdini);
363 ok(ret == 6, "SQLGetPrivateProfileStringW returned %d\n", ret);
364
365 lstrcpyW(buffer, wine);
366 ret = SQLGetPrivateProfileStringW(wineodbc, NULL , empty, buffer, 10, abcdini);
367 ok(ret == lstrlenW(testing)+1, "SQLGetPrivateProfileStringW returned %d\n", ret);
368 ok(!lstrcmpW(buffer, testing), "incorrect string '%s'\n", wine_dbgstr_w(buffer));
369
370 ret = SQLWritePrivateProfileString("wineodbc", "value" , "0", "abcd.ini");
371 ok(ret, "SQLWritePrivateProfileString failed\n");
372
373 lstrcpyW(buffer, wine);
374 ret = SQLGetPrivateProfileStringW(wineodbc, NULL , empty, buffer, 256, abcdini);
375 ok(ret == (lstrlenW(testing) + lstrlenW(value)+2), "SQLGetPrivateProfileStringW returned %d\n", ret);
376 if(ret == (lstrlenW(testing) + lstrlenW(value)+2))
377 {
378 ok(!memcmp(buffer, testingvalue, sizeof(testingvalue)),
379 "incorrect string '%s'\n", wine_dbgstr_wn(buffer, ret));
380 }
381
382 lstrcpyW(buffer, value);
383 ret = SQLGetPrivateProfileStringW(wineodbc, NULL , empty, buffer, 10, abcdini);
384 ok(ret == lstrlenW(testing)+1, "SQLGetPrivateProfileStringW returned %d\n", ret);
385 if(ret >= lstrlenW(testing)+1)
386 {
387 ok(!lstrcmpW(buffer, testing), "incorrect string '%s'\n", wine_dbgstr_w(buffer));
388 }
389
390 lstrcpyW(buffer, value);
391 ret = SQLGetPrivateProfileStringW(wineodbc, NULL , empty, buffer, 2, abcdini);
392 ok(ret == 0, "SQLGetPrivateProfileStringW returned %d\n", ret);
393
394 reg_ret = RegOpenKeyExW(HKEY_CURRENT_USER, abcd_key, 0, KEY_READ, &hkey);
395 ok(reg_ret == ERROR_SUCCESS, "RegOpenKeyExW failed\n");
396 if(reg_ret == ERROR_SUCCESS)
397 {
398 reg_ret = RegDeleteKeyW(HKEY_CURRENT_USER, abcd_key);
399 ok(reg_ret == ERROR_SUCCESS, "RegDeleteKeyW failed\n");
400
401 RegCloseKey(hkey);
402 }
403
404 /* Cleanup key */
405 reg_ret = RegDeleteKeyW(HKEY_CURRENT_USER, abcdini_key);
406 ok(reg_ret == ERROR_SUCCESS, "RegDeleteKeyW failed\n");
407 }
408 }
409
410 START_TEST(misc)
411 {
412 test_SQLConfigMode();
413 test_SQLInstallerError();
414 test_SQLInstallDriverManager();
415 test_SQLWritePrivateProfileString();
416 test_SQLGetPrivateProfileString();
417 test_SQLGetPrivateProfileStringW();
418 }