ReactOS  0.4.13-dev-241-g63286c6
windns.h File Reference
#include <adns.h>
Include dependency graph for windns.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  WINDNS_CONTEXT
 

Typedefs

typedef struct WINDNS_CONTEXTPWINDNS_CONTEXT
 

Functions

DNS_STATUS DnsIntTranslateAdnsToDNS_STATUS (int Status)
 
void DnsIntFreeRecordList (PDNS_RECORD ToFree)
 

Typedef Documentation

◆ PWINDNS_CONTEXT

Function Documentation

◆ DnsIntFreeRecordList()

void DnsIntFreeRecordList ( PDNS_RECORD  ToFree)

Definition at line 914 of file query.c.

915 {
916  UINT i;
917  PDNS_RECORD next = 0;
918 
919  while(ToDelete)
920  {
921  if(ToDelete->pName)
922  RtlFreeHeap(RtlGetProcessHeap(), 0, ToDelete->pName);
923 
924  switch(ToDelete->wType)
925  {
926  case DNS_TYPE_CNAME:
927  case DNS_TYPE_PTR:
928  case DNS_TYPE_NS:
929  case DNS_TYPE_MB:
930  case DNS_TYPE_MD:
931  case DNS_TYPE_MF:
932  case DNS_TYPE_MG:
933  case DNS_TYPE_MR:
934  RtlFreeHeap(RtlGetProcessHeap(), 0, ToDelete->Data.PTR.pNameHost);
935  break;
936 
937  case DNS_TYPE_MINFO:
938  case DNS_TYPE_MX:
939  RtlFreeHeap(RtlGetProcessHeap(), 0, ToDelete->Data.MX.pNameExchange);
940  break;
941 
942  case DNS_TYPE_HINFO:
943  for(i = 0; i < ToDelete->Data.TXT.dwStringCount; i++)
944  RtlFreeHeap(RtlGetProcessHeap(), 0, ToDelete->Data.TXT.pStringArray[i]);
945 
946  RtlFreeHeap(RtlGetProcessHeap(), 0, ToDelete->Data.TXT.pStringArray);
947  break;
948  }
949 
950  next = ToDelete->pNext;
951  RtlFreeHeap(RtlGetProcessHeap(), 0, ToDelete);
952  ToDelete = next;
953  }
954 }
#define DNS_TYPE_MD
Definition: windns.h:43
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:603
#define DNS_TYPE_MG
Definition: windns.h:48
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define DNS_TYPE_PTR
Definition: windns.h:52
#define DNS_TYPE_CNAME
Definition: windns.h:45
#define PDNS_RECORD
Definition: windns.h:636
#define DNS_TYPE_MB
Definition: windns.h:47
#define DNS_TYPE_MX
Definition: windns.h:55
#define DNS_TYPE_MR
Definition: windns.h:49
static unsigned __int64 next
Definition: rand_nt.c:6
#define DNS_TYPE_MINFO
Definition: windns.h:54
unsigned int UINT
Definition: ndis.h:50
#define DNS_TYPE_NS
Definition: windns.h:42
#define DNS_TYPE_MF
Definition: windns.h:44
#define DNS_TYPE_HINFO
Definition: windns.h:53

Referenced by DnsFree(), and DnsQuery_A().

◆ DnsIntTranslateAdnsToDNS_STATUS()

DNS_STATUS DnsIntTranslateAdnsToDNS_STATUS ( int  Status)

Definition at line 17 of file adns.c.

18 {
19  switch(Status)
20  {
21  case adns_s_ok:
22  return ERROR_SUCCESS;
23 
24  case adns_s_nomemory:
25  case adns_s_systemfail:
26  default: /* There really aren't any general errors in the dns part. */
27  return ERROR_OUTOFMEMORY;
28  }
29 }
#define ERROR_SUCCESS
Definition: deptool.c:10
Status
Definition: gdiplustypes.h:24
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13

Referenced by DnsAcquireContextHandle_W(), and DnsQuery_W().