ok(dns_status==NO_ERROR,"DnsQuery_A failed with error %lu\n",dns_status);
if(dp!=InvalidPointer)
{
/* On Windows 7 is the host on XP is dot ??? */
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);
ok(dp->wType==DNS_TYPE_A,"DnsQuery_A returned wrong type %d expected %d\n",dp->wType,DNS_TYPE_A);
ok(dp->wDataLength==sizeof(IP4_ADDRESS),"DnsQuery_A returned wrong data size %d\n",dp->wDataLength);
/* On Windows 7 is DNS_ERROR_INVALID_NAME_CHAR on XP is ERROR_TIMEOUT on Win 2k3 is ERROR_INVALID_NAME*/
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);
if(dp!=InvalidPointer&&dns_status==NO_ERROR)
{
ok(strcmp(dp->pName,host_name)==0,"DnsQuery_A returned wrong answer '%s' expected '%s'\n",dp->pName,host_name);
ok(dp->wType==DNS_TYPE_A,"DnsQuery_A returned wrong type %d expected %d\n",dp->wType,DNS_TYPE_A);
ok(dp->wDataLength==sizeof(IP4_ADDRESS),"DnsQuery_A returned wrong data size %d\n",dp->wDataLength);
/* On windows 7 fails with DNS_ERROR_INVALID_NAME_CHAR on XP no error */
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);
if(dp!=InvalidPointer&&dns_status==NO_ERROR)
{
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 ");
ok(dp->wType==DNS_TYPE_A,"DnsQuery_A returned wrong type %d expected %d\n",dp->wType,DNS_TYPE_A);
ok(dp->wDataLength==sizeof(IP4_ADDRESS),"DnsQuery_A returned wrong data size %d\n",dp->wDataLength);
ok(dp->Data.A.IpAddress==ntohl(INADDR_ANY),"DnsQuery_A returned wrong data %ld expected %ld\n",dp->Data.A.IpAddress,ntohl(INADDR_ANY));
/* On windows 7 fails with DNS_ERROR_INVALID_NAME_CHAR on XP no error */
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);
if(dp!=InvalidPointer&&dns_status==NO_ERROR)
{
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 ");
ok(dp->wType==DNS_TYPE_A,"DnsQuery_A returned wrong type %d expected %d\n",dp->wType,DNS_TYPE_A);
ok(dp->wDataLength==sizeof(IP4_ADDRESS),"DnsQuery_A returned wrong data size %d\n",dp->wDataLength);
ok(dp->Data.A.IpAddress==ntohl(INADDR_LOOPBACK),"DnsQuery_A returned wrong data %ld expected %ld\n",dp->Data.A.IpAddress,ntohl(INADDR_LOOPBACK));
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);
if(dp!=InvalidPointer&&dns_status==NO_ERROR)
{
ok(strcmp(dp->pName,"127.0.0.1")==0,"DnsQuery_A returned wrong answer '%s' expected '%s'\n",dp->pName,"127.0.0.1");
ok(dp->wType==DNS_TYPE_A,"DnsQuery_A returned wrong type %d expected %d\n",dp->wType,DNS_TYPE_A);
ok(dp->wDataLength==sizeof(IP4_ADDRESS),"DnsQuery_A returned wrong data size %d\n",dp->wDataLength);
ok(dp->Data.A.IpAddress==ntohl(INADDR_LOOPBACK),"DnsQuery_A returned wrong data %ld expected %ld\n",dp->Data.A.IpAddress,ntohl(INADDR_LOOPBACK));
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);
if(dp==InvalidPointer&&dns_status==NO_ERROR)
{
ok(strcmp(dp->pName,"127.0.0.1")==0,"DnsQuery_A returned wrong answer '%s' expected '%s'\n",dp->pName,"127.0.0.1");
ok(dp->wType==DNS_TYPE_A,"DnsQuery_A returned wrong type %d expected %d\n",dp->wType,DNS_TYPE_A);
ok(dp->wDataLength==sizeof(IP4_ADDRESS),"DnsQuery_A returned wrong data size %d\n",dp->wDataLength);
ok(dp->Data.A.IpAddress==ntohl(INADDR_LOOPBACK),"DnsQuery_A returned wrong data %ld expected %ld\n",dp->Data.A.IpAddress,ntohl(INADDR_LOOPBACK));
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);
if(dp!=InvalidPointer&&dns_status==NO_ERROR)
{
ok(strcmp(dp->pName,"localhost")==0,"DnsQuery_A returned wrong answer '%s' expected '%s'\n",dp->pName,"localhost");
ok(dp->wType==DNS_TYPE_A,"DnsQuery_A returned wrong type %d expected %d\n",dp->wType,DNS_TYPE_A);
ok(dp->wDataLength==sizeof(IP4_ADDRESS),"DnsQuery_A returned wrong data size %d\n",dp->wDataLength);
ok(dp->Data.A.IpAddress==ntohl(INADDR_LOOPBACK),"DnsQuery_A returned wrong data %ld expected %ld\n",dp->Data.A.IpAddress,ntohl(INADDR_LOOPBACK));
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);
if(dp!=InvalidPointer&&dns_status==NO_ERROR)
{
ok(strcmp(dp->pName,"localhost")==0,"DnsQuery_A returned wrong answer '%s' expected '%s'\n",dp->pName,"localhost");
ok(dp->wType==DNS_TYPE_A,"DnsQuery_A returned wrong type %d expected %d\n",dp->wType,DNS_TYPE_A);
ok(dp->wDataLength==sizeof(IP4_ADDRESS),"DnsQuery_A returned wrong data size %d\n",dp->wDataLength);
ok(dp->Data.A.IpAddress==ntohl(INADDR_LOOPBACK),"DnsQuery_A returned wrong data %ld expected %ld\n",dp->Data.A.IpAddress,ntohl(INADDR_LOOPBACK));
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);
if(dp!=InvalidPointer&&dns_status==NO_ERROR)
{
ok(strcmp(dp->pName,"localhost")==0,"DnsQuery_A returned wrong answer '%s' expected '%s'\n",dp->pName,"localhost");
ok(dp->wType==DNS_TYPE_A,"DnsQuery_A returned wrong type %d expected %d\n",dp->wType,DNS_TYPE_A);
ok(dp->wDataLength==sizeof(IP4_ADDRESS),"DnsQuery_A returned wrong data size %d\n",dp->wDataLength);
ok(dp->Data.A.IpAddress==ntohl(INADDR_LOOPBACK),"DnsQuery_A returned wrong data %ld expected %ld\n",dp->Data.A.IpAddress,ntohl(INADDR_LOOPBACK));
ok(dns_status==NO_ERROR,"DnsQuery_UTF8 failed with error %lu\n",dns_status);
if(dp!=InvalidPointer)
{
/* On Windows 7 is the host on XP is dot ??? */
ok(strcmp(dp->pName,".")==0||broken(strcmp(dp->pName,host_name)==0),"DnsQuery_UTF8 returned wrong answer '%s' expected '%s' or '.'\n",dp->pName,host_name);
ok(dp->wType==DNS_TYPE_A,"DnsQuery_UTF8 returned wrong type %d expected %d\n",dp->wType,DNS_TYPE_A);
ok(dp->wDataLength==sizeof(IP4_ADDRESS),"DnsQuery_UTF8 returned wrong data size %d\n",dp->wDataLength);
/* On Windows 7 is DNS_ERROR_INVALID_NAME_CHAR on XP is ERROR_TIMEOUT on Win 2k3 is ERROR_INVALID_NAME*/
ok(dns_status==ERROR_INVALID_NAME||broken(dns_status==ERROR_TIMEOUT)||broken(dns_status==DNS_ERROR_INVALID_NAME_CHAR),"DnsQuery_UTF8 failed with error %lu expected %u or %u or %u\n",dns_status,ERROR_INVALID_NAME,ERROR_TIMEOUT,DNS_ERROR_INVALID_NAME_CHAR);
if(dp!=InvalidPointer&&dns_status==NO_ERROR)
{
ok(strcmp(dp->pName,host_name)==0,"DnsQuery_UTF8 returned wrong answer '%s' expected '%s'\n",dp->pName,host_name);
ok(dp->wType==DNS_TYPE_A,"DnsQuery_UTF8 returned wrong type %d expected %d\n",dp->wType,DNS_TYPE_A);
ok(dp->wDataLength==sizeof(IP4_ADDRESS),"DnsQuery_UTF8 returned wrong data size %d\n",dp->wDataLength);
/* On windows 7 fails with DNS_ERROR_INVALID_NAME_CHAR on XP no error */
ok(dns_status==NO_ERROR||broken(dns_status==DNS_ERROR_INVALID_NAME_CHAR),"DnsQuery_UTF8 wrong status %lu expected %u or %u\n",dns_status,NO_ERROR,DNS_ERROR_INVALID_NAME_CHAR);
if(dp!=InvalidPointer&&dns_status==NO_ERROR)
{
ok(strcmp(dp->pName,"0.0.0.0")==0||broken(strcmp(dp->pName,"0.0.0.0 ")==0),"DnsQuery_UTF8 returned wrong answer '%s' expected '%s' or '%s'\n",dp->pName,"0.0.0.0","0.0.0.0 ");
ok(dp->wType==DNS_TYPE_A,"DnsQuery_UTF8 returned wrong type %d expected %d\n",dp->wType,DNS_TYPE_A);
ok(dp->wDataLength==sizeof(IP4_ADDRESS),"DnsQuery_UTF8 returned wrong data size %d\n",dp->wDataLength);
ok(dp->Data.A.IpAddress==ntohl(INADDR_ANY),"DnsQuery_UTF8 returned wrong data %ld expected %ld\n",dp->Data.A.IpAddress,ntohl(INADDR_ANY));
/* On windows 7 fails with DNS_ERROR_INVALID_NAME_CHAR on XP no error */
ok(dns_status==NO_ERROR||broken(dns_status==DNS_ERROR_INVALID_NAME_CHAR),"DnsQuery_UTF8 wrong status %lu expected %u or %u\n",dns_status,NO_ERROR,DNS_ERROR_INVALID_NAME_CHAR);
if(dp!=InvalidPointer&&dns_status==NO_ERROR)
{
ok(strcmp(dp->pName,"127.0.0.1")==0||strcmp(dp->pName,"127.0.0.1 ")==0,"DnsQuery_UTF8 returned wrong answer '%s' expected '%s' or '%s'\n",dp->pName,"127.0.0.1","127.0.0.1 ");
ok(dp->wType==DNS_TYPE_A,"DnsQuery_UTF8 returned wrong type %d expected %d\n",dp->wType,DNS_TYPE_A);
ok(dp->wDataLength==sizeof(IP4_ADDRESS),"DnsQuery_UTF8 returned wrong data size %d\n",dp->wDataLength);
ok(dp->Data.A.IpAddress==ntohl(INADDR_LOOPBACK),"DnsQuery_UTF8 returned wrong data %ld expected %ld\n",dp->Data.A.IpAddress,ntohl(INADDR_LOOPBACK));
ok(dns_status==DNS_ERROR_RCODE_NAME_ERROR||broken(dns_status==DNS_ERROR_INVALID_NAME_CHAR),"DnsQuery_UTF8 wrong status %lu expected %u or %u\n",dns_status,DNS_ERROR_RCODE_NAME_ERROR,DNS_ERROR_INVALID_NAME_CHAR);
if(dp!=InvalidPointer&&dns_status==NO_ERROR)
{
ok(strcmp(dp->pName,"127.0.0.1")==0,"DnsQuery_UTF8 returned wrong answer '%s' expected '%s'\n",dp->pName,"127.0.0.1");
ok(dp->wType==DNS_TYPE_A,"DnsQuery_UTF8 returned wrong type %d expected %d\n",dp->wType,DNS_TYPE_A);
ok(dp->wDataLength==sizeof(IP4_ADDRESS),"DnsQuery_UTF8 returned wrong data size %d\n",dp->wDataLength);
ok(dp->Data.A.IpAddress==ntohl(INADDR_LOOPBACK),"DnsQuery_UTF8 returned wrong data %ld expected %ld\n",dp->Data.A.IpAddress,ntohl(INADDR_LOOPBACK));
ok(dns_status==DNS_ERROR_RCODE_NAME_ERROR||broken(dns_status==DNS_ERROR_INVALID_NAME_CHAR),"DnsQuery_UTF8 wrong status %lu expected %u or %u\n",dns_status,DNS_ERROR_RCODE_NAME_ERROR,DNS_ERROR_INVALID_NAME_CHAR);
if(dp==InvalidPointer&&dns_status==NO_ERROR)
{
ok(strcmp(dp->pName,"127.0.0.1")==0,"DnsQuery_UTF8 returned wrong answer '%s' expected '%s'\n",dp->pName,"127.0.0.1");
ok(dp->wType==DNS_TYPE_A,"DnsQuery_UTF8 returned wrong type %d expected %d\n",dp->wType,DNS_TYPE_A);
ok(dp->wDataLength==sizeof(IP4_ADDRESS),"DnsQuery_UTF8 returned wrong data size %d\n",dp->wDataLength);
ok(dp->Data.A.IpAddress==ntohl(INADDR_LOOPBACK),"DnsQuery_UTF8 returned wrong data %ld expected %ld\n",dp->Data.A.IpAddress,ntohl(INADDR_LOOPBACK));
ok(dns_status==ERROR_INVALID_NAME||broken(dns_status==ERROR_TIMEOUT)||broken(dns_status==DNS_ERROR_INVALID_NAME_CHAR),"DnsQuery_UTF8 wrong status %lu expected %u or %u or %u\n",dns_status,ERROR_INVALID_NAME,ERROR_TIMEOUT,DNS_ERROR_INVALID_NAME_CHAR);
if(dp!=InvalidPointer&&dns_status==NO_ERROR)
{
ok(strcmp(dp->pName,"localhost")==0,"DnsQuery_UTF8 returned wrong answer '%s' expected '%s'\n",dp->pName,"localhost");
ok(dp->wType==DNS_TYPE_A,"DnsQuery_UTF8 returned wrong type %d expected %d\n",dp->wType,DNS_TYPE_A);
ok(dp->wDataLength==sizeof(IP4_ADDRESS),"DnsQuery_UTF8 returned wrong data size %d\n",dp->wDataLength);
ok(dp->Data.A.IpAddress==ntohl(INADDR_LOOPBACK),"DnsQuery_UTF8 returned wrong data %ld expected %ld\n",dp->Data.A.IpAddress,ntohl(INADDR_LOOPBACK));
ok(dns_status==ERROR_INVALID_NAME||broken(dns_status==ERROR_TIMEOUT)||broken(dns_status==DNS_ERROR_INVALID_NAME_CHAR),"DnsQuery_UTF8 wrong status %lu expected %u or %u or %u\n",dns_status,ERROR_INVALID_NAME,ERROR_TIMEOUT,DNS_ERROR_INVALID_NAME_CHAR);
if(dp!=InvalidPointer&&dns_status==NO_ERROR)
{
ok(strcmp(dp->pName,"localhost")==0,"DnsQuery_UTF8 returned wrong answer '%s' expected '%s'\n",dp->pName,"localhost");
ok(dp->wType==DNS_TYPE_A,"DnsQuery_UTF8 returned wrong type %d expected %d\n",dp->wType,DNS_TYPE_A);
ok(dp->wDataLength==sizeof(IP4_ADDRESS),"DnsQuery_UTF8 returned wrong data size %d\n",dp->wDataLength);
ok(dp->Data.A.IpAddress==ntohl(INADDR_LOOPBACK),"DnsQuery_UTF8 returned wrong data %ld expected %ld\n",dp->Data.A.IpAddress,ntohl(INADDR_LOOPBACK));
ok(dns_status==ERROR_INVALID_NAME||broken(dns_status==ERROR_TIMEOUT)||broken(dns_status==DNS_ERROR_INVALID_NAME_CHAR),"DnsQuery_UTF8 wrong status %lu expected %u or %u or %u\n",dns_status,ERROR_INVALID_NAME,ERROR_TIMEOUT,DNS_ERROR_INVALID_NAME_CHAR);
if(dp!=InvalidPointer&&dns_status==NO_ERROR)
{
ok(strcmp(dp->pName,"localhost")==0,"DnsQuery_UTF8 returned wrong answer '%s' expected '%s'\n",dp->pName,"localhost");
ok(dp->wType==DNS_TYPE_A,"DnsQuery_UTF8 returned wrong type %d expected %d\n",dp->wType,DNS_TYPE_A);
ok(dp->wDataLength==sizeof(IP4_ADDRESS),"DnsQuery_UTF8 returned wrong data size %d\n",dp->wDataLength);
ok(dp->Data.A.IpAddress==ntohl(INADDR_LOOPBACK),"DnsQuery_UTF8 returned wrong data %ld expected %ld\n",dp->Data.A.IpAddress,ntohl(INADDR_LOOPBACK));
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);
if(dp!=InvalidPointer&&dns_status==NO_ERROR)
{
ok(wcscmp((LPCWSTR)dp->pName,L"localhost")==0,"DnsQuery_W returned wrong answer '%ls' expected '%ls'\n",(LPCWSTR)dp->pName,L"localhost");
ok(dp->wType==DNS_TYPE_A,"DnsQuery_W returned wrong type %d expected %d\n",dp->wType,DNS_TYPE_A);
ok(dp->wDataLength==sizeof(IP4_ADDRESS),"DnsQuery_W returned wrong data size %d\n",dp->wDataLength);
ok(dp->Data.A.IpAddress==ntohl(INADDR_LOOPBACK),"DnsQuery_W returned wrong data %ld expected %ld\n",dp->Data.A.IpAddress,ntohl(INADDR_LOOPBACK));
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);
if(dp!=InvalidPointer&&dns_status==NO_ERROR)
{
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");
ok(dp->wType==DNS_TYPE_A,"DnsQuery_W returned wrong type %d expected %d\n",dp->wType,DNS_TYPE_A);
ok(dp->wDataLength==sizeof(IP4_ADDRESS),"DnsQuery_W returned wrong data size %d\n",dp->wDataLength);
ok(dp->Data.A.IpAddress==ntohl(INADDR_ANY),"DnsQuery_W returned wrong data %ld expected %ld\n",dp->Data.A.IpAddress,ntohl(INADDR_ANY));
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);
if(dp!=InvalidPointer&&dns_status==NO_ERROR)
{
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");
ok(dp->wType==DNS_TYPE_A,"DnsQuery_W returned wrong type %d expected %d\n",dp->wType,DNS_TYPE_A);
ok(dp->wDataLength==sizeof(IP4_ADDRESS),"DnsQuery_W returned wrong data size %d\n",dp->wDataLength);
ok(dp->Data.A.IpAddress==ntohl(INADDR_LOOPBACK),"DnsQuery_W returned wrong data %ld expected %ld\n",dp->Data.A.IpAddress,ntohl(INADDR_LOOPBACK));
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);
if(dp!=InvalidPointer&&dns_status==NO_ERROR)
{
ok(wcscmp((LPCWSTR)dp->pName,L"localhost")==0,"DnsQuery_W returned wrong answer '%ls' expected '%ls'\n",(LPCWSTR)dp->pName,L"localhost");
ok(dp->wType==DNS_TYPE_A,"DnsQuery_W returned wrong type %d expected %d\n",dp->wType,DNS_TYPE_A);
ok(dp->wDataLength==sizeof(IP4_ADDRESS),"DnsQuery_W returned wrong data size %d\n",dp->wDataLength);
ok(dp->Data.A.IpAddress==ntohl(INADDR_LOOPBACK),"DnsQuery_W returned wrong data %ld expected %ld\n",dp->Data.A.IpAddress,ntohl(INADDR_LOOPBACK));
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);
if(dp!=InvalidPointer&&dns_status==NO_ERROR)
{
ok(wcscmp((LPCWSTR)dp->pName,L"localhost")==0,"DnsQuery_W returned wrong answer '%ls' expected '%ls'\n",(LPCWSTR)dp->pName,L"localhost");
ok(dp->wType==DNS_TYPE_A,"DnsQuery_W returned wrong type %d expected %d\n",dp->wType,DNS_TYPE_A);
ok(dp->wDataLength==sizeof(IP4_ADDRESS),"DnsQuery_W returned wrong data size %d\n",dp->wDataLength);
ok(dp->Data.A.IpAddress==ntohl(INADDR_LOOPBACK),"DnsQuery_W returned wrong data %ld expected %ld\n",dp->Data.A.IpAddress,ntohl(INADDR_LOOPBACK));
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);
if(dp!=InvalidPointer&&dns_status==NO_ERROR)
{
ok(wcscmp((LPCWSTR)dp->pName,L"localhost")==0,"DnsQuery_W returned wrong answer '%ls' expected '%ls'\n",(LPCWSTR)dp->pName,L"localhost");
ok(dp->wType==DNS_TYPE_A,"DnsQuery_W returned wrong type %d expected %d\n",dp->wType,DNS_TYPE_A);
ok(dp->wDataLength==sizeof(IP4_ADDRESS),"DnsQuery_W returned wrong data size %d\n",dp->wDataLength);
ok(dp->Data.A.IpAddress==ntohl(INADDR_LOOPBACK),"DnsQuery_W returned wrong data %ld expected %ld\n",dp->Data.A.IpAddress,ntohl(INADDR_LOOPBACK));
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);
if(dp!=InvalidPointer&&dns_status==NO_ERROR)
{
ok(wcscmp((LPCWSTR)dp->pName,L"localhost")==0,"DnsQuery_W returned wrong answer '%ls' expected '%ls'\n",(LPCWSTR)dp->pName,L"localhost");
ok(dp->wType==DNS_TYPE_A,"DnsQuery_W returned wrong type %d expected %d\n",dp->wType,DNS_TYPE_A);
ok(dp->wDataLength==sizeof(IP4_ADDRESS),"DnsQuery_W returned wrong data size %d\n",dp->wDataLength);
ok(dp->Data.A.IpAddress==ntohl(INADDR_LOOPBACK),"DnsQuery_W returned wrong data %ld expected %ld\n",dp->Data.A.IpAddress,ntohl(INADDR_LOOPBACK));
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);
if(dp!=InvalidPointer&&dns_status==NO_ERROR)
{
ok(wcscmp((LPCWSTR)dp->pName,L"localhost")==0,"DnsQuery_W returned wrong answer '%ls' expected '%ls'\n",(LPCWSTR)dp->pName,L"localhost");
ok(dp->wType==DNS_TYPE_A,"DnsQuery_W returned wrong type %d expected %d\n",dp->wType,DNS_TYPE_A);
ok(dp->wDataLength==sizeof(IP4_ADDRESS),"DnsQuery_W returned wrong data size %d\n",dp->wDataLength);
ok(dp->Data.A.IpAddress==ntohl(INADDR_LOOPBACK),"DnsQuery_W returned wrong data %ld expected %ld\n",dp->Data.A.IpAddress,ntohl(INADDR_LOOPBACK));