[DNSAPI][REACTOS] Add a header for undocumented dnsapi functions and use it in dnsapi.dll
authorEric Kohl <eric.kohl@reactos.org>
Sun, 20 Oct 2019 21:13:46 +0000 (23:13 +0200)
committerEric Kohl <eric.kohl@reactos.org>
Sun, 20 Oct 2019 21:13:46 +0000 (23:13 +0200)
dll/win32/dnsapi/dnsapi.spec
dll/win32/dnsapi/dnsapi/precomp.h
dll/win32/dnsapi/dnsapi/stubs.c
sdk/include/reactos/windns_undoc.h [new file with mode: 0644]

index 7262aaa..64ce27a 100644 (file)
@@ -41,7 +41,7 @@
 @ stdcall DnsFreeNetworkInformation()
 @ stdcall DnsFreeSearchInformation()
 @ stdcall DnsGetBufferLengthForStringCopy()
 @ stdcall DnsFreeNetworkInformation()
 @ stdcall DnsFreeSearchInformation()
 @ stdcall DnsGetBufferLengthForStringCopy()
-@ stdcall DnsGetCacheDataTable()
+@ stdcall DnsGetCacheDataTable(ptr)
 @ stdcall DnsGetDnsServerList()
 @ stdcall DnsGetDomainName()
 @ stdcall DnsGetHostName_A()
 @ stdcall DnsGetDnsServerList()
 @ stdcall DnsGetDomainName()
 @ stdcall DnsGetHostName_A()
index 44aa0c3..687e67f 100644 (file)
@@ -21,6 +21,7 @@
 #include <winbase.h>
 #include <winnls.h>
 #include <windns.h>
 #include <winbase.h>
 #include <winnls.h>
 #include <windns.h>
+#include <reactos/windns_undoc.h>
 #define NTOS_MODE_USER
 #include <ndk/rtlfuncs.h>
 
 #define NTOS_MODE_USER
 #include <ndk/rtlfuncs.h>
 
index 137f164..76bb1ef 100644 (file)
@@ -216,11 +216,11 @@ DnsFindAuthoritativeZone()
     return ERROR_OUTOFMEMORY;
 }
 
     return ERROR_OUTOFMEMORY;
 }
 
-DNS_STATUS WINAPI
-DnsFlushResolverCache()
+BOOL WINAPI
+DnsFlushResolverCache(VOID)
 {
     UNIMPLEMENTED;
 {
     UNIMPLEMENTED;
-    return ERROR_OUTOFMEMORY;
+    return TRUE;
 }
 
 BOOL WINAPI
 }
 
 BOOL WINAPI
@@ -273,11 +273,13 @@ DnsGetBufferLengthForStringCopy()
     return ERROR_OUTOFMEMORY;
 }
 
     return ERROR_OUTOFMEMORY;
 }
 
-DNS_STATUS WINAPI
-DnsGetCacheDataTable()
+BOOL
+WINAPI
+DnsGetCacheDataTable(
+    _Out_ PDNSCACHEENTRY *DnsCache)
 {
     UNIMPLEMENTED;
 {
     UNIMPLEMENTED;
-    return ERROR_OUTOFMEMORY;
+    return TRUE;
 }
 
 DNS_STATUS WINAPI
 }
 
 DNS_STATUS WINAPI
diff --git a/sdk/include/reactos/windns_undoc.h b/sdk/include/reactos/windns_undoc.h
new file mode 100644 (file)
index 0000000..af04fab
--- /dev/null
@@ -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_ */