dnsapi: Add a stub implementation of DnsFlushResolverCacheEntry_A/UTF8/W.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hans Leidekker 2015-12-23 11:05:30 +01:00 committed by Alexandre Julliard
parent 69d0764196
commit e10c48143a
3 changed files with 56 additions and 3 deletions

View File

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

View File

@ -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.@]

View File

@ -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();
}