- New winsock (part 3 of x)
authorCameron Gutman <aicommander@gmail.com>
Sat, 6 Feb 2010 02:56:20 +0000 (02:56 +0000)
committerCameron Gutman <aicommander@gmail.com>
Sat, 6 Feb 2010 02:56:20 +0000 (02:56 +0000)
 - Implement DnsApiAlloc and DnsApiFree

svn path=/branches/aicom-network-branch/; revision=45450

dll/win32/dnsapi/dnsapi.rbuild
dll/win32/dnsapi/dnsapi.spec
dll/win32/dnsapi/dnsapi/free.c [deleted file]
dll/win32/dnsapi/dnsapi/memory.c [new file with mode: 0644]

index 08acd54..524492d 100644 (file)
@@ -13,7 +13,7 @@
        <directory name="dnsapi">
                <file>adns.c</file>
                <file>context.c</file>
        <directory name="dnsapi">
                <file>adns.c</file>
                <file>context.c</file>
-               <file>free.c</file>
+               <file>memory.c</file>
                <file>names.c</file>
                <file>query.c</file>
                <file>stubs.c</file>
                <file>names.c</file>
                <file>query.c</file>
                <file>stubs.c</file>
index a89730f..91ca721 100644 (file)
@@ -6,6 +6,8 @@
 @ stub DnsAddRecordSet_W
 @ stub DnsAllocateRecord
 @ stub DnsApiHeapReset
 @ stub DnsAddRecordSet_W
 @ stub DnsAllocateRecord
 @ stub DnsApiHeapReset
+@ stdcall DnsApiAlloc(long)
+@ stdcall DnsApiFree(ptr)
 @ stub DnsAsyncRegisterHostAddrs_A
 @ stub DnsAsyncRegisterHostAddrs_UTF8
 @ stub DnsAsyncRegisterHostAddrs_W
 @ stub DnsAsyncRegisterHostAddrs_A
 @ stub DnsAsyncRegisterHostAddrs_UTF8
 @ stub DnsAsyncRegisterHostAddrs_W
diff --git a/dll/win32/dnsapi/dnsapi/free.c b/dll/win32/dnsapi/dnsapi/free.c
deleted file mode 100644 (file)
index 27ac7dd..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * COPYRIGHT:   See COPYING in the top level directory
- * PROJECT:     ReactOS system libraries
- * FILE:        lib/dnsapi/dnsapi/free.c
- * PURPOSE:     DNSAPI functions built on the ADNS library.
- * PROGRAMER:   Art Yerkes
- * UPDATE HISTORY:
- *              12/15/03 -- Created
- */
-
-#include "precomp.h"
-
-#define NDEBUG
-#include <debug.h>
-
-VOID WINAPI
-DnsFree(PVOID Data,
-        DNS_FREE_TYPE FreeType)
-{
-    switch(FreeType)
-    {
-        case DnsFreeFlat:
-            RtlFreeHeap( RtlGetProcessHeap(), 0, Data );
-            break;
-
-        case DnsFreeRecordList:
-            DnsIntFreeRecordList( (PDNS_RECORD)Data );
-            break;
-
-        case DnsFreeParsedMessageFields:
-            /* assert( FALSE ); XXX arty not yet implemented. */
-            break;
-    }
-}
-
-VOID WINAPI
-DnsRecordListFree(PDNS_RECORD Data,
-                  DNS_FREE_TYPE FreeType)
-{
-    DnsFree(Data, FreeType);
-}
diff --git a/dll/win32/dnsapi/dnsapi/memory.c b/dll/win32/dnsapi/dnsapi/memory.c
new file mode 100644 (file)
index 0000000..6be36d3
--- /dev/null
@@ -0,0 +1,128 @@
+/*
+ * COPYRIGHT:   See COPYING in the top level directory
+ * PROJECT:     ReactOS system libraries
+ * FILE:        lib/dnsapi/dnsapi/memory.c
+ * PURPOSE:     DNSAPI functions built on the ADNS library.
+ * PROGRAMER:   Art Yerkes
+ * UPDATE HISTORY:
+ *              12/15/03 -- Created
+ */
+
+#include "precomp.h"
+
+#define NDEBUG
+#include <debug.h>
+
+VOID
+WINAPI
+DnsApiFree(IN PVOID Data)
+{
+    RtlFreeHeap(RtlGetProcessHeap(), 0, Data);
+}
+
+PVOID
+WINAPI
+DnsApiAlloc(IN DWORD Size)
+{
+    return RtlAllocateHeap(RtlGetProcessHeap(), 0, Size);
+}
+
+PVOID
+WINAPI
+DnsQueryConfigAllocEx(IN DNS_CONFIG_TYPE Config,
+                      OUT PVOID pBuffer,
+                      IN OUT PDWORD pBufferLength)
+{
+    return NULL;
+}
+
+VOID WINAPI
+DnsFree(PVOID Data,
+        DNS_FREE_TYPE FreeType)
+{
+    switch(FreeType)
+    {
+        case DnsFreeFlat:
+            RtlFreeHeap( RtlGetProcessHeap(), 0, Data );
+            break;
+
+        case DnsFreeRecordList:
+            DnsIntFreeRecordList( (PDNS_RECORD)Data );
+            break;
+
+        case DnsFreeParsedMessageFields:
+            /* assert( FALSE ); XXX arty not yet implemented. */
+            break;
+    }
+}
+
+VOID WINAPI
+DnsRecordListFree(PDNS_RECORD Data,
+                  DNS_FREE_TYPE FreeType)
+{
+    DnsFree(Data, FreeType);
+}
+/*
+ * COPYRIGHT:   See COPYING in the top level directory
+ * PROJECT:     ReactOS system libraries
+ * FILE:        lib/dnsapi/dnsapi/free.c
+ * PURPOSE:     DNSAPI functions built on the ADNS library.
+ * PROGRAMER:   Art Yerkes
+ * UPDATE HISTORY:
+ *              12/15/03 -- Created
+ */
+
+#include "precomp.h"
+
+#define NDEBUG
+#include <debug.h>
+
+VOID
+WINAPI
+DnsApiFree(IN PVOID Data)
+{
+    RtlFreeHeap(RtlGetProcessHeap(), 0, Data);
+}
+
+PVOID
+WINAPI
+DnsApiAlloc(IN DWORD Size)
+{
+    return RtlAllocateHeap(RtlGetProcessHeap(), 0, Size);
+}
+
+PVOID
+WINAPI
+DnsQueryConfigAllocEx(IN DNS_CONFIG_TYPE Config,
+                      OUT PVOID pBuffer,
+                      IN OUT PDWORD pBufferLength)
+{
+    return NULL;
+}
+
+VOID WINAPI
+DnsFree(PVOID Data,
+        DNS_FREE_TYPE FreeType)
+{
+    switch(FreeType)
+    {
+        case DnsFreeFlat:
+            RtlFreeHeap( RtlGetProcessHeap(), 0, Data );
+            break;
+
+        case DnsFreeRecordList:
+            DnsIntFreeRecordList( (PDNS_RECORD)Data );
+            break;
+
+        case DnsFreeParsedMessageFields:
+            /* assert( FALSE ); XXX arty not yet implemented. */
+            break;
+    }
+}
+
+VOID WINAPI
+DnsRecordListFree(PDNS_RECORD Data,
+                  DNS_FREE_TYPE FreeType)
+{
+    DnsFree(Data, FreeType);
+}