From a62d3ab841c21561e0ab1f860b2c592934520cca Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 28 Nov 2022 11:40:07 +0100 Subject: [PATCH] dnsapi: Use the Unix call helpers. --- dlls/dnsapi/dnsapi.h | 4 +--- dlls/dnsapi/main.c | 5 +---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/dlls/dnsapi/dnsapi.h b/dlls/dnsapi/dnsapi.h index 250b0a1b4c3..89324dd9c29 100644 --- a/dlls/dnsapi/dnsapi.h +++ b/dlls/dnsapi/dnsapi.h @@ -129,6 +129,4 @@ enum unix_funcs unix_query, }; -extern unixlib_handle_t resolv_handle; - -#define RESOLV_CALL( func, params ) __wine_unix_call( resolv_handle, unix_ ## func, params ) +#define RESOLV_CALL( func, params ) WINE_UNIX_CALL( unix_ ## func, params ) diff --git a/dlls/dnsapi/main.c b/dlls/dnsapi/main.c index 23738bf36fe..6324d46e173 100644 --- a/dlls/dnsapi/main.c +++ b/dlls/dnsapi/main.c @@ -32,8 +32,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dnsapi); -unixlib_handle_t resolv_handle = 0; - BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) { TRACE( "(%p, %lu, %p)\n", hinst, reason, reserved ); @@ -42,8 +40,7 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) { case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls( hinst ); - if (NtQueryVirtualMemory( GetCurrentProcess(), hinst, MemoryWineUnixFuncs, - &resolv_handle, sizeof(resolv_handle), NULL )) + if (__wine_init_unix_call()) ERR( "No libresolv support, expect problems\n" ); break; case DLL_PROCESS_DETACH: