shreg.c 14.3 KB
Newer Older
1
/* Unit test suite for SHReg* functions
Juergen Schmied's avatar
Juergen Schmied committed
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
 *
 * Copyright 2002 Juergen Schmied
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * 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
Juergen Schmied's avatar
Juergen Schmied committed
18 19 20
 */

#include <assert.h>
21
#include <stdarg.h>
Juergen Schmied's avatar
Juergen Schmied committed
22 23 24
#include <stdio.h>

#include "wine/test.h"
25
#include "windef.h"
Juergen Schmied's avatar
Juergen Schmied committed
26
#include "winbase.h"
27
#include "winerror.h"
Juergen Schmied's avatar
Juergen Schmied committed
28 29 30 31
#include "winreg.h"
#include "winuser.h"
#include "shlwapi.h"

Patrik Stridvall's avatar
Patrik Stridvall committed
32
/* Keys used for testing */
33
#define REG_TEST_KEY        "Software\\Wine\\Test"
34
#define REG_CURRENT_VERSION "Software\\Microsoft\\Windows\\CurrentVersion\\explorer"
35

36 37 38 39 40 41
static HMODULE hshlwapi;
typedef DWORD (WINAPI *SHCopyKeyA_func)(HKEY,LPCSTR,HKEY,DWORD);
static SHCopyKeyA_func pSHCopyKeyA;
typedef DWORD (WINAPI *SHRegGetPathA_func)(HKEY,LPCSTR,LPCSTR,LPSTR,DWORD);
static SHRegGetPathA_func pSHRegGetPathA;

42 43
static char sTestpath1[] = "%LONGSYSTEMVAR%\\subdir1";
static char sTestpath2[] = "%FOO%\\subdir1";
Juergen Schmied's avatar
Juergen Schmied committed
44

Paul Vriens's avatar
Paul Vriens committed
45 46 47
static const char * sEnvvar1 = "bar";
static const char * sEnvvar2 = "ImARatherLongButIndeedNeededString";

Juergen Schmied's avatar
Juergen Schmied committed
48 49
static char sExpTestpath1[MAX_PATH];
static char sExpTestpath2[MAX_PATH];
50 51
static DWORD nExpLen1;
static DWORD nExpLen2;
Juergen Schmied's avatar
Juergen Schmied committed
52

53
static const char * sEmptyBuffer ="0123456789";
Juergen Schmied's avatar
Juergen Schmied committed
54

55
/* delete key and all its subkeys */
56
static DWORD delete_key( HKEY hkey, LPCSTR parent, LPCSTR keyname )
57
{
58
    HKEY parentKey;
59 60
    DWORD ret;

61 62 63
    RegCloseKey(hkey);

    /* open the parent of the key to close */
64
    ret = RegOpenKeyExA( HKEY_CURRENT_USER, parent, 0, KEY_ALL_ACCESS, &parentKey);
65 66 67
    if (ret != ERROR_SUCCESS)
        return ret;

68
    ret = SHDeleteKeyA( parentKey, keyname );
69 70 71
    RegCloseKey(parentKey);

    return ret;
72 73 74
}

