Module: wine Branch: master Commit: 7f808e564d712c111764ec0a43d8e74395c6e3c7 URL: https://gitlab.winehq.org/wine/wine/-/commit/7f808e564d712c111764ec0a43d8e74...
Author: Alexandre Julliard julliard@winehq.org Date: Fri Nov 25 10:13:24 2022 +0100
odbc32: Use the Unix call helpers.
---
dlls/odbc32/proxyodbc.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c index 714819993ee..679f3d7380e 100644 --- a/dlls/odbc32/proxyodbc.c +++ b/dlls/odbc32/proxyodbc.c @@ -45,9 +45,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(odbc); WINE_DECLARE_DEBUG_CHANNEL(winediag);
-static unixlib_handle_t odbc_handle; - -#define ODBC_CALL( func, params ) __wine_unix_call( odbc_handle, unix_ ## func, params ) +#define ODBC_CALL( func, params ) WINE_UNIX_CALL( unix_ ## func, params )
/*********************************************************************** * ODBC_ReplicateODBCInstToRegistry @@ -2641,18 +2639,16 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, LPVOID reserved) switch (reason) { case DLL_PROCESS_ATTACH: - DisableThreadLibraryCalls(hinstDLL); - if (!NtQueryVirtualMemory( GetCurrentProcess(), hinstDLL, MemoryWineUnixFuncs, - &odbc_handle, sizeof(odbc_handle), NULL ) && - !__wine_unix_call( odbc_handle, process_attach, NULL)) + DisableThreadLibraryCalls(hinstDLL); + if (!__wine_init_unix_call() && !WINE_UNIX_CALL( process_attach, NULL )) { ODBC_ReplicateToRegistry(); } - break; + break;
case DLL_PROCESS_DETACH: - if (reserved) break; - __wine_unix_call( odbc_handle, process_detach, NULL ); + if (reserved) break; + WINE_UNIX_CALL( process_detach, NULL ); }
return TRUE;