Commit 7f808e56 authored by Alexandre Julliard's avatar Alexandre Julliard

odbc32: Use the Unix call helpers.

parent f7b55ffa
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment