diff --git a/dlls/crypt32/crypt32_private.h b/dlls/crypt32/crypt32_private.h index f4131bf2694..41c5ec523be 100644 --- a/dlls/crypt32/crypt32_private.h +++ b/dlls/crypt32/crypt32_private.h @@ -508,8 +508,6 @@ enum unix_funcs unix_enum_root_certs, }; -extern unixlib_handle_t crypt32_handle; - -#define CRYPT32_CALL( func, params ) __wine_unix_call( crypt32_handle, unix_ ## func, params ) +#define CRYPT32_CALL( func, params ) WINE_UNIX_CALL( unix_ ## func, params ) #endif diff --git a/dlls/crypt32/main.c b/dlls/crypt32/main.c index 4a94bed9b6b..b320c895e15 100644 --- a/dlls/crypt32/main.c +++ b/dlls/crypt32/main.c @@ -35,7 +35,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(crypt); static HCRYPTPROV hDefProv; HINSTANCE hInstance; -unixlib_handle_t crypt32_handle = 0; static CRITICAL_SECTION prov_param_cs; static CRITICAL_SECTION_DEBUG prov_param_cs_debug = @@ -56,8 +55,7 @@ BOOL WINAPI DllMain(HINSTANCE hInst, DWORD reason, PVOID pvReserved) DisableThreadLibraryCalls(hInst); init_empty_store(); crypt_oid_init(); - if (NtQueryVirtualMemory( GetCurrentProcess(), hInst, MemoryWineUnixFuncs, - &crypt32_handle, sizeof(crypt32_handle), NULL )) + if (__wine_init_unix_call()) return FALSE; CRYPT32_CALL( process_attach, NULL ); break;