static HKEY create_test_entries(void)
Juergen Schmied's avatar
Juergen Schmied committed
75 76
{
	HKEY hKey;
77
        DWORD ret;
78
        DWORD nExpectedLen1, nExpectedLen2;
Juergen Schmied's avatar
Juergen Schmied committed
79

Paul Vriens's avatar
Paul Vriens committed
80 81
        SetEnvironmentVariableA("LONGSYSTEMVAR", sEnvvar1);
        SetEnvironmentVariableA("FOO", sEnvvar2);
82

83
        ret = RegCreateKeyA(HKEY_CURRENT_USER, REG_TEST_KEY, &hKey);
84
	ok( ERROR_SUCCESS == ret, "RegCreateKeyA failed, ret=%u\n", ret);
Juergen Schmied's avatar
Juergen Schmied committed
85 86 87

	if (hKey)
	{
Mike McCormack's avatar
Mike McCormack committed
88 89 90
           ok(!RegSetValueExA(hKey,"Test1",0,REG_EXPAND_SZ, (LPBYTE) sTestpath1, strlen(sTestpath1)+1), "RegSetValueExA failed\n");
           ok(!RegSetValueExA(hKey,"Test2",0,REG_SZ, (LPBYTE) sTestpath1, strlen(sTestpath1)+1), "RegSetValueExA failed\n");
           ok(!RegSetValueExA(hKey,"Test3",0,REG_EXPAND_SZ, (LPBYTE) sTestpath2, strlen(sTestpath2)+1), "RegSetValueExA failed\n");
Juergen Schmied's avatar
Juergen Schmied committed
91 92
	}

93 94
	nExpLen1 = ExpandEnvironmentStringsA(sTestpath1, sExpTestpath1, sizeof(sExpTestpath1));
	nExpLen2 = ExpandEnvironmentStringsA(sTestpath2, sExpTestpath2, sizeof(sExpTestpath2));
95

96 97 98
	nExpectedLen1 = strlen(sTestpath1) - strlen("%LONGSYSTEMVAR%") + strlen(sEnvvar1) + 1;
	nExpectedLen2 = strlen(sTestpath2) - strlen("%FOO%") + strlen(sEnvvar2) + 1;
	/* ExpandEnvironmentStringsA on NT4 returns 2x the correct result */
99
	trace("sExplen1 = (%d)\n", nExpLen1);
100
	if (nExpectedLen1 != nExpLen1)
101
            trace( "Expanding %s failed (expected %d) - known bug in NT4\n", sTestpath1, nExpectedLen1 );
Paul Vriens's avatar
Paul Vriens committed
102

103
        trace("sExplen2 = (%d)\n", nExpLen2);
104
	if (nExpectedLen2 != nExpLen2)
105
            trace( "Expanding %s failed (expected %d) - known bug in NT4\n", sTestpath2, nExpectedLen2 );	
106 107 108 109 110

	/* Make sure we carry on with correct values */
	nExpLen1 = nExpectedLen1; 
	nExpLen2 = nExpectedLen2;
	return hKey;
Juergen Schmied's avatar
Juergen Schmied committed
111 112 113 114 115 116
}

static void test_SHGetValue(void)
{
	DWORD dwSize;
	DWORD dwType;
117
        DWORD dwRet;
Juergen Schmied's avatar
Juergen Schmied committed
118 119 120 121 122
	char buf[MAX_PATH];

	strcpy(buf, sEmptyBuffer);
	dwSize = MAX_PATH;
	dwType = -1;
123
        dwRet = SHGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test1", &dwType, buf, &dwSize);
124
	ok( ERROR_SUCCESS == dwRet, "SHGetValueA failed, ret=%u\n", dwRet);
125 126 127 128 129 130
        ok( 0 == strcmp(sExpTestpath1, buf) ||
            broken(0 == strcmp(sTestpath1, buf)), /* IE4.x */
            "Comparing of (%s) with (%s) failed\n", buf, sExpTestpath1);
        ok( REG_SZ == dwType ||
            broken(REG_EXPAND_SZ == dwType), /* IE4.x */
            "Expected REG_SZ, got (%u)\n", dwType);
Juergen Schmied's avatar
Juergen Schmied committed
131 132 133 134

	strcpy(buf, sEmptyBuffer);
	dwSize = MAX_PATH;
	dwType = -1;
135
        dwRet = SHGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test2", &dwType, buf, &dwSize);
136
	ok( ERROR_SUCCESS == dwRet, "SHGetValueA failed, ret=%u\n", dwRet);
137
	ok( 0 == strcmp(sTestpath1, buf) , "Comparing of (%s) with (%s) failed\n", buf, sTestpath1);
138
	ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType);
Juergen Schmied's avatar
Juergen Schmied committed
139 140
}

