Commit 49b644d7 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

odbccp32/tests: RegGetValueA is not available on Windows XP.

parent 7f1044f2
......@@ -420,7 +420,7 @@ void test_SQLInstallDriverEx(void)
BOOL ret, sql_ret;
DWORD cnt, error_code = 0;
HKEY hkey;
DWORD reg_ret;
LONG res;
GetSystemDirectoryA(syspath, MAX_PATH);
......@@ -441,18 +441,21 @@ void test_SQLInstallDriverEx(void)
if (ret)
{
reg_ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\ODBC\\ODBCINST.INI\\WINE ODBC Driver", 0, KEY_READ, &hkey);
ok(reg_ret == ERROR_SUCCESS, "RegOpenKeyExW failed\n");
if (reg_ret == ERROR_SUCCESS)
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\ODBC\\ODBCINST.INI\\WINE ODBC Driver", 0, KEY_READ, &hkey);
ok(res == ERROR_SUCCESS, "RegOpenKeyExW failed\n");
if (res == ERROR_SUCCESS)
{
DWORD type, size = MAX_PATH;
DWORD type = 0xdeadbeef, size = MAX_PATH;
char driverpath[MAX_PATH];
strcpy(driverpath, syspath);
strcat(driverpath, "\\sample.dll");
reg_ret = RegGetValueA(hkey, NULL, "Driver", RRF_RT_REG_SZ, &type, &path, &size);
ok(reg_ret == ERROR_SUCCESS, "RegGetValueA failed\n");
memset(path, 0, sizeof(path));
res = RegQueryValueExA(hkey, "Driver", NULL, &type, (BYTE *)path, &size);
ok(res == ERROR_SUCCESS, "got %d\n", res);
ok(type == REG_SZ, "got %u\n", type);
ok(size == strlen(driverpath) + 1, "got %u\n", size);
ok(!strcmp(path, driverpath), "invalid path %s\n", path);
RegCloseKey(hkey);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment