Fixed dnsapi for use with w32api headers by adjusting a few names (mostly
authorArt Yerkes <art.yerkes@gmail.com>
Fri, 26 Nov 2004 00:12:57 +0000 (00:12 +0000)
committerArt Yerkes <art.yerkes@gmail.com>
Fri, 26 Nov 2004 00:12:57 +0000 (00:12 +0000)
 DNS_RECORDA,W -> DNS_RECORD)
Fixed bug in DnsQuery, we weren't checking NULL on result->rrs.addr.

svn path=/trunk/; revision=11813

reactos/lib/dnsapi/Makefile
reactos/lib/dnsapi/dnsapi/adns.c
reactos/lib/dnsapi/dnsapi/context.c
reactos/lib/dnsapi/dnsapi/free.c
reactos/lib/dnsapi/dnsapi/names.c
reactos/lib/dnsapi/dnsapi/query.c
reactos/lib/dnsapi/dnsapi/stubs.c
reactos/lib/dnsapi/include/internal/windns.h

index 3841062..66ea761 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.5 2004/05/29 21:24:43 hbirr Exp $
+# $Id: Makefile,v 1.6 2004/11/26 00:12:56 arty Exp $
 
 PATH_TO_TOP = ../..
 
@@ -20,7 +20,7 @@ TARGET_SDKLIBS = adns.a kernel32.a iphlpapi.a ws2_32.a msvcrt.a ntdll.a \
 TARGET_GCCLIBS = gcc
 
 TARGET_CFLAGS = -Werror -Wall -I$(PATH_TO_TOP)/lib/adns/src -Iinclude \
-       -I$(PATH_TO_TOP)/lib/adns/adns_win32  -g
+       -I$(PATH_TO_TOP)/lib/adns/adns_win32  -g -D__USE_W32API
 
 # require os code to explicitly request A/W version of structs/functions
 TARGET_CFLAGS += -D_DISABLE_TIDENTS -DADNS_JGAA_WIN32
index c148fc1..f26eccb 100644 (file)
@@ -10,7 +10,7 @@
 
 #include <windows.h>
 #include <WinError.h>
-#include <WinDNS.h>
+#include <windns.h>
 #include <internal/windns.h>
 
 DNS_STATUS DnsIntTranslateAdnsToDNS_STATUS( int Status ) {
@@ -20,7 +20,7 @@ DNS_STATUS DnsIntTranslateAdnsToDNS_STATUS( int Status ) {
   case adns_s_nomemory:
   case adns_s_systemfail:
   default: /* There really aren't any general errors in the dns part. */
-    return DNS_ERROR_NO_MEMORY;
+    return ERROR_OUTOFMEMORY;
   }
 }
 
index 855bab0..3dfa8a0 100644 (file)
@@ -10,7 +10,9 @@
 
 #include <windows.h>
 #include <WinError.h>
-#include <WinDNS.h>
+#include <windns.h>
+#define NTOS_MODE_USER
+#include <ntos.h>
 #include <internal/windns.h>
 
 /* DnsAcquireContextHandle *************
index fabb343..1228376 100644 (file)
 
 #include <windows.h>
 #include <WinError.h>
-#include <WinDNS.h>
+#include <windns.h>
 #include <internal/windns.h>
+#define NTOS_MODE_USER
+#include <ntos.h>
 
 VOID WINAPI DnsFree
 ( PVOID Data, DNS_FREE_TYPE FreeType ) {
@@ -21,7 +23,7 @@ VOID WINAPI DnsFree
     break;
 
   case DnsFreeRecordList:
-    DnsIntFreeRecordList( (PDNS_RECORDA)Data );
+    DnsIntFreeRecordList( (PDNS_RECORD)Data );
     break;
 
   case DnsFreeParsedMessageFields:
@@ -31,6 +33,6 @@ VOID WINAPI DnsFree
 }
 
 VOID WINAPI DnsRecordListFree
-( PVOID Data, DNS_FREE_TYPE FreeType ) {
+( PDNS_RECORD Data, DNS_FREE_TYPE FreeType ) {
   DnsFree( Data, FreeType );
 }
index 0cd5f22..7c74494 100644 (file)
@@ -1,7 +1,9 @@
 #include <windows.h>
 #include <WinError.h>
-#include <WinDNS.h>
+#include <windns.h>
 #include <internal/windns.h>
+#define NTOS_MODE_USER
+#include <ntos.h>
 #include <wchar.h>
 #include <string.h>
 #include <ctype.h>
@@ -192,8 +194,8 @@ BOOL WINAPI DnsNameCompare_UTF8
 }
 
 BOOL WINAPI DnsNameCompare_A
-( LPCSTR Name1,
-  LPCSTR Name2 ) {
+( LPSTR Name1,
+  LPSTR Name2 ) {
   return DnsNameCompare_UTF8( Name1, Name2 );
 }
 
index c2f3ddd..6f0ae2a 100644 (file)
 
 #include <windows.h>
 #include <WinError.h>
-#include <WinDNS.h>
+#include <windns.h>
 #include <internal/windns.h>
 #include <string.h>
+#define NTOS_MODE_USER
+#include <ntos.h>
 
 /* DnsQuery ****************************
  * Begin a DNS query, and allow the result to be placed in the application
@@ -45,7 +47,7 @@ DNS_STATUS WINAPI DnsQuery_A
   WORD Type,
   DWORD Options,
   PIP4_ARRAY Servers,
-  PDNS_RECORDA *QueryResultSet,
+  PDNS_RECORD *QueryResultSet,
   PVOID *Reserved ) {
   adns_state astate;
   int quflags = 0;
@@ -77,18 +79,22 @@ DNS_STATUS WINAPI DnsQuery_A
       return DnsIntTranslateAdnsToDNS_STATUS( adns_error );
     }
 
-    *QueryResultSet = (PDNS_RECORDA)RtlAllocateHeap( RtlGetProcessHeap(), 0, 
-                                                    sizeof( DNS_RECORDA ) );
-    (*QueryResultSet)->wType = Type;
-    (*QueryResultSet)->pName = xstrsave( Name );
-    (*QueryResultSet)->wDataLength = sizeof(DNS_A_DATA);
-    (*QueryResultSet)->Data.A.IpAddress = 
-      answer->rrs.addr->addr.inet.sin_addr.s_addr;
-    adns_finish( astate );
-    return ERROR_SUCCESS;
-    
+    if( answer && answer->rrs.addr ) {
+       *QueryResultSet = 
+           (PDNS_RECORD)RtlAllocateHeap( RtlGetProcessHeap(), 0,
+                                         sizeof( DNS_RECORD ) );
+       (*QueryResultSet)->pNext = NULL;
+       (*QueryResultSet)->wType = Type;
+       (*QueryResultSet)->pName = xstrsave( Name );
+       (*QueryResultSet)->wDataLength = sizeof(DNS_A_DATA);
+       (*QueryResultSet)->Data.A.IpAddress = 
+           answer->rrs.addr->addr.inet.sin_addr.s_addr;
+       adns_finish( astate );
+       return ERROR_SUCCESS;
+    } else
+       return ERROR_FILE_NOT_FOUND;
   default:
-    return DNS_ERROR_NO_MEMORY; /* XXX arty: find a better error code. */
+    return ERROR_OUTOFMEMORY; /* XXX arty: find a better error code. */
   }
 }
 
@@ -112,13 +118,13 @@ DNS_STATUS WINAPI DnsQuery_W
   WORD Type,
   DWORD Options,
   PIP4_ARRAY Servers,