141
static void test_SHGetRegPath(void)
Juergen Schmied's avatar
Juergen Schmied committed
142 143
{
	char buf[MAX_PATH];
144
        DWORD dwRet;
Juergen Schmied's avatar
Juergen Schmied committed
145

146 147 148
	if (!pSHRegGetPathA)
		return;

Juergen Schmied's avatar
Juergen Schmied committed
149
	strcpy(buf, sEmptyBuffer);
150
        dwRet = (*pSHRegGetPathA)(HKEY_CURRENT_USER, REG_TEST_KEY, "Test1", buf, 0);
151
	ok( ERROR_SUCCESS == dwRet, "SHRegGetPathA failed, ret=%u\n", dwRet);
152
	ok( 0 == strcmp(sExpTestpath1, buf) , "Comparing (%s) with (%s) failed\n", buf, sExpTestpath1);
Juergen Schmied's avatar
Juergen Schmied committed
153 154 155 156 157 158 159 160 161
}

static void test_SHQUeryValueEx(void)
{
	HKEY hKey;
	DWORD dwSize;
	DWORD dwType;
	char buf[MAX_PATH];
	DWORD dwRet;
162
	const char * sTestedFunction = "";
163
	DWORD nUsedBuffer1,nUsedBuffer2;
Juergen Schmied's avatar
Juergen Schmied committed
164

165 166
        sTestedFunction = "RegOpenKeyExA";
        dwRet = RegOpenKeyExA(HKEY_CURRENT_USER, REG_TEST_KEY, 0,  KEY_QUERY_VALUE, &hKey);
167
	ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet);
Juergen Schmied's avatar
Juergen Schmied committed
168 169 170 171

	/****** SHQueryValueExA ******/

	sTestedFunction = "SHQueryValueExA";
172 173
	nUsedBuffer1 = max(strlen(sExpTestpath1)+1, strlen(sTestpath1)+1);
	nUsedBuffer2 = max(strlen(sExpTestpath2)+1, strlen(sTestpath2)+1);
Juergen Schmied's avatar
Juergen Schmied committed
174 175 176
	/*
	 * Case 1.1 All arguments are NULL
	 */
177
        dwRet = SHQueryValueExA( hKey, "Test1", NULL, NULL, NULL, NULL);
178
	ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet);
Juergen Schmied's avatar
Juergen Schmied committed
179 180 181 182 183

	/*
	 * Case 1.2 dwType is set
	 */
	dwType = -1;
184
        dwRet = SHQueryValueExA( hKey, "Test1", NULL, &dwType, NULL, NULL);
185 186
	ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet);
	ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType);
Juergen Schmied's avatar
Juergen Schmied committed
187 188 189 190 191 192

	/*
	 * dwSize is set
         * dwExpanded < dwUnExpanded
	 */
	dwSize = 6;
193
        dwRet = SHQueryValueExA( hKey, "Test1", NULL, NULL, NULL, &dwSize);
194 195
	ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet);
	ok( dwSize == nUsedBuffer1, "Buffer sizes (%u) and (%u) are not equal\n", dwSize, nUsedBuffer1);
Juergen Schmied's avatar
Juergen Schmied committed
196 197 198 199 200

	/*
         * dwExpanded > dwUnExpanded
	 */
	dwSize = 6;
201
        dwRet = SHQueryValueExA( hKey, "Test3", NULL, NULL, NULL, &dwSize);
202
	ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet);
