Module: wine
Branch: master
Commit: 6dca99a71347731f449d39fb0a46b0331e4206f9
URL: https://gitlab.winehq.org/wine/wine/-/commit/6dca99a71347731f449d39fb0a46b0…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
Date: Mon Jun 17 17:55:14 2024 +1000
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.
---
dlls/odbccp32/odbccp32.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/odbccp32/odbccp32.c b/dlls/odbccp32/odbccp32.c
index 95bfb90781e..d8d57e6bd40 100644
--- a/dlls/odbccp32/odbccp32.c
+++ b/dlls/odbccp32/odbccp32.c
@@ -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);
}