-  PDNS_RECORDW *QueryResultSet,
+  PDNS_RECORD *QueryResultSet,
   PVOID *Reserved ) {
   int i;
   PCHAR Buffer;
   DNS_STATUS Status;
-  PDNS_RECORDA QueryResultWide;
-  PDNS_RECORDW ConvertedRecord = 0, LastRecord = 0;
+  PDNS_RECORD QueryResultWide;
+  PDNS_RECORD ConvertedRecord = 0, LastRecord = 0;
 
   Buffer = DnsWToC( Name );
 
@@ -129,11 +135,13 @@ DNS_STATUS WINAPI DnsQuery_W
     switch( QueryResultWide->wType ) {
     case DNS_TYPE_A:
     case DNS_TYPE_WKS:
+#ifndef __USE_W32API
     case DNS_TYPE_AAAA:
     case DNS_TYPE_KEY:
+#endif
       ConvertedRecord = RtlAllocateHeap( RtlGetProcessHeap(), 0, 
-                                        sizeof(DNS_RECORDA) );
-      ConvertedRecord->pName = DnsCToW( QueryResultWide->pName );
+                                        sizeof(DNS_RECORD) );
+      ConvertedRecord->pName = (PCHAR)DnsCToW( QueryResultWide->pName );
       ConvertedRecord->wType = QueryResultWide->wType;
       ConvertedRecord->wDataLength = QueryResultWide->wDataLength;
       memcpy( ConvertedRecord, QueryResultWide, 
@@ -149,57 +157,63 @@ DNS_STATUS WINAPI DnsQuery_W
     case DNS_TYPE_MG:
     case DNS_TYPE_MR:
       ConvertedRecord = RtlAllocateHeap( RtlGetProcessHeap(), 0, 
-                                        sizeof(DNS_RECORDA) );
-      ConvertedRecord->pName = DnsCToW( QueryResultWide->pName );
+                                        sizeof(DNS_RECORD) );
+      ConvertedRecord->pName = (PCHAR)DnsCToW( QueryResultWide->pName );
       ConvertedRecord->wType = QueryResultWide->wType;
-      ConvertedRecord->wDataLength = sizeof(DNS_PTR_DATAA);
+      ConvertedRecord->wDataLength = sizeof(DNS_PTR_DATA);
       ConvertedRecord->Data.PTR.pNameHost = 
-       DnsCToW( QueryResultWide->Data.PTR.pNameHost );
+         (PCHAR)DnsCToW( QueryResultWide->Data.PTR.pNameHost );
       break;
     case DNS_TYPE_MINFO:
+#ifndef __USE_W32API
     case DNS_TYPE_RP:
+#endif
       ConvertedRecord = RtlAllocateHeap( RtlGetProcessHeap(), 0, 
-                                        sizeof(DNS_RECORDA) );
-      ConvertedRecord->pName = DnsCToW( QueryResultWide->pName );
+                                        sizeof(DNS_RECORD) );
+      ConvertedRecord->pName = (PCHAR)DnsCToW( QueryResultWide->pName );
       ConvertedRecord->wType = QueryResultWide->wType;
-      ConvertedRecord->wDataLength = sizeof(DNS_MINFO_DATAA);
+      ConvertedRecord->wDataLength = sizeof(DNS_MINFO_DATA);
       ConvertedRecord->Data.MINFO.pNameMailbox =
-       DnsCToW( QueryResultWide->Data.MINFO.pNameMailbox );
+         (PCHAR)DnsCToW( QueryResultWide->Data.MINFO.pNameMailbox );
       ConvertedRecord->Data.MINFO.pNameErrorsMailbox =
-       DnsCToW( QueryResultWide->Data.MINFO.pNameErrorsMailbox );
+         (PCHAR)DnsCToW( QueryResultWide->Data.MINFO.pNameErrorsMailbox );
       break;
 
     case DNS_TYPE_MX:
+#ifndef __USE_W32API
     case DNS_TYPE_AFSDB:
     case DNS_TYPE_RT:
+#endif
       ConvertedRecord = RtlAllocateHeap( RtlGetProcessHeap(), 0, 
-                                        sizeof(DNS_RECORDA) );
-      ConvertedRecord->pName = DnsCToW( QueryResultWide->pName );
+                                        sizeof(DNS_RECORD) );
+      ConvertedRecord->pName = (PCHAR)DnsCToW( QueryResultWide->pName );
       ConvertedRecord->wType = QueryResultWide->wType;
-      ConvertedRecord->wDataLength = sizeof(DNS_MX_DATAW);
+      ConvertedRecord->wDataLength = sizeof(DNS_MX_DATA);
       ConvertedRecord->Data.MX.pNameExchange = 
-       DnsCToW( QueryResultWide->Data.MX.pNameExchange );
+         (PCHAR)DnsCToW( QueryResultWide->Data.MX.pNameExchange );
       ConvertedRecord->Data.MX.wPreference =
-       QueryResultWide->Data.MX.wPreference;
+         QueryResultWide->Data.MX.wPreference;
       break;
 
+#ifndef __USE_W32API
     case DNS_TYPE_TXT:
-    case DNS_TYPE_HINFO:
     case DNS_TYPE_ISDN:
+#endif
+    case DNS_TYPE_HINFO:
       ConvertedRecord = RtlAllocateHeap( RtlGetProcessHeap(), 0, 
-                                        sizeof(DNS_TXT_DATAW) + 
+                                        sizeof(DNS_TXT_DATA) + 
                                         QueryResultWide->
                                         Data.TXT.dwStringCount );