203 204 205
        ok( dwSize >= nUsedBuffer2 ||
            broken(dwSize == (strlen(sTestpath2) + 1)), /* < IE4.x */
            "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2);
Juergen Schmied's avatar
Juergen Schmied committed
206 207 208 209 210 211 212 213

	/*
	 * Case 1 string shrinks during expanding
	 */
	strcpy(buf, sEmptyBuffer);
	dwSize = 6;
	dwType = -1;
	dwRet = SHQueryValueExA( hKey, "Test1", NULL, &dwType, buf, &dwSize);
214
	ok( ERROR_MORE_DATA == dwRet, "Expected ERROR_MORE_DATA, got (%u)\n", dwRet);
215
	ok( 0 == strcmp(sEmptyBuffer, buf) , "Comparing (%s) with (%s) failed\n", buf, sEmptyBuffer);
216
	ok( dwSize == nUsedBuffer1, "Buffer sizes (%u) and (%u) are not equal\n", dwSize, nUsedBuffer1);
217 218 219
        ok( REG_SZ == dwType ||
            broken(REG_EXPAND_SZ == dwType), /* < IE6 */
            "Expected REG_SZ, got (%u)\n", dwType);
Juergen Schmied's avatar
Juergen Schmied committed
220 221 222

	/*
	 * string grows during expanding
223
         * dwSize is smaller than the size of the unexpanded string
224
	 */
Juergen Schmied's avatar
Juergen Schmied committed
225 226 227 228
	strcpy(buf, sEmptyBuffer);
	dwSize = 6;
	dwType = -1;
	dwRet = SHQueryValueExA( hKey, "Test3", NULL, &dwType, buf, &dwSize);
229
	ok( ERROR_MORE_DATA == dwRet, "Expected ERROR_MORE_DATA, got (%u)\n", dwRet);
230
	ok( 0 == strcmp(sEmptyBuffer, buf) , "Comparing (%s) with (%s) failed\n", buf, sEmptyBuffer);
231 232 233 234 235 236
        ok( dwSize >= nUsedBuffer2 ||
            broken(dwSize == (strlen(sTestpath2) + 1)), /* < IE6 */
            "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2);
        ok( REG_SZ == dwType ||
            broken(REG_EXPAND_SZ == dwType), /* < IE6 */
            "Expected REG_SZ, got (%u)\n", dwType);
Juergen Schmied's avatar
Juergen Schmied committed
237

Paul Vriens's avatar
Paul Vriens committed
238 239
        /*
         * string grows during expanding
240 241 242
         * dwSize is larger than the size of the unexpanded string, but
         * smaller than the part before the backslash. If the unexpanded
         * string fits into the buffer, it can get cut when expanded.
Paul Vriens's avatar
Paul Vriens committed
243 244 245 246 247
         */
        strcpy(buf, sEmptyBuffer);
        dwSize = strlen(sEnvvar2) - 2;
        dwType = -1;
        dwRet = SHQueryValueExA( hKey, "Test3", NULL, &dwType, buf, &dwSize);
248 249 250 251
        ok( ERROR_MORE_DATA == dwRet ||
            broken(ERROR_ENVVAR_NOT_FOUND == dwRet) || /* IE5.5 */
            broken(ERROR_SUCCESS == dwRet), /* < IE5.5*/
            "Expected ERROR_MORE_DATA, got (%u)\n", dwRet);
Paul Vriens's avatar
Paul Vriens committed
252 253 254

        todo_wine
        {
255
                ok( (0 == strcmp("", buf)) || (0 == strcmp(sTestpath2, buf)),
Paul Vriens's avatar
Paul Vriens committed
256 257 258
                    "Expected empty or unexpanded string (win98), got (%s)\n", buf); 
        }

259 260 261
        ok( dwSize >= nUsedBuffer2 ||
            broken(dwSize == (strlen("") + 1)), /* < IE 5.5 */
            "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2);
262
        ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType);
Paul Vriens's avatar
Paul Vriens committed
263

Juergen Schmied's avatar
Juergen Schmied committed
264
	/*
Paul Vriens's avatar
Paul Vriens committed
265
         * string grows during expanding
266 267 268
         * dwSize is larger than the size of the part before the backslash,
         * but smaller than the expanded string. If the unexpanded string fits
         * into the buffer, it can get cut when expanded.
Juergen Schmied's avatar
Juergen Schmied committed
269 270
	 */
	strcpy(buf, sEmptyBuffer);
271
	dwSize = nExpLen2 - 4;
Juergen Schmied's avatar
Juergen Schmied committed
272
	dwType = -1;
273
        dwRet = SHQueryValueExA( hKey, "Test3", NULL, &dwType, buf, &dwSize);
274 275 276 277
        ok( ERROR_MORE_DATA == dwRet ||
            broken(ERROR_ENVVAR_NOT_FOUND == dwRet) || /* IE5.5 */
            broken(ERROR_SUCCESS == dwRet), /* < IE5.5 */
            "Expected ERROR_MORE_DATA, got (%u)\n", dwRet);
Paul Vriens's avatar
Paul Vriens committed
278 279 280

        todo_wine
        {
281 282 283
            ok( (0 == strcmp("", buf)) || (0 == strcmp(sEnvvar2, buf)) ||
                broken(0 == strcmp(sTestpath2, buf)), /* IE 5.5 */
                "Expected empty or first part of the string \"%s\", got \"%s\"\n", sEnvvar2, buf);
Paul Vriens's avatar
Paul Vriens committed
284 285
        }

286 287 288 289
        ok( dwSize >= nUsedBuffer2 ||
            broken(dwSize == (strlen(sEnvvar2) + 1)) || /* IE4.01 SP1 (W98) and IE5 (W98SE) */
            broken(dwSize == (strlen("") + 1)), /* IE4.01 (NT4) and IE5.x (W2K) */
            "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2);
290
	ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType);
Juergen Schmied's avatar
Juergen Schmied committed
291 292 293 294 295 296 297 298

	/*
	 * The buffer is NULL but the size is set
	 */
	strcpy(buf, sEmptyBuffer);
	dwSize = 6;
	dwType = -1;
	dwRet = SHQueryValueExA( hKey, "Test3", NULL, &dwType, NULL, &dwSize);
299
	ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet);
300 301 302
        ok( dwSize >= nUsedBuffer2 ||
            broken(dwSize == (strlen(sTestpath2) + 1)), /* IE4.01 SP1 (Win98) */
            "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2);
303
	ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType);
Juergen Schmied's avatar
Juergen Schmied committed
304 305 306 307

	RegCloseKey(hKey);
}

