c6b55feef5c2ed1057215eaaa59a507f0721f0ac
[reactos.git] / rostests / winetests / shlwapi / shreg.c
1 /* Unit test suite for SHReg* functions
2 *
3 * Copyright 2002 Juergen Schmied
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 */
19
20 #define WIN32_NO_STATUS
21 #define _INC_WINDOWS
22 #define COM_NO_WINDOWS_H
23
24 //#include <stdarg.h>
25 //#include <stdio.h>
26
27 #include <wine/test.h>
28 //#include "windef.h"
29 //#include "winbase.h"
30 //#include "winerror.h"
31 #include <winreg.h>
32 //#include "winuser.h"
33 #include <shlwapi.h>
34
35 /* Keys used for testing */
36 #define REG_TEST_KEY "Software\\Wine\\Test"
37 #define REG_CURRENT_VERSION "Software\\Microsoft\\Windows\\CurrentVersion\\explorer"
38
39 static HMODULE hshlwapi;
40
41 static DWORD (WINAPI *pSHCopyKeyA)(HKEY,LPCSTR,HKEY,DWORD);
42 static DWORD (WINAPI *pSHRegGetPathA)(HKEY,LPCSTR,LPCSTR,LPSTR,DWORD);
43 static LSTATUS (WINAPI *pSHRegGetValueA)(HKEY,LPCSTR,LPCSTR,SRRF,LPDWORD,LPVOID,LPDWORD);
44 static LSTATUS (WINAPI *pSHRegCreateUSKeyW)(LPCWSTR,REGSAM,HUSKEY,PHUSKEY,DWORD);
45
46 static char sTestpath1[] = "%LONGSYSTEMVAR%\\subdir1";
47 static char sTestpath2[] = "%FOO%\\subdir1";
48
49 static const char * sEnvvar1 = "bar";
50 static const char * sEnvvar2 = "ImARatherLongButIndeedNeededString";
51
52 static char sExpTestpath1[MAX_PATH];
53 static char sExpTestpath2[MAX_PATH];
54 static DWORD nExpLen1;
55 static DWORD nExpLen2;
56
57 static const char * sEmptyBuffer ="0123456789";
58
59 /* delete key and all its subkeys */
60 static DWORD delete_key( HKEY hkey, LPCSTR parent, LPCSTR keyname )
61 {
62 HKEY parentKey;
63 DWORD ret;
64
65 RegCloseKey(hkey);
66
67 /* open the parent of the key to close */
68 ret = RegOpenKeyExA( HKEY_CURRENT_USER, parent, 0, KEY_ALL_ACCESS, &parentKey);
69 if (ret != ERROR_SUCCESS)
70 return ret;
71
72 ret = SHDeleteKeyA( parentKey, keyname );
73 RegCloseKey(parentKey);
74
75 return ret;
76 }
77
78 static HKEY create_test_entries(void)
79 {
80 HKEY hKey;
81 DWORD ret;
82 DWORD nExpectedLen1, nExpectedLen2;
83
84 SetEnvironmentVariableA("LONGSYSTEMVAR", sEnvvar1);
85 SetEnvironmentVariableA("FOO", sEnvvar2);
86
87 ret = RegCreateKeyA(HKEY_CURRENT_USER, REG_TEST_KEY, &hKey);
88 ok( ERROR_SUCCESS == ret, "RegCreateKeyA failed, ret=%u\n", ret);
89
90 if (hKey)
91 {
92 ok(!RegSetValueExA(hKey,"Test1",0,REG_EXPAND_SZ, (LPBYTE) sTestpath1, strlen(sTestpath1)+1), "RegSetValueExA failed\n");
93 ok(!RegSetValueExA(hKey,"Test2",0,REG_SZ, (LPBYTE) sTestpath1, strlen(sTestpath1)+1), "RegSetValueExA failed\n");
94 ok(!RegSetValueExA(hKey,"Test3",0,REG_EXPAND_SZ, (LPBYTE) sTestpath2, strlen(sTestpath2)+1), "RegSetValueExA failed\n");
95 }
96
97 nExpLen1 = ExpandEnvironmentStringsA(sTestpath1, sExpTestpath1, sizeof(sExpTestpath1));
98 nExpLen2 = ExpandEnvironmentStringsA(sTestpath2, sExpTestpath2, sizeof(sExpTestpath2));
99
100 nExpectedLen1 = strlen(sTestpath1) - strlen("%LONGSYSTEMVAR%") + strlen(sEnvvar1) + 1;
101 nExpectedLen2 = strlen(sTestpath2) - strlen("%FOO%") + strlen(sEnvvar2) + 1;
102 /* ExpandEnvironmentStringsA on NT4 returns 2x the correct result */
103 trace("sExplen1 = (%d)\n", nExpLen1);
104 if (nExpectedLen1 != nExpLen1)
105 trace( "Expanding %s failed (expected %d) - known bug in NT4\n", sTestpath1, nExpectedLen1 );
106
107 trace("sExplen2 = (%d)\n", nExpLen2);
108 if (nExpectedLen2 != nExpLen2)
109 trace( "Expanding %s failed (expected %d) - known bug in NT4\n", sTestpath2, nExpectedLen2 );
110
111 /* Make sure we carry on with correct values */
112 nExpLen1 = nExpectedLen1;
113 nExpLen2 = nExpectedLen2;
114 return hKey;
115 }
116
117 static void test_SHGetValue(void)
118 {
119 DWORD dwSize;
120 DWORD dwType;
121 DWORD dwRet;
122 char buf[MAX_PATH];
123
124 strcpy(buf, sEmptyBuffer);
125 dwSize = MAX_PATH;
126 dwType = -1;
127 dwRet = SHGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test1", &dwType, buf, &dwSize);
128 ok( ERROR_SUCCESS == dwRet, "SHGetValueA failed, ret=%u\n", dwRet);
129 ok( 0 == strcmp(sExpTestpath1, buf) ||
130 broken(0 == strcmp(sTestpath1, buf)), /* IE4.x */
131 "Comparing of (%s) with (%s) failed\n", buf, sExpTestpath1);
132 ok( REG_SZ == dwType ||
133 broken(REG_EXPAND_SZ == dwType), /* IE4.x */
134 "Expected REG_SZ, got (%u)\n", dwType);
135
136 strcpy(buf, sEmptyBuffer);
137 dwSize = MAX_PATH;
138 dwType = -1;
139 dwRet = SHGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test2", &dwType, buf, &dwSize);
140 ok( ERROR_SUCCESS == dwRet, "SHGetValueA failed, ret=%u\n", dwRet);
141 ok( 0 == strcmp(sTestpath1, buf) , "Comparing of (%s) with (%s) failed\n", buf, sTestpath1);
142 ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType);
143 }
144
145 static void test_SHRegGetValue(void)
146 {
147 LSTATUS ret;
148 DWORD size, type;
149 char data[MAX_PATH];
150
151 if(!pSHRegGetValueA)
152 return;
153
154 size = MAX_PATH;
155 ret = pSHRegGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test1", SRRF_RT_REG_EXPAND_SZ, &type, data, &size);
156 ok(ret == ERROR_INVALID_PARAMETER, "SHRegGetValue failed, ret=%u\n", ret);
157
158 size = MAX_PATH;
159 ret = pSHRegGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test1", SRRF_RT_REG_SZ, &type, data, &size);
160 ok(ret == ERROR_SUCCESS, "SHRegGetValue failed, ret=%u\n", ret);
161 ok(!strcmp(data, sExpTestpath1), "data = %s, expected %s\n", data, sExpTestpath1);
162 ok(type == REG_SZ, "type = %d, expected REG_SZ\n", type);
163
164 size = MAX_PATH;
165 ret = pSHRegGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test1", SRRF_RT_REG_DWORD, &type, data, &size);
166 ok(ret == ERROR_UNSUPPORTED_TYPE, "SHRegGetValue failed, ret=%u\n", ret);
167
168 size = MAX_PATH;
169 ret = pSHRegGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test2", SRRF_RT_REG_EXPAND_SZ, &type, data, &size);
170 ok(ret == ERROR_INVALID_PARAMETER, "SHRegGetValue failed, ret=%u\n", ret);
171
172 size = MAX_PATH;
173 ret = pSHRegGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test2", SRRF_RT_REG_SZ, &type, data, &size);
174 ok(ret == ERROR_SUCCESS, "SHRegGetValue failed, ret=%u\n", ret);
175 ok(!strcmp(data, sTestpath1), "data = %s, expected %s\n", data, sTestpath1);
176 ok(type == REG_SZ, "type = %d, expected REG_SZ\n", type);
177
178 size = MAX_PATH;
179 ret = pSHRegGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test2", SRRF_RT_REG_QWORD, &type, data, &size);
180 ok(ret == ERROR_UNSUPPORTED_TYPE, "SHRegGetValue failed, ret=%u\n", ret);
181 }
182
183 static void test_SHGetRegPath(void)
184 {
185 char buf[MAX_PATH];
186 DWORD dwRet;
187
188 if (!pSHRegGetPathA)
189 return;
190
191 strcpy(buf, sEmptyBuffer);
192 dwRet = (*pSHRegGetPathA)(HKEY_CURRENT_USER, REG_TEST_KEY, "Test1", buf, 0);
193 ok( ERROR_SUCCESS == dwRet, "SHRegGetPathA failed, ret=%u\n", dwRet);
194 ok( 0 == strcmp(sExpTestpath1, buf) , "Comparing (%s) with (%s) failed\n", buf, sExpTestpath1);
195 }
196
197 static void test_SHQueryValueEx(void)
198 {
199 HKEY hKey;
200 DWORD dwSize;
201 DWORD dwType;
202 char buf[MAX_PATH];
203 DWORD dwRet;
204 const char * sTestedFunction = "";
205 DWORD nUsedBuffer1,nUsedBuffer2;
206
207 sTestedFunction = "RegOpenKeyExA";
208 dwRet = RegOpenKeyExA(HKEY_CURRENT_USER, REG_TEST_KEY, 0, KEY_QUERY_VALUE, &hKey);
209 ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet);
210
211 /****** SHQueryValueExA ******/
212
213 sTestedFunction = "SHQueryValueExA";
214 nUsedBuffer1 = max(strlen(sExpTestpath1)+1, strlen(sTestpath1)+1);
215 nUsedBuffer2 = max(strlen(sExpTestpath2)+1, strlen(sTestpath2)+1);
216 /*
217 * Case 1.1 All arguments are NULL
218 */
219 dwRet = SHQueryValueExA( hKey, "Test1", NULL, NULL, NULL, NULL);
220 ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet);
221
222 /*
223 * Case 1.2 dwType is set
224 */
225 dwType = -1;
226 dwRet = SHQueryValueExA( hKey, "Test1", NULL, &dwType, NULL, NULL);
227 ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet);
228 ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType);
229
230 /*
231 * dwSize is set
232 * dwExpanded < dwUnExpanded
233 */
234 dwSize = 6;
235 dwRet = SHQueryValueExA( hKey, "Test1", NULL, NULL, NULL, &dwSize);
236 ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet);
237 ok( dwSize == nUsedBuffer1, "Buffer sizes (%u) and (%u) are not equal\n", dwSize, nUsedBuffer1);
238
239 /*
240 * dwExpanded > dwUnExpanded
241 */
242 dwSize = 6;
243 dwRet = SHQueryValueExA( hKey, "Test3", NULL, NULL, NULL, &dwSize);
244 ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet);
245 ok( dwSize >= nUsedBuffer2 ||
246 broken(dwSize == (strlen(sTestpath2) + 1)), /* < IE4.x */
247 "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2);
248
249 /*
250 * Case 1 string shrinks during expanding
251 */
252 strcpy(buf, sEmptyBuffer);
253 dwSize = 6;
254 dwType = -1;
255 dwRet = SHQueryValueExA( hKey, "Test1", NULL, &dwType, buf, &dwSize);
256 ok( ERROR_MORE_DATA == dwRet, "Expected ERROR_MORE_DATA, got (%u)\n", dwRet);
257 ok( 0 == strcmp(sEmptyBuffer, buf) , "Comparing (%s) with (%s) failed\n", buf, sEmptyBuffer);
258 ok( dwSize == nUsedBuffer1, "Buffer sizes (%u) and (%u) are not equal\n", dwSize, nUsedBuffer1);
259 ok( REG_SZ == dwType ||
260 broken(REG_EXPAND_SZ == dwType), /* < IE6 */
261 "Expected REG_SZ, got (%u)\n", dwType);
262
263 /*
264 * string grows during expanding
265 * dwSize is smaller than the size of the unexpanded string
266 */
267 strcpy(buf, sEmptyBuffer);
268 dwSize = 6;
269 dwType = -1;
270 dwRet = SHQueryValueExA( hKey, "Test3", NULL, &dwType, buf, &dwSize);
271 ok( ERROR_MORE_DATA == dwRet, "Expected ERROR_MORE_DATA, got (%u)\n", dwRet);
272 ok( 0 == strcmp(sEmptyBuffer, buf) , "Comparing (%s) with (%s) failed\n", buf, sEmptyBuffer);
273 ok( dwSize >= nUsedBuffer2 ||
274 broken(dwSize == (strlen(sTestpath2) + 1)), /* < IE6 */
275 "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2);
276 ok( REG_SZ == dwType ||
277 broken(REG_EXPAND_SZ == dwType), /* < IE6 */
278 "Expected REG_SZ, got (%u)\n", dwType);
279
280 /*
281 * string grows during expanding
282 * dwSize is larger than the size of the unexpanded string, but
283 * smaller than the part before the backslash. If the unexpanded
284 * string fits into the buffer, it can get cut when expanded.
285 */
286 strcpy(buf, sEmptyBuffer);
287 dwSize = strlen(sEnvvar2) - 2;
288 dwType = -1;
289 dwRet = SHQueryValueExA( hKey, "Test3", NULL, &dwType, buf, &dwSize);
290 ok( ERROR_MORE_DATA == dwRet ||
291 broken(ERROR_ENVVAR_NOT_FOUND == dwRet) || /* IE5.5 */
292 broken(ERROR_SUCCESS == dwRet), /* < IE5.5*/
293 "Expected ERROR_MORE_DATA, got (%u)\n", dwRet);
294
295 todo_wine
296 {
297 ok( (0 == strcmp("", buf)) || (0 == strcmp(sTestpath2, buf)),
298 "Expected empty or unexpanded string (win98), got (%s)\n", buf);
299 }
300
301 ok( dwSize >= nUsedBuffer2 ||
302 broken(dwSize == (strlen("") + 1)), /* < IE 5.5 */
303 "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2);
304 ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType);
305
306 /*
307 * string grows during expanding
308 * dwSize is larger than the size of the part before the backslash,
309 * but smaller than the expanded string. If the unexpanded string fits
310 * into the buffer, it can get cut when expanded.
311 */
312 strcpy(buf, sEmptyBuffer);
313 dwSize = nExpLen2 - 4;
314 dwType = -1;
315 dwRet = SHQueryValueExA( hKey, "Test3", NULL, &dwType, buf, &dwSize);
316 ok( ERROR_MORE_DATA == dwRet ||
317 broken(ERROR_ENVVAR_NOT_FOUND == dwRet) || /* IE5.5 */
318 broken(ERROR_SUCCESS == dwRet), /* < IE5.5 */
319 "Expected ERROR_MORE_DATA, got (%u)\n", dwRet);
320
321 todo_wine
322 {
323 ok( (0 == strcmp("", buf)) || (0 == strcmp(sEnvvar2, buf)) ||
324 broken(0 == strcmp(sTestpath2, buf)), /* IE 5.5 */
325 "Expected empty or first part of the string \"%s\", got \"%s\"\n", sEnvvar2, buf);
326 }
327
328 ok( dwSize >= nUsedBuffer2 ||
329 broken(dwSize == (strlen(sEnvvar2) + 1)) || /* IE4.01 SP1 (W98) and IE5 (W98SE) */
330 broken(dwSize == (strlen("") + 1)), /* IE4.01 (NT4) and IE5.x (W2K) */
331 "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2);
332 ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType);
333
334 /*
335 * The buffer is NULL but the size is set
336 */
337 strcpy(buf, sEmptyBuffer);
338 dwSize = 6;
339 dwType = -1;
340 dwRet = SHQueryValueExA( hKey, "Test3", NULL, &dwType, NULL, &dwSize);
341 ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet);
342 ok( dwSize >= nUsedBuffer2 ||
343 broken(dwSize == (strlen(sTestpath2) + 1)), /* IE4.01 SP1 (Win98) */
344 "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2);
345 ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType);
346
347 RegCloseKey(hKey);
348 }
349
350 static void test_SHCopyKey(void)
351 {
352 HKEY hKeySrc, hKeyDst;
353 DWORD dwRet;
354
355 if (!pSHCopyKeyA)
356 {
357 win_skip("SHCopyKeyA is not available\n");
358 return;
359 }
360
361 /* Delete existing destination sub keys */
362 hKeyDst = NULL;
363 if (!RegOpenKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\\CopyDestination", &hKeyDst) && hKeyDst)
364 {
365 SHDeleteKeyA(hKeyDst, NULL);
366 RegCloseKey(hKeyDst);
367 }
368
369 hKeyDst = NULL;
370 dwRet = RegCreateKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\\CopyDestination", &hKeyDst);
371 if (dwRet || !hKeyDst)
372 {
373 ok( 0, "Destination couldn't be created, RegCreateKeyA returned (%u)\n", dwRet);
374 return;
375 }
376
377 hKeySrc = NULL;
378 dwRet = RegOpenKeyA(HKEY_LOCAL_MACHINE, REG_CURRENT_VERSION, &hKeySrc);
379 if (dwRet || !hKeySrc)
380 {
381 ok( 0, "Source couldn't be opened, RegOpenKeyA returned (%u)\n", dwRet);
382 RegCloseKey(hKeyDst);
383 return;
384 }
385
386 dwRet = (*pSHCopyKeyA)(hKeySrc, NULL, hKeyDst, 0);
387 ok ( ERROR_SUCCESS == dwRet, "Copy failed, ret=(%u)\n", dwRet);
388
389 RegCloseKey(hKeySrc);
390 RegCloseKey(hKeyDst);
391
392 /* Check we copied the sub keys, i.e. something that's on every windows system (including Wine) */
393 hKeyDst = NULL;
394 dwRet = RegOpenKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\\CopyDestination\\Shell Folders", &hKeyDst);
395 if (dwRet || !hKeyDst)
396 {
397 ok ( 0, "Copy couldn't be opened, RegOpenKeyA returned (%u)\n", dwRet);
398 return;
399 }
400
401 /* And the we copied the values too */
402 ok(!SHQueryValueExA(hKeyDst, "Common AppData", NULL, NULL, NULL, NULL), "SHQueryValueExA failed\n");
403
404 RegCloseKey(hKeyDst);
405 }
406
407 static void test_SHDeleteKey(void)
408 {
409 HKEY hKeyTest, hKeyS;
410 DWORD dwRet;
411 int sysfail = 1;
412
413 if (!RegOpenKeyA(HKEY_CURRENT_USER, REG_TEST_KEY, &hKeyTest))
414 {
415 if (!RegCreateKey(hKeyTest, "ODBC", &hKeyS))
416 {
417 HKEY hKeyO;
418
419 if (!RegCreateKey(hKeyS, "ODBC.INI", &hKeyO))
420 {
421 RegCloseKey (hKeyO);
422
423 if (!RegCreateKey(hKeyS, "ODBCINST.INI", &hKeyO))
424 {
425 RegCloseKey (hKeyO);
426 sysfail = 0;
427 }
428 }
429 RegCloseKey (hKeyS);
430 }
431 RegCloseKey (hKeyTest);
432 }
433
434 if (!sysfail)
435 {
436
437 dwRet = SHDeleteKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\\ODBC");
438 ok ( ERROR_SUCCESS == dwRet, "SHDeleteKey failed, ret=(%u)\n", dwRet);
439
440 dwRet = RegOpenKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\\ODBC", &hKeyS);
441 ok ( ERROR_FILE_NOT_FOUND == dwRet, "SHDeleteKey did not delete\n");
442
443 if (dwRet == ERROR_SUCCESS)
444 RegCloseKey (hKeyS);
445 }
446 else
447 ok( 0, "Could not set up SHDeleteKey test\n");
448 }
449
450 static void test_SHRegCreateUSKeyW(void)
451 {
452 static const WCHAR subkeyW[] = {'s','u','b','k','e','y',0};
453 LONG ret;
454
455 if (!pSHRegCreateUSKeyW)
456 {
457 win_skip("SHRegCreateUSKeyW not available\n");
458 return;
459 }
460
461 ret = pSHRegCreateUSKeyW(subkeyW, KEY_ALL_ACCESS, NULL, NULL, SHREGSET_FORCE_HKCU);
462 ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret);
463 }
464
465 START_TEST(shreg)
466 {
467 HKEY hkey = create_test_entries();
468
469 if (!hkey) return;
470
471 hshlwapi = GetModuleHandleA("shlwapi.dll");
472
473 /* SHCreateStreamOnFileEx was introduced in shlwapi v6.0 */
474 if(!GetProcAddress(hshlwapi, "SHCreateStreamOnFileEx")){
475 win_skip("Too old shlwapi version\n");
476 return;
477 }
478
479 pSHCopyKeyA = (void*)GetProcAddress(hshlwapi,"SHCopyKeyA");
480 pSHRegGetPathA = (void*)GetProcAddress(hshlwapi,"SHRegGetPathA");
481 pSHRegGetValueA = (void*)GetProcAddress(hshlwapi,"SHRegGetValueA");
482 pSHRegCreateUSKeyW = (void*)GetProcAddress(hshlwapi, "SHRegCreateUSKeyW");
483
484 test_SHGetValue();
485 test_SHRegGetValue();
486 test_SHQueryValueEx();
487 test_SHGetRegPath();
488 test_SHCopyKey();
489 test_SHDeleteKey();
490 test_SHRegCreateUSKeyW();
491
492 delete_key( hkey, "Software\\Wine", "Test" );
493 }