From e10c48143aadc9fbec7677847d3d9eab66bf441f Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Wed, 23 Dec 2015 11:05:30 +0100 Subject: [PATCH] dnsapi: Add a stub implementation of DnsFlushResolverCacheEntry_A/UTF8/W. Signed-off-by: Hans Leidekker Signed-off-by: Alexandre Julliard --- dlls/dnsapi/dnsapi.spec | 6 +++--- dlls/dnsapi/main.c | 32 ++++++++++++++++++++++++++++++++ dlls/dnsapi/tests/name.c | 21 +++++++++++++++++++++ 3 files changed, 56 insertions(+), 3 deletions(-) diff --git a/dlls/dnsapi/dnsapi.spec b/dlls/dnsapi/dnsapi.spec index 4f6f1c8976..de0ed1d2b9 100644 --- a/dlls/dnsapi/dnsapi.spec +++ b/dlls/dnsapi/dnsapi.spec @@ -32,9 +32,9 @@ @ stdcall DnsExtractRecordsFromMessage_W(ptr long ptr) @ stub DnsFindAuthoritativeZone @ stdcall DnsFlushResolverCache() -@ stub DnsFlushResolverCacheEntry_A -@ stub DnsFlushResolverCacheEntry_UTF8 -@ stub DnsFlushResolverCacheEntry_W +@ stdcall DnsFlushResolverCacheEntry_A(str) +@ stdcall DnsFlushResolverCacheEntry_UTF8(str) +@ stdcall DnsFlushResolverCacheEntry_W(wstr) @ stdcall DnsFree(ptr long) @ stub DnsFreeAdapterInformation @ stub DnsFreeNetworkInformation diff --git a/dlls/dnsapi/main.c b/dlls/dnsapi/main.c index d4f716a010..93528a2302 100644 --- a/dlls/dnsapi/main.c +++ b/dlls/dnsapi/main.c @@ -93,6 +93,38 @@ VOID WINAPI DnsFlushResolverCache(void) FIXME(": stub\n"); } +/****************************************************************************** + * DnsFlushResolverCacheEntry_A [DNSAPI.@] + * + */ +BOOL WINAPI DnsFlushResolverCacheEntry_A( PCSTR entry ) +{ + FIXME( "%s: stub\n", debugstr_a(entry) ); + if (!entry) return FALSE; + return TRUE; +} + +/****************************************************************************** + * DnsFlushResolverCacheEntry_UTF8 [DNSAPI.@] + * + */ +BOOL WINAPI DnsFlushResolverCacheEntry_UTF8( PCSTR entry ) +{ + FIXME( "%s: stub\n", debugstr_a(entry) ); + if (!entry) return FALSE; + return TRUE; +} + +/****************************************************************************** + * DnsFlushResolverCacheEntry_W [DNSAPI.@] + * + */ +BOOL WINAPI DnsFlushResolverCacheEntry_W( PCWSTR entry ) +{ + FIXME( "%s: stub\n", debugstr_w(entry) ); + if (!entry) return FALSE; + return TRUE; +} /****************************************************************************** * DnsReleaseContextHandle [DNSAPI.@] diff --git a/dlls/dnsapi/tests/name.c b/dlls/dnsapi/tests/name.c index fba6955a93..3e543554e7 100644 --- a/dlls/dnsapi/tests/name.c +++ b/dlls/dnsapi/tests/name.c @@ -27,6 +27,8 @@ #include "wine/test.h" +BOOL WINAPI DnsFlushResolverCacheEntry_A(PCSTR); + static const struct { LPCSTR name; @@ -202,8 +204,27 @@ static void test_DnsNameCompare_A( void ) ok( DnsNameCompare_A( a_dot_b, b_dot_a_dot ) == FALSE, "succeeded unexpectedly\n" ); } +static void test_DnsFlushResolverCacheEntry_A(void) +{ + BOOL ret; + DWORD err; + + SetLastError( 0xdeadbeef ); + ret = DnsFlushResolverCacheEntry_A( NULL ); + err = GetLastError(); + ok( !ret, "got %d\n", ret ); + ok( err == 0xdeadbeef, "got %u\n", err ); + + ret = DnsFlushResolverCacheEntry_A( "localhost" ); + ok( ret, "got %d\n", ret ); + + ret = DnsFlushResolverCacheEntry_A( "nxdomain.test.winehq.org" ); + ok( ret, "got %d\n", ret ); +} + START_TEST(name) { test_DnsValidateName_A(); test_DnsNameCompare_A(); + test_DnsFlushResolverCacheEntry_A(); }