Fix some Windows 95 issues.

This commit is contained in:
Jakob Eriksson 2005-03-24 19:02:38 +00:00 committed by Alexandre Julliard
parent 039603c77d
commit 6be7d751a0
1 changed files with 12 additions and 6 deletions

View File

@ -89,9 +89,13 @@ static void test_enum_value(void)
else
ok( !res, "RegSetValueExA returned %ld\n", res );
res = RegSetValueExA( hkey_main, "Test", 0, REG_EXPAND_SZ, NULL, 0 );
ok( !res, "RegSetValueExA returned %ld\n", res );
ok( ERROR_SUCCESS == res || ERROR_INVALID_PARAMETER == res, "RegSetValueExA returned %ld\n", res );
if (ERROR_INVALID_PARAMETER == res)
trace ("RegSetValueExA() returned ERROR_INVALID_PARAMETER\n");
res = RegSetValueExA( hkey_main, "Test", 0, REG_BINARY, NULL, 0 );
ok( !res, "RegSetValueExA returned %ld\n", res );
ok( ERROR_SUCCESS == res || ERROR_INVALID_PARAMETER == res, "RegSetValueExA returned %ld\n", res );
if (ERROR_INVALID_PARAMETER == res)
trace ("RegSetValueExA() returned ERROR_INVALID_PARAMETER\n");
res = RegSetValueExA( hkey_main, "Test", 0, REG_SZ, (BYTE *)"foobar", 7 );
ok( res == 0, "RegSetValueExA failed error %ld\n", res );
@ -314,7 +318,8 @@ static void test_reg_open_key()
*/
hkResult = hkPreserve;
ret = RegOpenKeyA(NULL, "Software\\Wine\\Test", &hkResult);
ok(ret == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %ld\n", ret);
ok(ret == ERROR_INVALID_HANDLE || ret == ERROR_BADKEY, /* Windows 95 returns BADKEY */
"expected ERROR_INVALID_HANDLE or ERROR_BADKEY, got %ld\n", ret);
ok(hkResult == hkPreserve, "expected hkResult == hkPreserve\n");
RegCloseKey(hkResult);
@ -336,12 +341,13 @@ static void test_reg_close_key()
ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
/* try to close the key twice */
ret = RegCloseKey(hkHandle);
ok(ret == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %ld\n", ret);
ret = RegCloseKey(hkHandle); /* Windows 95 doesn't mind. */
trace ("closing key twice, got %ld\n", ret);
/* try to close a NULL handle */
ret = RegCloseKey(NULL);
ok(ret == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %ld\n", ret);
ok(ret == ERROR_INVALID_HANDLE || ret == ERROR_BADKEY, /* Windows 95 returns BADKEY */
"expected ERROR_INVALID_HANDLE or ERROR_BADKEY, got %ld\n", ret);
}
static void test_reg_save_key()