https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4455dcb26e193f477d714b28e93756ef9bd783a6

commit 4455dcb26e193f477d714b28e93756ef9bd783a6
Author:     Eric Kohl <[email protected]>
AuthorDate: Sun Oct 20 23:13:46 2019 +0200
Commit:     Eric Kohl <[email protected]>
CommitDate: Sun Oct 20 23:13:46 2019 +0200

    [DNSAPI][REACTOS] Add a header for undocumented dnsapi functions and use it 
in dnsapi.dll
---
 dll/win32/dnsapi/dnsapi.spec       |  2 +-
 dll/win32/dnsapi/dnsapi/precomp.h  |  1 +
 dll/win32/dnsapi/dnsapi/stubs.c    | 14 ++++++++------
 sdk/include/reactos/windns_undoc.h | 30 ++++++++++++++++++++++++++++++
 4 files changed, 40 insertions(+), 7 deletions(-)

diff --git a/dll/win32/dnsapi/dnsapi.spec b/dll/win32/dnsapi/dnsapi.spec
index 7262aaa5cd4..64ce27a4b3e 100644
--- a/dll/win32/dnsapi/dnsapi.spec
+++ b/dll/win32/dnsapi/dnsapi.spec
@@ -41,7 +41,7 @@
 @ stdcall DnsFreeNetworkInformation()
 @ stdcall DnsFreeSearchInformation()
 @ stdcall DnsGetBufferLengthForStringCopy()
-@ stdcall DnsGetCacheDataTable()
+@ stdcall DnsGetCacheDataTable(ptr)
 @ stdcall DnsGetDnsServerList()
 @ stdcall DnsGetDomainName()
 @ stdcall DnsGetHostName_A()
diff --git a/dll/win32/dnsapi/dnsapi/precomp.h 
b/dll/win32/dnsapi/dnsapi/precomp.h
index 44aa0c395c1..687e67f5947 100644
--- a/dll/win32/dnsapi/dnsapi/precomp.h
+++ b/dll/win32/dnsapi/dnsapi/precomp.h
@@ -21,6 +21,7 @@
 #include <winbase.h>
 #include <winnls.h>
 #include <windns.h>
+#include <reactos/windns_undoc.h>
 #define NTOS_MODE_USER
 #include <ndk/rtlfuncs.h>
 
diff --git a/dll/win32/dnsapi/dnsapi/stubs.c b/dll/win32/dnsapi/dnsapi/stubs.c
index 137f1641a5b..76bb1ef63c5 100644
--- a/dll/win32/dnsapi/dnsapi/stubs.c
+++ b/dll/win32/dnsapi/dnsapi/stubs.c
@@ -216,11 +216,11 @@ DnsFindAuthoritativeZone()
     return ERROR_OUTOFMEMORY;
 }
 
-DNS_STATUS WINAPI
-DnsFlushResolverCache()
+BOOL WINAPI
+DnsFlushResolverCache(VOID)
 {
     UNIMPLEMENTED;
-    return ERROR_OUTOFMEMORY;
+    return TRUE;
 }
 
 BOOL WINAPI
@@ -273,11 +273,13 @@ DnsGetBufferLengthForStringCopy()
     return ERROR_OUTOFMEMORY;
 }
 
-DNS_STATUS WINAPI
-DnsGetCacheDataTable()
+BOOL
+WINAPI
+DnsGetCacheDataTable(
+    _Out_ PDNSCACHEENTRY *DnsCache)
 {
     UNIMPLEMENTED;
-    return ERROR_OUTOFMEMORY;
+    return TRUE;
 }
 
 DNS_STATUS WINAPI
diff --git a/sdk/include/reactos/windns_undoc.h 
b/sdk/include/reactos/windns_undoc.h
new file mode 100644
index 00000000000..af04fabb2c3
--- /dev/null
+++ b/sdk/include/reactos/windns_undoc.h
@@ -0,0 +1,30 @@
+#ifndef _WINDNS_UNDOC_H_
+#define _WINDNS_UNDOC_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct _DNS_CACHE_ENTRY
+{
+    struct _DNS_CACHE_ENTRY *pNext; /* Pointer to next entry */
+    PWSTR pszName;                  /* DNS Record Name */
+    unsigned short wType;           /* DNS Record Type */
+    unsigned short wUnknown;        /* Unknown */
+    unsigned short wFlags;          /* DNS Record Flags */
+} DNSCACHEENTRY, *PDNSCACHEENTRY;
+
+BOOL
+WINAPI
+DnsFlushResolverCache(VOID);
+
+BOOL
+WINAPI
+DnsGetCacheDataTable(
+    _Out_ PDNSCACHEENTRY *DnsCache);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _WINDNS_UNDOC_H_ */

Reply via email to