ReactOS  0.4.13-dev-52-g0efcfec
DnsQuery.c File Reference
#include <winsock2.h>
#include <ws2tcpip.h>
#include <stdio.h>
#include <windns.h>
#include <apitest.h>
#include <iphlpapi.h>
Include dependency graph for DnsQuery.c:

Go to the source code of this file.

Functions

void TestHostName (void)
 
 START_TEST (DnsQuery)
 

Function Documentation

◆ START_TEST()

START_TEST ( DnsQuery  )

Definition at line 483 of file DnsQuery.c.

484 {
485  WSADATA wsaData;
486  int iResult;
487 
488  // Initialize Winsock
489  iResult = WSAStartup(MAKEWORD(2, 2), &wsaData);
490  ok(iResult == 0, "WSAStartup failed: %d\n", iResult);
491  if (iResult != 0) return;
492 
493  // Tests
494  TestHostName();
495 
496  WSACleanup();
497 
498  return;
499 }
#define MAKEWORD(a, b)
Definition: typedefs.h:247
INT WSAAPI WSACleanup(VOID)
Definition: startup.c:60
#define ok(value,...)
INT WINAPI WSAStartup(IN WORD wVersionRequested, OUT LPWSADATA lpWSAData)
Definition: startup.c:113
void TestHostName(void)
Definition: DnsQuery.c:16

◆ TestHostName()

void TestHostName ( void  )

Definition at line 16 of file DnsQuery.c.

