Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=50116
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/odbccp32/odbccp32.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
diff --git a/dlls/odbccp32/odbccp32.c b/dlls/odbccp32/odbccp32.c index c842872fa6e..57e2b3ec55f 100644 --- a/dlls/odbccp32/odbccp32.c +++ b/dlls/odbccp32/odbccp32.c @@ -338,6 +338,23 @@ fail: return FALSE; }
+static WORD fixup_config_request(WORD request) +{ + switch(request) + { + case ODBC_ADD_SYS_DSN: + return ODBC_ADD_DSN; + case ODBC_CONFIG_SYS_DSN: + return ODBC_CONFIG_DSN; + case ODBC_REMOVE_SYS_DSN: + return ODBC_REMOVE_DSN; + case ODBC_REMOVE_DEFAULT_DSN: + FIXME("ODBC_REMOVE_DEFAULT_DSN currently not handled\n"); + } + + return request; +} + BOOL WINAPI SQLConfigDataSourceW(HWND hwnd, WORD request, LPCWSTR driver, LPCWSTR attributes) { HMODULE mod; @@ -357,6 +374,8 @@ BOOL WINAPI SQLConfigDataSourceW(HWND hwnd, WORD request, LPCWSTR driver, LPCWST if (!mod) return FALSE;
+ request = fixup_config_request(request); + pConfigDSNW = (void*)GetProcAddress(mod, "ConfigDSNW"); if(pConfigDSNW) ret = pConfigDSNW(hwnd, request, driver, attributes); @@ -402,6 +421,8 @@ BOOL WINAPI SQLConfigDataSource(HWND hwnd, WORD request, LPCSTR driver, LPCSTR a return FALSE; }
+ request = fixup_config_request(request); + pConfigDSN = (void*)GetProcAddress(mod, "ConfigDSN"); if (pConfigDSN) {
On Thu, 2020-11-12 at 20:48 +1100, Alistair Leslie-Hughes wrote:
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=50116
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com
dlls/odbccp32/odbccp32.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
diff --git a/dlls/odbccp32/odbccp32.c b/dlls/odbccp32/odbccp32.c index c842872fa6e..57e2b3ec55f 100644 --- a/dlls/odbccp32/odbccp32.c +++ b/dlls/odbccp32/odbccp32.c @@ -338,6 +338,23 @@ fail: return FALSE; }
+static WORD fixup_config_request(WORD request) +{
- switch(request)
- {
case ODBC_ADD_SYS_DSN:
return ODBC_ADD_DSN;
case ODBC_CONFIG_SYS_DSN:
return ODBC_CONFIG_DSN;
case ODBC_REMOVE_SYS_DSN:
return ODBC_REMOVE_DSN;
case ODBC_REMOVE_DEFAULT_DSN:
FIXME("ODBC_REMOVE_DEFAULT_DSN currently not handled\n");
- }
- return request;
+}
What should be done here is more like mapping the request value and setting the config mode accordingly. I'll send a patch.