-      ConvertedRecord->pName = DnsCToW( QueryResultWide->pName );
+      ConvertedRecord->pName = (PCHAR)DnsCToW( QueryResultWide->pName );
       ConvertedRecord->wType = QueryResultWide->wType;
       ConvertedRecord->wDataLength = 
-       sizeof(DNS_TXT_DATAW) + 
+       sizeof(DNS_TXT_DATA) + 
        (sizeof(PWCHAR) * QueryResultWide->Data.TXT.dwStringCount);
       ConvertedRecord->Data.TXT.dwStringCount = 
        QueryResultWide->Data.TXT.dwStringCount;
       for( i = 0; i < ConvertedRecord->Data.TXT.dwStringCount; i++ ) {
        ConvertedRecord->Data.TXT.pStringArray[i] = 
-         DnsCToW( QueryResultWide->Data.TXT.pStringArray[i] );
+           (PCHAR)DnsCToW( QueryResultWide->Data.TXT.pStringArray[i] );
       }
       break;
 
@@ -208,7 +222,7 @@ DNS_STATUS WINAPI DnsQuery_W
                                         sizeof(DNS_NULL_DATA) + 
                                         QueryResultWide->
                                         Data.Null.dwByteCount );
-      ConvertedRecord->pName = DnsCToW( QueryResultWide->pName );
+      ConvertedRecord->pName = (PCHAR)DnsCToW( QueryResultWide->pName );
       ConvertedRecord->wType = QueryResultWide->wType;
       ConvertedRecord->wDataLength =
        sizeof(DNS_NULL_DATA) + QueryResultWide->Data.Null.dwByteCount;
@@ -219,6 +233,7 @@ DNS_STATUS WINAPI DnsQuery_W
              QueryResultWide->Data.Null.dwByteCount );
       break;
 
+#ifndef __USE_W32API
     case DNS_TYPE_SIG:
       ConvertedRecord = RtlAllocateHeap( RtlGetProcessHeap(), 0, 
                                         sizeof(DNS_RECORDA) );
@@ -257,6 +272,7 @@ DNS_STATUS WINAPI DnsQuery_W
       ConvertedRecord->Data.SRV.pNameTarget =
        DnsCToW( QueryResultWide->Data.SRV.pNameTarget );
       break;
+#endif
     }
 
     if( LastRecord ) {
@@ -280,69 +296,75 @@ DNS_STATUS WINAPI DnsQuery_UTF8
   WORD Type,
   DWORD Options,
   PIP4_ARRAY Servers,
-  PDNS_RECORDA *QueryResultSet,
+  PDNS_RECORD *QueryResultSet,
   PVOID *Reserved ) {
   return DnsQuery_UTF8( Name, Type, Options, Servers, QueryResultSet, 
                        Reserved );
 }
 