308 309 310
static void test_SHCopyKey(void)
{
	HKEY hKeySrc, hKeyDst;
Paul Vriens's avatar
Paul Vriens committed
311
        DWORD dwRet;
312

313 314 315 316 317 318
        if (!pSHCopyKeyA)
        {
            win_skip("SHCopyKeyA is not available\n");
            return;
        }

Patrik Stridvall's avatar
Patrik Stridvall committed
319
	/* Delete existing destination sub keys */
320
	hKeyDst = NULL;
321 322 323 324 325 326
	if (!RegOpenKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\\CopyDestination", &hKeyDst) && hKeyDst)
	{
		SHDeleteKeyA(hKeyDst, NULL);
		RegCloseKey(hKeyDst);
	}

327
	hKeyDst = NULL;
Paul Vriens's avatar
Paul Vriens committed
328 329
        dwRet = RegCreateKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\\CopyDestination", &hKeyDst);
        if (dwRet || !hKeyDst)
330
	{
331
                ok( 0, "Destination couldn't be created, RegCreateKeyA returned (%u)\n", dwRet);
332 333 334
		return;
	}

335
	hKeySrc = NULL;
Paul Vriens's avatar
Paul Vriens committed
336 337
        dwRet = RegOpenKeyA(HKEY_LOCAL_MACHINE, REG_CURRENT_VERSION, &hKeySrc);
        if (dwRet || !hKeySrc)
338
	{
339
                ok( 0, "Source couldn't be opened, RegOpenKeyA returned (%u)\n", dwRet);
340
                RegCloseKey(hKeyDst);
341 342 343
		return;
	}

344 345
        dwRet = (*pSHCopyKeyA)(hKeySrc, NULL, hKeyDst, 0);
        ok ( ERROR_SUCCESS == dwRet, "Copy failed, ret=(%u)\n", dwRet);
346 347 348 349

	RegCloseKey(hKeySrc);
	RegCloseKey(hKeyDst);

350
        /* Check we copied the sub keys, i.e. something that's on every windows system (including Wine) */
351
	hKeyDst = NULL;
352
        dwRet = RegOpenKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\\CopyDestination\\Shell Folders", &hKeyDst);
Paul Vriens's avatar
Paul Vriens committed
353
        if (dwRet || !hKeyDst)
354
	{
355
                ok ( 0, "Copy couldn't be opened, RegOpenKeyA returned (%u)\n", dwRet);
356 357 358 359
		return;
	}

	/* And the we copied the values too */
360
	ok(!SHQueryValueExA(hKeyDst, "Common AppData", NULL, NULL, NULL, NULL), "SHQueryValueExA failed\n");
361 362 363 364

	RegCloseKey(hKeyDst);
}

365
static void test_SHDeleteKey(void)
366
{
Paul Vriens's avatar
Paul Vriens committed
367 368 369 370
    HKEY hKeyTest, hKeyS;
    DWORD dwRet;
    int sysfail = 1;

371 372 373 374 375
    if (!RegOpenKeyA(HKEY_CURRENT_USER, REG_TEST_KEY, &hKeyTest))
    {
        if (!RegCreateKey(hKeyTest, "ODBC", &hKeyS))
        {
            HKEY hKeyO;
Paul Vriens's avatar
Paul Vriens committed
376

377 378 379
            if (!RegCreateKey(hKeyS, "ODBC.INI", &hKeyO))
            {
                RegCloseKey (hKeyO);
Paul Vriens's avatar
Paul Vriens committed
380

381 382 383 384 385 386 387 388 389 390
                if (!RegCreateKey(hKeyS, "ODBCINST.INI", &hKeyO))
                {
                    RegCloseKey (hKeyO);
                    sysfail = 0;
                }
            }
            RegCloseKey (hKeyS);
        }
        RegCloseKey (hKeyTest);
    }
Paul Vriens's avatar
Paul Vriens committed
391

392 393
    if (!sysfail)
    {
Paul Vriens's avatar
Paul Vriens committed
394 395

        dwRet = SHDeleteKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\\ODBC");
396
        ok ( ERROR_SUCCESS == dwRet, "SHDeleteKey failed, ret=(%u)\n", dwRet);
Paul Vriens's avatar
Paul Vriens committed
397 398 399 400

        dwRet = RegOpenKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\\ODBC", &hKeyS);
        ok ( ERROR_FILE_NOT_FOUND == dwRet, "SHDeleteKey did not delete\n");

401 402 403 404
        if (dwRet == ERROR_SUCCESS)
            RegCloseKey (hKeyS);
    }
    else
Paul Vriens's avatar
Paul Vriens committed
405
        ok( 0, "Could not set up SHDeleteKey test\n");
406
}
407

Juergen Schmied's avatar
Juergen Schmied committed
408 409
START_TEST(shreg)
{
410
	HKEY hkey = create_test_entries();
411 412 413

        if (!hkey) return;

414
	hshlwapi = GetModuleHandleA("shlwapi.dll");
415 416
        pSHCopyKeyA=(SHCopyKeyA_func)GetProcAddress(hshlwapi,"SHCopyKeyA");
        pSHRegGetPathA=(SHRegGetPathA_func)GetProcAddress(hshlwapi,"SHRegGetPathA");
Juergen Schmied's avatar
Juergen Schmied committed
417 418
	test_SHGetValue();
	test_SHQUeryValueEx();
419 420
	test_SHGetRegPath();
	test_SHCopyKey();
421
        test_SHDeleteKey();
422
        delete_key( hkey, "Software\\Wine", "Test" );
Juergen Schmied's avatar
Juergen Schmied committed
423
}