1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-01 07:14:31 +00:00

odbccp32: Look at the Setup key to find the driver of ODBC config functions.

We need to look at the Setup key for the driver, as it can be different
compare to the actually driver.

For example, mysql uses the same Setup file to configure both the Ascii/Unicode
vession but has a different file for the actual ODBC functions.
This commit is contained in:
Alistair Leslie-Hughes 2024-06-17 17:55:14 +10:00 committed by Alexandre Julliard
parent bd36ac98c0
commit 6dca99a713

View File

@ -223,7 +223,6 @@ static BOOL SQLInstall_narrow(int mode, LPSTR buffer, LPCWSTR str, WORD str_leng
static HMODULE load_config_driver(const WCHAR *driver)
{
static WCHAR reg_driver[] = {'d','r','i','v','e','r',0};
long ret;
HMODULE hmod;
WCHAR *filename = NULL;
@ -236,7 +235,7 @@ static HMODULE load_config_driver(const WCHAR *driver)
if ((ret = RegOpenKeyW(hkey, driver, &hkeydriver)) == ERROR_SUCCESS)
{
ret = RegGetValueW(hkeydriver, NULL, reg_driver, RRF_RT_REG_SZ, &type, NULL, &size);
ret = RegGetValueW(hkeydriver, NULL, L"Setup", RRF_RT_REG_SZ, &type, NULL, &size);
if(ret != ERROR_SUCCESS || type != REG_SZ)
{
RegCloseKey(hkeydriver);
@ -255,7 +254,7 @@ static HMODULE load_config_driver(const WCHAR *driver)
return NULL;
}
ret = RegGetValueW(hkeydriver, NULL, reg_driver, RRF_RT_REG_SZ, &type, filename, &size);
ret = RegGetValueW(hkeydriver, NULL, L"Setup", RRF_RT_REG_SZ, &type, filename, &size);
RegCloseKey(hkeydriver);
}