1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 03:45:57 +00:00

odbc32: Use the Unix call helpers.

This commit is contained in:
Alexandre Julliard 2022-11-25 10:13:24 +01:00
parent f7b55ffafa
commit 7f808e564d

View File

@ -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;