-void DnsIntFreeRecordList( PDNS_RECORDA ToDelete ) {
+void DnsIntFreeRecordList( PDNS_RECORD ToDelete ) {
   int i;
-  PDNS_RECORDA next = 0;
+  PDNS_RECORD next = 0;
 
   while( ToDelete ) {
-    if( ToDelete->pName ) 
-      RtlFreeHeap( RtlGetProcessHeap(), 0, ToDelete->pName );
-    switch( ToDelete->wType ) {
-    case DNS_TYPE_CNAME:
-    case DNS_TYPE_PTR:
-    case DNS_TYPE_NS:
-    case DNS_TYPE_MB:
-    case DNS_TYPE_MD:
-    case DNS_TYPE_MF:
-    case DNS_TYPE_MG:
-    case DNS_TYPE_MR:
-      RtlFreeHeap( RtlGetProcessHeap(), 0, ToDelete->Data.PTR.pNameHost );
-      break;
-    case DNS_TYPE_MINFO:
-    case DNS_TYPE_RP:
-      RtlFreeHeap( RtlGetProcessHeap(), 0, 
-                  ToDelete->Data.MINFO.pNameMailbox );
-      RtlFreeHeap( RtlGetProcessHeap(), 0,
-                  ToDelete->Data.MINFO.pNameErrorsMailbox );
-      break;
-
-    case DNS_TYPE_MX:
-    case DNS_TYPE_AFSDB:
-    case DNS_TYPE_RT:
-      RtlFreeHeap( RtlGetProcessHeap(), 0, ToDelete->Data.MX.pNameExchange );
-      break;
-
-    case DNS_TYPE_TXT:
-    case DNS_TYPE_HINFO:
-    case DNS_TYPE_ISDN:
-      for( i = 0; i < ToDelete->Data.TXT.dwStringCount; i++ ) {
-       RtlFreeHeap( RtlGetProcessHeap(), 0, 
-                    ToDelete->Data.TXT.pStringArray[i] );
+      if( ToDelete->pName ) 
+         RtlFreeHeap( RtlGetProcessHeap(), 0, ToDelete->pName );
+      switch( ToDelete->wType ) {
+      case DNS_TYPE_CNAME:
+      case DNS_TYPE_PTR:
+      case DNS_TYPE_NS:
+      case DNS_TYPE_MB:
+      case DNS_TYPE_MD:
+      case DNS_TYPE_MF:
+      case DNS_TYPE_MG:
+      case DNS_TYPE_MR:
+         RtlFreeHeap( RtlGetProcessHeap(), 0, ToDelete->Data.PTR.pNameHost );
+         break;
+      case DNS_TYPE_MINFO:
+#ifndef __USE_W32API
+      case DNS_TYPE_RP:
+         RtlFreeHeap( RtlGetProcessHeap(), 0, 
+                      ToDelete->Data.MINFO.pNameMailbox );
+         RtlFreeHeap( RtlGetProcessHeap(), 0,
+                      ToDelete->Data.MINFO.pNameErrorsMailbox );
+         break;
+         
+      case DNS_TYPE_AFSDB:
+      case DNS_TYPE_RT:
+#endif
+      case DNS_TYPE_MX:
+         RtlFreeHeap( RtlGetProcessHeap(), 0, ToDelete->Data.MX.pNameExchange );
+         break;
+         
+#ifndef __USE_W32API
+      case DNS_TYPE_TXT:
+      case DNS_TYPE_ISDN:
+#endif
+      case DNS_TYPE_HINFO:
+         for( i = 0; i < ToDelete->Data.TXT.dwStringCount; i++ ) {
+             RtlFreeHeap( RtlGetProcessHeap(), 0, 
+                          ToDelete->Data.TXT.pStringArray[i] );
+         }
+         RtlFreeHeap( RtlGetProcessHeap(), 0, ToDelete->Data.TXT.pStringArray );
+         break;
+         
+#ifndef __USE_W32API
+      case DNS_TYPE_SIG:
+         RtlFreeHeap( RtlGetProcessHeap(), 0, ToDelete->Data.SIG.pNameSigner );
+         break;
+         
+      case DNS_TYPE_NXT:
+         RtlFreeHeap( RtlGetProcessHeap(), 0, ToDelete->Data.NXT.pNameNext );
+         break;
+         
+      case DNS_TYPE_SRV:
+         RtlFreeHeap( RtlGetProcessHeap(), 0, ToDelete->Data.SRV.pNameTarget );
+         break;
+#endif
       }
-      RtlFreeHeap( RtlGetProcessHeap(), 0, ToDelete->Data.TXT.pStringArray );
-      break;
-
-    case DNS_TYPE_SIG:
-      RtlFreeHeap( RtlGetProcessHeap(), 0, ToDelete->Data.SIG.pNameSigner );
-      break;
-
-    case DNS_TYPE_NXT:
-      RtlFreeHeap( RtlGetProcessHeap(), 0, ToDelete->Data.NXT.pNameNext );
-      break;
-
-    case DNS_TYPE_SRV:
-      RtlFreeHeap( RtlGetProcessHeap(), 0, ToDelete->Data.SRV.pNameTarget );
-      break;
-    }
-
-    next = ToDelete->pNext;
-    RtlFreeHeap( RtlGetProcessHeap(), 0, ToDelete );
-    ToDelete = next;
+      
+      next = ToDelete->pNext;
+      RtlFreeHeap( RtlGetProcessHeap(), 0, ToDelete );
+      ToDelete = next;
   }
 }
index 68bcc2c..fcfe4c5 100644 (file)
 #include <windows.h>
-#include <WinDNS.h>
+/*#include <windns.h>*/
 #include <WinError.h>
+#define NTOS_MODE_USER
+#include <ntos.h>
 #include <debug.h>
 
+typedef ULONG DNS_STATUS;
+
 DNS_STATUS WINAPI DnsAddRecordSet_A() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsAddRecordSet_UTF8() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsAddRecordSet_W() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsAllocateRecord() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsApiHeapReset() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsAsyncRegisterHostAddrs_A() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsAsyncRegisterHostAddrs_UTF8() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsAsyncRegisterHostAddrs_W() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsAsyncRegisterInit() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsAsyncRegisterTerm() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsCheckNameCollision_A() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsCheckNameCollision_UTF8() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsCheckNameCollision_W() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsCopyStringEx() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsCreateReverseNameStringForIpAddress() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsCreateStandardDnsNameCopy() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsCreateStringCopy() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsDhcpSrvRegisterHostName_W() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsDhcpSrvRegisterInit() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsDhcpSrvRegisterTerm() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsDisableAdapterDomainNameRegistration() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsDisableBNodeResolverThread() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsDisableDynamicRegistration() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsDowncaseDnsNameLabel() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsEnableAdapterDomainNameRegistration() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsEnableBNodeResolverThread() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsEnableDynamicRegistration() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsExtractRecordsFromMessage_UTF8() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsExtractRecordsFromMessage_W() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsFindAuthoritativeZone() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsFlushResolverCache() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsFlushResolverCacheEntry_A() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsFlushResolverCacheEntry_UTF8() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsFlushResolverCacheEntry_W() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsFreeAdapterInformation() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsFreeNetworkInformation() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsFreeSearchInformation() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsGetBufferLengthForStringCopy() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsGetCacheDataTable() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsGetDnsServerList() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsGetDomainName() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsGetHostName_A() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsGetHostName_UTF8() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsGetHostName_W() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsGetIpAddressInfoList() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsGetIpAddressList() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsGetLastServerUpdateIP() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsGetMaxNumberOfAddressesToRegister() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsGetNetworkInformation() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsGetPrimaryDomainName_A() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsGetPrimaryDomainName_UTF8() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsGetPrimaryDomainName_W() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsGetSearchInformation() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsIpv6AddressToString() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsIpv6StringToAddress() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsIsAMailboxType() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsIsAdapterDomainNameRegistrationEnabled() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsIsDynamicRegistrationEnabled() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsIsStatusRcode() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsIsStringCountValidForTextType() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsMapRcodeToStatus() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsModifyRecordSet_A() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsModifyRecordSet_UTF8() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsModifyRecordSet_W() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsModifyRecordsInSet_A() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsModifyRecordsInSet_UTF8() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsModifyRecordsInSet_W() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsNameCompareEx_A() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsNameCompareEx_UTF8() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsNameCompareEx_W() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsNameCopy() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsNameCopyAllocate() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsQueryConfig() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsQueryEx() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsRecordBuild_UTF8() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsRecordBuild_W() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsRecordCompare() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsRecordCopyEx() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsRecordSetCompare() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsRecordSetCopyEx() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsRecordSetDetach() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsRecordStringForType() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsRecordStringForWritableType() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsRecordTypeForName() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsRelationalCompare_UTF8() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsRelationalCompare_W() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsRemoveRegistrations() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsReplaceRecordSetA() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsReplaceRecordSetUTF8() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsReplaceRecordSetW() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsReplaceRecordSet_A() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsReplaceRecordSet_UTF8() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsReplaceRecordSet_W() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsServiceNotificationDeregister_A() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsServiceNotificationDeregister_UTF8() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsServiceNotificationDeregister_W() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsServiceNotificationRegister_A() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsServiceNotificationRegister_UTF8() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsServiceNotificationRegister_W() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsSetMaxNumberOfAddressesToRegister() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsStatusString() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsStringCopyAllocateEx() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsUnicodeToUtf8() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsUpdate() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsUpdateTest_A() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsUpdateTest_UTF8() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsUpdateTest_W() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsUtf8ToUnicode() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsValidateUtf8Byte() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsWinsRecordFlagForString() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsWinsRecordFlagString() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsWriteQuestionToBuffer_UTF8() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsWriteQuestionToBuffer_W() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI DnsWriteReverseNameStringForIpAddress() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
 
 DNS_STATUS WINAPI GetCurrentTimeInSeconds() {
   UNIMPLEMENTED;
-  return DNS_ERROR_NO_MEMORY;
+  return ERROR_OUTOFMEMORY;
 }
index f297d3a..8234656 100644 (file)
@@ -8,6 +8,6 @@ typedef struct {
 } WINDNS_CONTEXT, *PWINDNS_CONTEXT;
 
 DNS_STATUS DnsIntTranslateAdnsToDNS_STATUS( int Status );
-void DnsIntFreeRecordList( PDNS_RECORDA ToFree );
+void DnsIntFreeRecordList( PDNS_RECORD ToFree );
 
 #endif//WINDNS_INTERNAL_H