17 {
18 
19  DNS_STATUS dns_status;
20  char host_name[255];
21  char test_name[255];
22  PDNS_RECORD dp;
23  WCHAR host_nameW[255];
24  WCHAR test_nameW[255];
25  PFIXED_INFO network_info;
26  ULONG network_info_blen = 0;
27  DWORD network_info_result;
28 
29  network_info_result = GetNetworkParams(NULL, &network_info_blen);
30  network_info = (PFIXED_INFO)HeapAlloc(GetProcessHeap(), 0, (size_t)network_info_blen);
31  if (NULL == network_info)
32  {
33  skip("Not enough memory. Can't continue!\n");
34  return;
35  }
36 
37  network_info_result = GetNetworkParams(network_info, &network_info_blen);
38  if (network_info_result != ERROR_SUCCESS)
39  {
40  HeapFree(GetProcessHeap(), 0, network_info);
41  skip("Can't get network info. Some results may be wrong.\n");
42  return;
43  }
44  else
45  {
46  strcpy(host_name, network_info->HostName);
47  if (strlen(network_info->DomainName))
48  {
49  strcat(host_name, ".");
50  strcat(host_name, network_info->DomainName);
51  }
52  HeapFree(GetProcessHeap(), 0, network_info);
53  mbstowcs(host_nameW, host_name, 255);
54  }
55 
56  //DnsQuery_A:
57  //NULL
58  dp = InvalidPointer;
59  dns_status = DnsQuery_A(NULL, DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
60  ok(dns_status == ERROR_INVALID_PARAMETER, "DnsQuery_A failed with error %lu\n", dns_status);
61  ok(dp == InvalidPointer, "dp = %p\n", dp);
62 
63  //NULL dp
64  dns_status = DnsQuery_A(host_name, DNS_TYPE_A, DNS_QUERY_STANDARD, 0, NULL, 0);
65  ok(dns_status == ERROR_INVALID_PARAMETER, "DnsQuery_A failed with error %lu\n", dns_status);
66 
67  //Testing HostName
68  dp = InvalidPointer;
69  dns_status = DnsQuery_A(host_name, DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
70  ok(dns_status == NO_ERROR, "DnsQuery_A failed with error %lu\n", dns_status);
71  if (dp != InvalidPointer)
72  {
73  ok(strcmp(dp->pName, host_name) == 0, "DnsQuery_A returned wrong answer '%s' expected '%s'\n", dp->pName, host_name);
74  ok(dp->wType == DNS_TYPE_A, "DnsQuery_A returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
75  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_A returned wrong data size %d\n", dp->wDataLength);
76  }
77  ok(dp != InvalidPointer && dp != NULL, "dp = %p\n", dp);
79 
80  //127.0.0.1
81  dp = InvalidPointer;
82  dns_status = DnsQuery_A("127.0.0.1", DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
83  ok(dns_status == NO_ERROR, "DnsQuery_A failed with error %lu\n", dns_status);
84  if (dp != InvalidPointer)
85  {
86  ok(strcmp(dp->pName, "127.0.0.1") == 0, "DnsQuery_A returned wrong answer '%s' expected '%s'\n", dp->pName, "127.0.0.1");
87  ok(dp->wType == DNS_TYPE_A, "DnsQuery_A returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
88  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_A returned wrong data size %d\n", dp->wDataLength);
89  ok(dp->Data.A.IpAddress == ntohl(INADDR_LOOPBACK), "DnsQuery_A returned wrong data %ld expected %ld\n", dp->Data.A.IpAddress, ntohl(INADDR_LOOPBACK));
90  }
91  ok(dp != InvalidPointer && dp != NULL, "dp = %p\n", dp);
93 
94  //Localhost strings
95  dp = InvalidPointer;
96  dns_status = DnsQuery_A("LocalHost", DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
97  ok(dns_status == NO_ERROR, "DnsQuery_A failed with error %lu\n", dns_status);
98  if (dp != InvalidPointer)
99  {
100  /* On Windows 7 is unchanged on XP is lowercased */
101  ok(strcmp(dp->pName, "localhost") == 0 || broken(strcmp(dp->pName, "LocalHost") == 0), "DnsQuery_A returned wrong answer '%s' expected '%s'\n", dp->pName, "localhost");
102  ok(dp->wType == DNS_TYPE_A, "DnsQuery_A returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
103  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_A returned wrong data size %d\n", dp->wDataLength);
104  ok(dp->Data.A.IpAddress == ntohl(INADDR_LOOPBACK), "DnsQuery_A returned wrong data %ld expected %ld\n", dp->Data.A.IpAddress, ntohl(INADDR_LOOPBACK));
105  }
106  ok(dp != InvalidPointer && dp != NULL, "dp = %p\n", dp);
108 
109  dp = InvalidPointer;
110  dns_status = DnsQuery_A("Localhost", DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
111  ok(dns_status == NO_ERROR, "DnsQuery_A failed with error %lu\n", dns_status);
112  if (dp != InvalidPointer)
113  {
114  /* On Windows 7 is unchanged on XP is lowercased */
115  ok(strcmp(dp->pName, "localhost") == 0 || broken(strcmp(dp->pName, "Localhost") == 0), "DnsQuery_A returned wrong answer '%s' expected '%s'\n", dp->pName, "localhost");
116  ok(dp->wType == DNS_TYPE_A, "DnsQuery_A returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
117  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_A returned wrong data size %d\n", dp->wDataLength);
118  ok(dp->Data.A.IpAddress == ntohl(INADDR_LOOPBACK), "DnsQuery_A returned wrong data %ld expected %ld\n", dp->Data.A.IpAddress, ntohl(INADDR_LOOPBACK));
119  }
120  ok(dp != InvalidPointer && dp != NULL, "dp = %p\n", dp);
122 
123  dp = InvalidPointer;
124  dns_status = DnsQuery_A("localhost", DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
125  ok(dns_status == NO_ERROR, "DnsQuery_A failed with error %lu\n", dns_status);
126  if (dp != InvalidPointer)
127  {
128  ok(strcmp(dp->pName, "localhost") == 0, "DnsQuery_A returned wrong answer '%s' expected '%s'\n", dp->pName, "localhost");
129  ok(dp->wType == DNS_TYPE_A, "DnsQuery_A returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
130  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_A returned wrong data size %d\n", dp->wDataLength);
131  ok(dp->Data.A.IpAddress == ntohl(INADDR_LOOPBACK), "DnsQuery_A returned wrong data %ld expected %ld\n", dp->Data.A.IpAddress, ntohl(INADDR_LOOPBACK));
132  }
133  ok(dp != InvalidPointer && dp != NULL, "dp = %p\n", dp);
135 
136  dp = InvalidPointer;
137  dns_status = DnsQuery_A("", DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
138  ok(dns_status == NO_ERROR, "DnsQuery_A failed with error %lu\n", dns_status);
139  if (dp != InvalidPointer)
140  {
141  /* On Windows 7 is the host on XP is dot ??? */
142  ok(strcmp(dp->pName, ".") == 0 || broken(strcmp(dp->pName, host_name) == 0), "DnsQuery_A returned wrong answer '%s' expected '%s' or '.'\n", dp->pName, host_name);
143  ok(dp->wType == DNS_TYPE_A, "DnsQuery_A returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
144  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_A returned wrong data size %d\n", dp->wDataLength);
145  }
146  ok(dp != InvalidPointer && dp != NULL, "dp = %p\n", dp);
148 
149  dp = InvalidPointer;
150  dns_status = DnsQuery_A(" ", DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
151  /* On Windows 7 is DNS_ERROR_INVALID_NAME_CHAR on XP is ERROR_TIMEOUT on Win 2k3 is ERROR_INVALID_NAME*/
152  ok(dns_status == ERROR_INVALID_NAME || broken(dns_status == ERROR_TIMEOUT) || broken(dns_status == DNS_ERROR_INVALID_NAME_CHAR), "DnsQuery_A failed with error %lu expected %u or %u or %u\n", dns_status, ERROR_INVALID_NAME, ERROR_TIMEOUT, DNS_ERROR_INVALID_NAME_CHAR);
153  if (dp != InvalidPointer && dns_status == NO_ERROR)
154  {
155  ok(strcmp(dp->pName, host_name) == 0, "DnsQuery_A returned wrong answer '%s' expected '%s'\n", dp->pName, host_name);
156  ok(dp->wType == DNS_TYPE_A, "DnsQuery_A returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
157  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_A returned wrong data size %d\n", dp->wDataLength);
158  }
159  ok(dp == InvalidPointer || broken(dp == NULL), "dp = %p\n", dp);
160  if (dp != InvalidPointer && dns_status == NO_ERROR) DnsRecordListFree(dp, DnsFreeRecordList);
161 
162  dp = InvalidPointer;
163  dns_status = DnsQuery_A("0.0.0.0", DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
164  ok(dns_status == NO_ERROR, "DnsQuery_A failed with error %lu\n", dns_status);
165  if (dp != InvalidPointer)
166  {
167  ok(strcmp(dp->pName, "0.0.0.0") == 0, "DnsQuery_A returned wrong answer '%s' expected '%s'\n", dp->pName, "0.0.0.0");
168  ok(dp->wType == DNS_TYPE_A, "DnsQuery_A returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
169  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_A returned wrong data size %d\n", dp->wDataLength);
170  ok(dp->Data.A.IpAddress == ntohl(INADDR_ANY), "DnsQuery_A returned wrong data %ld expected %ld\n", dp->Data.A.IpAddress, ntohl(INADDR_ANY));
171  }
172  ok(dp != InvalidPointer && dp != NULL, "dp = %p\n", dp);
174 
175  dp = InvalidPointer;
176  dns_status = DnsQuery_A("0.0.0.0 ", DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
177  /* On windows 7 fails with DNS_ERROR_INVALID_NAME_CHAR on XP no error */
178  ok(dns_status == NO_ERROR || broken(dns_status == DNS_ERROR_INVALID_NAME_CHAR), "DnsQuery_A wrong status %lu expected %u or %u\n", dns_status, NO_ERROR, DNS_ERROR_INVALID_NAME_CHAR);
179  if (dp != InvalidPointer && dns_status == NO_ERROR)
180  {
181  ok(strcmp(dp->pName, "0.0.0.0") == 0 || broken(strcmp(dp->pName, "0.0.0.0 ") == 0), "DnsQuery_A returned wrong answer '%s' expected '%s' or '%s'\n", dp->pName, "0.0.0.0", "0.0.0.0 ");
182  ok(dp->wType == DNS_TYPE_A, "DnsQuery_A returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
183  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_A returned wrong data size %d\n", dp->wDataLength);
184  ok(dp->Data.A.IpAddress == ntohl(INADDR_ANY), "DnsQuery_A returned wrong data %ld expected %ld\n", dp->Data.A.IpAddress, ntohl(INADDR_ANY));
185  }
186  ok(dp != InvalidPointer || broken(dp == InvalidPointer) || broken(dp == NULL), "dp = %p\n", dp);
187  if (dp != InvalidPointer && dns_status == NO_ERROR) DnsRecordListFree(dp, DnsFreeRecordList);
188 
189  dp = InvalidPointer;
190  dns_status = DnsQuery_A("127.0.0.1 ", DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
191  /* On windows 7 fails with DNS_ERROR_INVALID_NAME_CHAR on XP no error */
192  ok(dns_status == NO_ERROR || broken(dns_status == DNS_ERROR_INVALID_NAME_CHAR), "DnsQuery_A wrong status %lu expected %u or %u\n", dns_status, NO_ERROR, DNS_ERROR_INVALID_NAME_CHAR);
193  if (dp != InvalidPointer && dns_status == NO_ERROR)
194  {
195  ok(strcmp(dp->pName, "127.0.0.1") == 0 || strcmp(dp->pName, "127.0.0.1 ") == 0, "DnsQuery_A returned wrong answer '%s' expected '%s' or '%s'\n", dp->pName, "127.0.0.1", "127.0.0.1 ");
196  ok(dp->wType == DNS_TYPE_A, "DnsQuery_A returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
197  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_A returned wrong data size %d\n", dp->wDataLength);
198  ok(dp->Data.A.IpAddress == ntohl(INADDR_LOOPBACK), "DnsQuery_A returned wrong data %ld expected %ld\n", dp->Data.A.IpAddress, ntohl(INADDR_LOOPBACK));
199  }
200  ok(dp != InvalidPointer || broken(dp == InvalidPointer) || broken(dp == NULL), "dp = %p\n", dp);
201  if (dp != InvalidPointer && dns_status == NO_ERROR) DnsRecordListFree(dp, DnsFreeRecordList);
202 
203  dp = InvalidPointer;
204  dns_status = DnsQuery_A(" 127.0.0.1 ", DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
205  ok(dns_status == DNS_ERROR_RCODE_NAME_ERROR || broken(dns_status == DNS_ERROR_INVALID_NAME_CHAR), "DnsQuery_A wrong status %lu expected %u or %u\n", dns_status, DNS_ERROR_RCODE_NAME_ERROR, DNS_ERROR_INVALID_NAME_CHAR);
206  if (dp != InvalidPointer && dns_status == NO_ERROR)
207  {
208  ok(strcmp(dp->pName, "127.0.0.1") == 0, "DnsQuery_A returned wrong answer '%s' expected '%s'\n", dp->pName, "127.0.0.1");
209  ok(dp->wType == DNS_TYPE_A, "DnsQuery_A returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
210  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_A returned wrong data size %d\n", dp->wDataLength);
211  ok(dp->Data.A.IpAddress == ntohl(INADDR_LOOPBACK), "DnsQuery_A returned wrong data %ld expected %ld\n", dp->Data.A.IpAddress, ntohl(INADDR_LOOPBACK));
212  }
213  ok(dp == InvalidPointer || broken(dp == NULL), "dp = %p\n", dp);
214  if (dp != InvalidPointer && dns_status == NO_ERROR) DnsRecordListFree(dp, DnsFreeRecordList);
215 
216  dp = InvalidPointer;
217  dns_status = DnsQuery_A(" 127.0. 0.1 ", DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
218  ok(dns_status == DNS_ERROR_RCODE_NAME_ERROR || broken(dns_status == DNS_ERROR_INVALID_NAME_CHAR), "DnsQuery_A wrong status %lu expected %u or %u\n", dns_status, DNS_ERROR_RCODE_NAME_ERROR, DNS_ERROR_INVALID_NAME_CHAR);
219  if (dp == InvalidPointer && dns_status == NO_ERROR)
220  {
221  ok(strcmp(dp->pName, "127.0.0.1") == 0, "DnsQuery_A returned wrong answer '%s' expected '%s'\n", dp->pName, "127.0.0.1");
222  ok(dp->wType == DNS_TYPE_A, "DnsQuery_A returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
223  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_A returned wrong data size %d\n", dp->wDataLength);
224  ok(dp->Data.A.IpAddress == ntohl(INADDR_LOOPBACK), "DnsQuery_A returned wrong data %ld expected %ld\n", dp->Data.A.IpAddress, ntohl(INADDR_LOOPBACK));
225  }
226  ok(dp == InvalidPointer || broken(dp == NULL), "dp = %p\n", dp);
227  if (dp != InvalidPointer && dns_status == NO_ERROR) DnsRecordListFree(dp, DnsFreeRecordList);
228 
229  dp = InvalidPointer;
230  dns_status = DnsQuery_A("localhost ", DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
231  ok(dns_status == ERROR_INVALID_NAME || broken(dns_status == ERROR_TIMEOUT) || broken(dns_status == DNS_ERROR_INVALID_NAME_CHAR), "DnsQuery_A wrong status %lu expected %u or %u or %u\n", dns_status, ERROR_INVALID_NAME, ERROR_TIMEOUT, DNS_ERROR_INVALID_NAME_CHAR);
232  if (dp != InvalidPointer && dns_status == NO_ERROR)
233  {
234  ok(strcmp(dp->pName, "localhost") == 0, "DnsQuery_A returned wrong answer '%s' expected '%s'\n", dp->pName, "localhost");
235  ok(dp->wType == DNS_TYPE_A, "DnsQuery_A returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
236  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_A returned wrong data size %d\n", dp->wDataLength);
237  ok(dp->Data.A.IpAddress == ntohl(INADDR_LOOPBACK), "DnsQuery_A returned wrong data %ld expected %ld\n", dp->Data.A.IpAddress, ntohl(INADDR_LOOPBACK));
238  }
239  ok(dp == InvalidPointer || broken(dp == NULL), "dp = %p\n", dp);
240  if (dp != InvalidPointer && dns_status == NO_ERROR) DnsRecordListFree(dp, DnsFreeRecordList);
241 
242  dp = InvalidPointer;
243  dns_status = DnsQuery_A(" localhost", DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
244  ok(dns_status == ERROR_INVALID_NAME || broken(dns_status == ERROR_TIMEOUT) || broken(dns_status == DNS_ERROR_INVALID_NAME_CHAR), "DnsQuery_A wrong status %lu expected %u or %u or %u\n", dns_status, ERROR_INVALID_NAME, ERROR_TIMEOUT, DNS_ERROR_INVALID_NAME_CHAR);
245  if (dp != InvalidPointer && dns_status == NO_ERROR)
246  {
247  ok(strcmp(dp->pName, "localhost") == 0, "DnsQuery_A returned wrong answer '%s' expected '%s'\n", dp->pName, "localhost");
248  ok(dp->wType == DNS_TYPE_A, "DnsQuery_A returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
249  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_A returned wrong data size %d\n", dp->wDataLength);
250  ok(dp->Data.A.IpAddress == ntohl(INADDR_LOOPBACK), "DnsQuery_A returned wrong data %ld expected %ld\n", dp->Data.A.IpAddress, ntohl(INADDR_LOOPBACK));
251  }
252  ok(dp == InvalidPointer || broken(dp == NULL), "dp = %p\n", dp);
253  if (dp != InvalidPointer && dns_status == NO_ERROR) DnsRecordListFree(dp, DnsFreeRecordList);
254 
255  dp = InvalidPointer;
256  strcpy(test_name, " local host ");
257  dns_status = DnsQuery_A(test_name, DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
258  ok(dns_status == ERROR_INVALID_NAME || broken(dns_status == ERROR_TIMEOUT) || broken(dns_status == DNS_ERROR_INVALID_NAME_CHAR), "DnsQuery_A wrong status %lu expected %u or %u or %u\n", dns_status, ERROR_INVALID_NAME, ERROR_TIMEOUT, DNS_ERROR_INVALID_NAME_CHAR);
259  if (dp != InvalidPointer && dns_status == NO_ERROR)
260  {
261  ok(strcmp(dp->pName, "localhost") == 0, "DnsQuery_A returned wrong answer '%s' expected '%s'\n", dp->pName, "localhost");
262  ok(dp->wType == DNS_TYPE_A, "DnsQuery_A returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
263  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_A returned wrong data size %d\n", dp->wDataLength);
264  ok(dp->Data.A.IpAddress == ntohl(INADDR_LOOPBACK), "DnsQuery_A returned wrong data %ld expected %ld\n", dp->Data.A.IpAddress, ntohl(INADDR_LOOPBACK));
265  }
266  ok(dp == InvalidPointer || broken(dp == NULL), "dp = %p\n", dp);
267  if (dp != InvalidPointer && dns_status == NO_ERROR) DnsRecordListFree(dp, DnsFreeRecordList);
268 
269  //DnsQuery_W:
270  //NULL
271  dp = InvalidPointer;
272  dns_status = DnsQuery_W(NULL, DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
273  if (dns_status == NO_ERROR)
274  {
275  /* Win2003 */
276  ok(dns_status == NO_ERROR, "DnsQuery_W failed with error %lu\n", dns_status);
277  ok(dp != NULL && dp != InvalidPointer, "dp = %p\n", dp);
278  }
279  else
280  {
281  /* Win7 */
282  ok(dns_status == ERROR_INVALID_PARAMETER, "DnsQuery_W failed with error %lu\n", dns_status);
283  ok(dp == InvalidPointer, "dp = %p\n", dp);
284  }
286 
287  //NULL dp
288  dns_status = DnsQuery_W(host_nameW, DNS_TYPE_A, DNS_QUERY_STANDARD, 0, NULL, 0);
289  ok(dns_status == ERROR_INVALID_PARAMETER, "DnsQuery_W failed with error %lu\n", dns_status);
290 
291  //Testing HostName
292  dns_status = DnsQuery_W(host_nameW, DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
293  ok(dns_status == NO_ERROR, "DnsQuery_W failed with error %lu\n", dns_status);
294  if (dp != InvalidPointer)
295  {
296  ok(wcscmp((LPCWSTR)dp->pName, host_nameW) == 0, "DnsQuery_w returned wrong answer '%ls' expected '%ls'\n", (LPCWSTR)dp->pName, host_nameW);
297  ok(dp->wType == DNS_TYPE_A, "DnsQuery_W returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
298  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_w returned wrong data size %d\n", dp->wDataLength);
299  }
300  ok(dp != InvalidPointer && dp != NULL, "dp = %p\n", dp);
302 
303  //127.0.0.1
304  dns_status = DnsQuery_W(L"127.0.0.1", DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
305  ok(dns_status == NO_ERROR, "DnsQuery_W failed with error %lu\n", dns_status);
306  if (dp != InvalidPointer)
307  {
308  ok(wcscmp((LPCWSTR)dp->pName, L"127.0.0.1") == 0, "DnsQuery_W returned wrong answer '%ls' expected '%ls'\n", (LPCWSTR)dp->pName, L"127.0.0.1");
309  ok(dp->wType == DNS_TYPE_A, "DnsQuery_W returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
310  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_W returned wrong data size %d\n", dp->wDataLength);
311  ok(dp->Data.A.IpAddress == ntohl(INADDR_LOOPBACK), "DnsQuery_W returned wrong data %ld expected %ld\n", dp->Data.A.IpAddress, ntohl(INADDR_LOOPBACK));
312  }
313  ok(dp != InvalidPointer && dp != NULL, "dp = %p\n", dp);
315 
316  //Localhost strings
317  dns_status = DnsQuery_W(L"LocalHost", DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
318  ok(dns_status == NO_ERROR, "DnsQuery_W failed with error %lu\n", dns_status);
319  if (dp != InvalidPointer)
320  {
321  ok(wcscmp((LPCWSTR)dp->pName, L"localhost") == 0 || broken(wcscmp((LPCWSTR)dp->pName, L"LocalHost") == 0), "DnsQuery_W returned wrong answer '%ls' expected '%ls'\n", (LPCWSTR)dp->pName, L"localhost");
322  ok(dp->wType == DNS_TYPE_A, "DnsQuery_W returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
323  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_W returned wrong data size %d\n", dp->wDataLength);
324  ok(dp->Data.A.IpAddress == ntohl(INADDR_LOOPBACK), "DnsQuery_W returned wrong data %ld expected %ld\n", dp->Data.A.IpAddress, ntohl(INADDR_LOOPBACK));
325  }
326  ok(dp != InvalidPointer && dp != NULL, "dp = %p\n", dp);
328 
329  dns_status = DnsQuery_W(L"Localhost", DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
330  ok(dns_status == NO_ERROR, "DnsQuery_W failed with error %lu\n", dns_status);
331  if (dp != InvalidPointer)
332  {
333  ok(wcscmp((LPCWSTR)dp->pName, L"localhost") == 0 || broken(wcscmp((LPCWSTR)dp->pName, L"Localhost") == 0), "DnsQuery_W returned wrong answer '%ls' expected '%ls'\n", (LPCWSTR)dp->pName, L"localhost");
334  ok(dp->wType == DNS_TYPE_A, "DnsQuery_W returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
335  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_W returned wrong data size %d\n", dp->wDataLength);
336  ok(dp->Data.A.IpAddress == ntohl(INADDR_LOOPBACK), "DnsQuery_W returned wrong data %ld expected %ld\n", dp->Data.A.IpAddress, ntohl(INADDR_LOOPBACK));
337  }
338  ok(dp != InvalidPointer && dp != NULL, "dp = %p\n", dp);
340 
341  dns_status = DnsQuery_W(L"localhost", DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
342  ok(dns_status == NO_ERROR, "DnsQuery_W failed with error %lu\n", dns_status);
343  if (dp != InvalidPointer)
344  {
345  ok(wcscmp((LPCWSTR)dp->pName, L"localhost") == 0, "DnsQuery_W returned wrong answer '%ls' expected '%ls'\n", (LPCWSTR)dp->pName, L"localhost");
346  ok(dp->wType == DNS_TYPE_A, "DnsQuery_W returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
347  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_W returned wrong data size %d\n", dp->wDataLength);
348  ok(dp->Data.A.IpAddress == ntohl(INADDR_LOOPBACK), "DnsQuery_W returned wrong data %ld expected %ld\n", dp->Data.A.IpAddress, ntohl(INADDR_LOOPBACK));
349  }
350  ok(dp != InvalidPointer && dp != NULL, "dp = %p\n", dp);
352 
353  dns_status = DnsQuery_W(L"", DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
354  ok(dns_status == NO_ERROR, "DnsQuery_W failed with error %lu\n", dns_status);
355  if (dp != InvalidPointer)
356  {
357  /* On Windows 7 is the host on XP is dot ??? */
358  ok(wcscmp((LPCWSTR)dp->pName, L".") == 0 || broken(wcscmp((LPCWSTR)dp->pName, host_nameW) == 0), "DnsQuery_W returned wrong answer '%ls' expected '%ls'\n", (LPCWSTR)dp->pName, host_nameW);
359  ok(dp->wType == DNS_TYPE_A, "DnsQuery_W returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
360  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_W returned wrong data size %d\n", dp->wDataLength);
361  }
362  ok(dp != InvalidPointer && dp != NULL, "dp = %p\n", dp);
364 
365  dp = InvalidPointer;
366  dns_status = DnsQuery_W(L" ", DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
367  ok(dns_status == ERROR_INVALID_NAME || broken(dns_status == ERROR_TIMEOUT) || broken(dns_status == DNS_ERROR_INVALID_NAME_CHAR), "DnsQuery_W wrong status %lu expected %u or %u or %d\n", dns_status, ERROR_INVALID_NAME, ERROR_TIMEOUT, DNS_ERROR_INVALID_NAME_CHAR);
368  if (dp != InvalidPointer && dns_status == NO_ERROR)
369  {
370  ok(wcscmp((LPCWSTR)dp->pName, L"localhost") == 0, "DnsQuery_W returned wrong answer '%ls' expected '%ls'\n", (LPCWSTR)dp->pName, L"localhost");
371  ok(dp->wType == DNS_TYPE_A, "DnsQuery_W returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
372  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_W returned wrong data size %d\n", dp->wDataLength);
373  ok(dp->Data.A.IpAddress == ntohl(INADDR_LOOPBACK), "DnsQuery_W returned wrong data %ld expected %ld\n", dp->Data.A.IpAddress, ntohl(INADDR_LOOPBACK));
374  }
375  ok(dp == NULL || broken(dp == InvalidPointer), "dp = %p\n", dp);
376  if (dp != InvalidPointer && dns_status == NO_ERROR) DnsRecordListFree(dp, DnsFreeRecordList);
377 
378  dns_status = DnsQuery_W(L"0.0.0.0", DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
379  ok(dns_status == NO_ERROR, "DnsQuery_W failed with error %lu\n", dns_status);
380  if (dp != InvalidPointer)
381  {
382  ok(wcscmp((LPCWSTR)dp->pName, L"0.0.0.0") == 0, "DnsQuery_W returned wrong answer '%ls' expected '%ls'\n", (LPCWSTR)dp->pName, L"0.0.0.0");
383  ok(dp->wType == DNS_TYPE_A, "DnsQuery_W returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
384  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_W returned wrong data size %d\n", dp->wDataLength);
385  ok(dp->Data.A.IpAddress == ntohl(INADDR_ANY), "DnsQuery_W returned wrong data %ld expected %ld\n", dp->Data.A.IpAddress, ntohl(INADDR_ANY));
386  }
387  ok(dp != InvalidPointer && dp != NULL, "dp = %p\n", dp);
389 
390  dp = InvalidPointer;
391  dns_status = DnsQuery_W(L"0.0.0.0 ", DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
392  ok(dns_status == NO_ERROR || broken(dns_status == DNS_ERROR_INVALID_NAME_CHAR), "DnsQuery_W wrong status %lu expected %u or %u\n", dns_status, NO_ERROR, DNS_ERROR_INVALID_NAME_CHAR);
393  if (dp != InvalidPointer && dns_status == NO_ERROR)
394  {
395  ok(wcscmp((LPCWSTR)dp->pName, L"0.0.0.0") == 0 || broken(wcscmp((LPCWSTR)dp->pName, L"0.0.0.0 ") == 0), "DnsQuery_W returned wrong answer '%ls' expected '%ls'\n", (LPCWSTR)dp->pName, L"0.0.0.0");
396  ok(dp->wType == DNS_TYPE_A, "DnsQuery_W returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
397  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_W returned wrong data size %d\n", dp->wDataLength);
398  ok(dp->Data.A.IpAddress == ntohl(INADDR_ANY), "DnsQuery_W returned wrong data %ld expected %ld\n", dp->Data.A.IpAddress, ntohl(INADDR_ANY));
399  }
400  ok(dp != InvalidPointer || broken(dp == InvalidPointer) || broken(dp == NULL), "dp = %p\n", dp);
401  if (dp != InvalidPointer && dns_status == NO_ERROR) DnsRecordListFree(dp, DnsFreeRecordList);
402 
403  dp = InvalidPointer;
404  dns_status = DnsQuery_W(L"127.0.0.1 ", DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
405  ok(dns_status == NO_ERROR || broken(dns_status == DNS_ERROR_INVALID_NAME_CHAR), "DnsQuery_W wrong status %lu expected %u or %u\n", dns_status, NO_ERROR, DNS_ERROR_INVALID_NAME_CHAR);
406  if (dp != InvalidPointer && dns_status == NO_ERROR)
407  {
408  ok(wcscmp((LPCWSTR)dp->pName, L"127.0.0.1") == 0 || broken(wcscmp((LPCWSTR)dp->pName, L"127.0.0.1 ") == 0), "DnsQuery_W returned wrong answer '%ls' expected '%ls'\n", (LPCWSTR)dp->pName, L"127.0.0.1");
409  ok(dp->wType == DNS_TYPE_A, "DnsQuery_W returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
410  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_W returned wrong data size %d\n", dp->wDataLength);
411  ok(dp->Data.A.IpAddress == ntohl(INADDR_LOOPBACK), "DnsQuery_W returned wrong data %ld expected %ld\n", dp->Data.A.IpAddress, ntohl(INADDR_LOOPBACK));
412  }
413  ok(dp != InvalidPointer || broken(dp == InvalidPointer) || broken(dp == NULL), "dp = %p\n", dp);
414  if (dp != InvalidPointer && dns_status == NO_ERROR) DnsRecordListFree(dp, DnsFreeRecordList);
415 
416  dp = InvalidPointer;
417  dns_status = DnsQuery_W(L" 127.0.0.1 ", DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
418  ok(dns_status == DNS_ERROR_RCODE_NAME_ERROR || broken(dns_status == DNS_ERROR_INVALID_NAME_CHAR), "DnsQuery_W wrong status %lu expected %u or %u\n", dns_status, DNS_ERROR_RCODE_NAME_ERROR, DNS_ERROR_INVALID_NAME_CHAR);
419  if (dp != InvalidPointer && dns_status == NO_ERROR)
420  {
421  ok(wcscmp((LPCWSTR)dp->pName, L"localhost") == 0, "DnsQuery_W returned wrong answer '%ls' expected '%ls'\n", (LPCWSTR)dp->pName, L"localhost");
422  ok(dp->wType == DNS_TYPE_A, "DnsQuery_W returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
423  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_W returned wrong data size %d\n", dp->wDataLength);
424  ok(dp->Data.A.IpAddress == ntohl(INADDR_LOOPBACK), "DnsQuery_W returned wrong data %ld expected %ld\n", dp->Data.A.IpAddress, ntohl(INADDR_LOOPBACK));
425  }
426  ok(dp == NULL || broken(dp == InvalidPointer), "dp = %p\n", dp);
427  if (dp != InvalidPointer && dns_status == NO_ERROR) DnsRecordListFree(dp, DnsFreeRecordList);
428 
429  dp = InvalidPointer;
430  dns_status = DnsQuery_W(L" 127.0. 0.1 ", DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
431  ok(dns_status == DNS_ERROR_RCODE_NAME_ERROR || broken(dns_status == DNS_ERROR_INVALID_NAME_CHAR), "DnsQuery_W wrong status %lu expected %u or %u\n", dns_status, DNS_ERROR_RCODE_NAME_ERROR, DNS_ERROR_INVALID_NAME_CHAR);
432  if (dp != InvalidPointer && dns_status == NO_ERROR)
433  {
434  ok(wcscmp((LPCWSTR)dp->pName, L"localhost") == 0, "DnsQuery_W returned wrong answer '%ls' expected '%ls'\n", (LPCWSTR)dp->pName, L"localhost");
435  ok(dp->wType == DNS_TYPE_A, "DnsQuery_W returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
436  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_W returned wrong data size %d\n", dp->wDataLength);
437  ok(dp->Data.A.IpAddress == ntohl(INADDR_LOOPBACK), "DnsQuery_W returned wrong data %ld expected %ld\n", dp->Data.A.IpAddress, ntohl(INADDR_LOOPBACK));
438  }
439  ok(dp == NULL || broken(dp == InvalidPointer), "dp = %p\n", dp);
440  if (dp != InvalidPointer && dns_status == NO_ERROR) DnsRecordListFree(dp, DnsFreeRecordList);
441 
442  dp = InvalidPointer;
443  dns_status = DnsQuery_W(L"localhost ", DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
444  ok(dns_status == ERROR_INVALID_NAME || broken(dns_status == ERROR_TIMEOUT) || broken(dns_status == DNS_ERROR_INVALID_NAME_CHAR), "DnsQuery_W wrong status %lu expected %u or %u or %u\n", dns_status, ERROR_INVALID_NAME, ERROR_TIMEOUT, DNS_ERROR_INVALID_NAME_CHAR);
445  if (dp != InvalidPointer && dns_status == NO_ERROR)
446  {
447  ok(wcscmp((LPCWSTR)dp->pName, L"localhost") == 0, "DnsQuery_W returned wrong answer '%ls' expected '%ls'\n", (LPCWSTR)dp->pName, L"localhost");
448  ok(dp->wType == DNS_TYPE_A, "DnsQuery_W returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
449  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_W returned wrong data size %d\n", dp->wDataLength);
450  ok(dp->Data.A.IpAddress == ntohl(INADDR_LOOPBACK), "DnsQuery_W returned wrong data %ld expected %ld\n", dp->Data.A.IpAddress, ntohl(INADDR_LOOPBACK));
451  }
452  ok(dp == NULL || broken(dp == InvalidPointer), "dp = %p\n", dp);
453  if (dp != InvalidPointer && dns_status == NO_ERROR) DnsRecordListFree(dp, DnsFreeRecordList);
454 
455  dp = InvalidPointer;
456  dns_status = DnsQuery_W(L" localhost", DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
457  ok(dns_status == ERROR_INVALID_NAME || broken(dns_status == ERROR_TIMEOUT) || broken(dns_status == DNS_ERROR_INVALID_NAME_CHAR), "DnsQuery_W wrong status %lu expected %u or %u or %u\n", dns_status, ERROR_INVALID_NAME, ERROR_TIMEOUT, DNS_ERROR_INVALID_NAME_CHAR);
458  if (dp != InvalidPointer && dns_status == NO_ERROR)
459  {
460  ok(wcscmp((LPCWSTR)dp->pName, L"localhost") == 0, "DnsQuery_W returned wrong answer '%ls' expected '%ls'\n", (LPCWSTR)dp->pName, L"localhost");
461  ok(dp->wType == DNS_TYPE_A, "DnsQuery_W returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
462  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_W returned wrong data size %d\n", dp->wDataLength);
463  ok(dp->Data.A.IpAddress == ntohl(INADDR_LOOPBACK), "DnsQuery_W returned wrong data %ld expected %ld\n", dp->Data.A.IpAddress, ntohl(INADDR_LOOPBACK));
464  }
465  ok(dp == NULL || broken(dp == InvalidPointer), "dp = %p\n", dp);
466  if (dp != InvalidPointer && dns_status == NO_ERROR) DnsRecordListFree(dp, DnsFreeRecordList);
467 
468  dp = InvalidPointer;
469  wcscpy(test_nameW, L" local host ");
470  dns_status = DnsQuery_W(test_nameW, DNS_TYPE_A, DNS_QUERY_STANDARD, 0, &dp, 0);
471  ok(dns_status == ERROR_INVALID_NAME || broken(dns_status == ERROR_TIMEOUT) || broken(dns_status == DNS_ERROR_INVALID_NAME_CHAR), "DnsQuery_W wrong status %lu expected %u or %u or %u\n", dns_status, ERROR_INVALID_NAME, ERROR_TIMEOUT, DNS_ERROR_INVALID_NAME_CHAR);
472  if (dp != InvalidPointer && dns_status == NO_ERROR)
473  {
474  ok(wcscmp((LPCWSTR)dp->pName, L"localhost") == 0, "DnsQuery_W returned wrong answer '%ls' expected '%ls'\n", (LPCWSTR)dp->pName, L"localhost");
475  ok(dp->wType == DNS_TYPE_A, "DnsQuery_W returned wrong type %d expected %d\n", dp->wType, DNS_TYPE_A);
476  ok(dp->wDataLength == sizeof(IP4_ADDRESS), "DnsQuery_W returned wrong data size %d\n", dp->wDataLength);
477  ok(dp->Data.A.IpAddress == ntohl(INADDR_LOOPBACK), "DnsQuery_W returned wrong data %ld expected %ld\n", dp->Data.A.IpAddress, ntohl(INADDR_LOOPBACK));
478  }
479  ok(dp == NULL || broken(dp == InvalidPointer), "dp = %p\n", dp);
480  if (dp != InvalidPointer && dns_status == NO_ERROR) DnsRecordListFree(dp, DnsFreeRecordList);
481 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
#define DNS_TYPE_A
Definition: windns.h:41
#define ERROR_SUCCESS
Definition: deptool.c:10
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
size_t __cdecl mbstowcs(_Out_writes_opt_z_(_MaxCount) wchar_t *_Dest, _In_z_ const char *_Source, _In_ size_t _MaxCount)
#define ERROR_TIMEOUT
Definition: winerror.h:941
#define DNS_QUERY_STANDARD
Definition: windns.h:8
#define INADDR_ANY
Definition: StrAddr.c:4
#define NO_ERROR
Definition: dderror.h:5
#define DNS_ERROR_RCODE_NAME_ERROR
Definition: winerror.h:1850
DNS_STATUS WINAPI DnsQuery_A(LPCSTR Name, WORD Type, DWORD Options, PIP4_ARRAY Servers, PDNS_RECORD *QueryResultSet, PVOID *Reserved)
Definition: query.c:97
#define ok(value,...)
DWORD WINAPI GetNetworkParams(PFIXED_INFO pFixedInfo, PULONG pOutBufLen)
smooth NULL
Definition: ftsmooth.c:416
char DomainName[MAX_DOMAIN_NAME_LEN+4]
Definition: iptypes.h:82
#define PDNS_RECORD
Definition: windns.h:636
#define InvalidPointer
__kernel_size_t size_t
Definition: linux.h:237
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
VOID WINAPI DnsRecordListFree(PDNS_RECORD list, DNS_FREE_TYPE type)
Definition: record.c:526
DWORD IP4_ADDRESS
Definition: windns.h:36
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
static const WCHAR L[]
Definition: oid.c:1250
char HostName[MAX_HOSTNAME_LEN+4]
Definition: iptypes.h:81
struct FIXED_INFO * PFIXED_INFO
#define broken(x)
Definition: _sntprintf.h:21
static const char * test_name
Definition: run.c:166
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#define skip(...)
#define DNS_ERROR_INVALID_NAME_CHAR
Definition: winerror.h:1877
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
unsigned int ULONG
Definition: retypes.h:1
#define INADDR_LOOPBACK
Definition: winsock.h:312
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
#define ERROR_INVALID_NAME
Definition: compat.h:93
DNS_STATUS WINAPI DnsQuery_W(LPCWSTR Name, WORD Type, DWORD Options, PIP4_ARRAY Servers, PDNS_RECORD *QueryResultSet, PVOID *Reserved)
Definition: query.c:593
#define HeapFree(x, y, z)
Definition: compat.h:394
#define ntohl(x)
Definition: module.h:203

Referenced by START_TEST().