[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 665
  • Last Modified:

DnsQuery failed with errorcode 9002

Hello

I tried the sample application dnsquery.cpp from the SDK with following parameter "dnsquery -n landmine.de -t A -s 194.25.2.129" -> ErrorCode 9002

With my application I have the same problem. If the parameter PIP4_ARRAY is NULL it works fine.

Thank you

(WinXP Prof, VisualC++)
0
happymozart
Asked:
happymozart
  • 5
  • 4
1 Solution
 
jkrCommented:
Does the sample code from http://support.microsoft.com/default.aspx?scid=kb;en-us;831226 ("How to use the DnsQuery function to resolve host names and host addresses with Visual C++ .NET") work?
0
 
jkrCommented:
Um, sorry, that seems to be the same code.  BTW, the error is DNS_ERROR_RCODE_SERVER_FAILURE, which would correspond to that server only returning 'nonauthoritative' results:

> set querytype=A
> landmine.de 194.25.2.129
Server:         194.25.2.129
Address:        194.25.2.129#53

Non-authoritative answer:
Name:   landmine.de
Address: 212.12.60.226
> set querytype=PTR
> landmine.de 194.25.2.129
Server:         194.25.2.129
Address:        194.25.2.129#53

Non-authoritative answer:
*** Can't find landmine.de: No answer

Authoritative answers can be found from:
landmine.de
        origin = ns3.weitblick.net.
        mail addr = root.weitblick.net.
        serial = 2005051184
        refresh = 14400
        retry = 1800
        expire = 604800
        minimum = 86400

Does

dnsquery -n landmine.de -t A -s 212.12.60.226

work?

0
 
jkrCommented:
BTW, just in case I forgot to mention - there's no need to specify a nameserver for 'DnsQuery()', you can safely omit the '-s' parameter.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
happymozartAuthor Commented:
Thanks for the answer

I can't try this at the moment (firewall), but I think it would work.

I have the following problem:
I want check a list of domains, if the are free (should be fast).  denic.de refresh there servers all 2 hours and this is the reason why i would use the nameserver-parameter. How can I solve this problem with the API functions? Is this the wrong way?


Thx 'in advance'

0
 
happymozartAuthor Commented:
Yes it works

----
C:\DnsQuery>nslookup google.de 192.78.153.60
Server:  ns1.keba.co.at
Address:  192.78.153.60

Non-authoritative answer:
Name:    google.de
Addresses:  216.239.39.104, 216.239.57.104, 216.239.59.104
----
C:\DnsQuery>DnsQuery.exe -n google.de -t A -s 192.78.153.60
The IP address of the host google.de is 216.239.39.104

Why does the programm works here? Nslookup says, that this is a Non-authoritative answer.

Thx

0
 
jkrCommented:
>>Why does the programm works here?

Good question. That may be due to the configuration of the DNS server - the latter one might be configured to return a result for an 'A' record query, the other to return an error.

Unfortunately, niether http://uptime.netcraft.com/up/graph?site=ns1.keba.co.at nor http://uptime.netcraft.com/up/graph?site=dns03.btx.dtag.de yield any results at the moment to verify the NS type.
0
 
happymozartAuthor Commented:
This means, there is no possibilty to get ANY information about the domain at these DNS (eg: "194.246.96.1" (denic.de)) with windows-api-functions (modfiy wType, fOptions-parameter)?

Thx
0
 
jkrCommented:
There is IMHO no need to do so - your default DNS will dispatch the query to the appropriate server for the domain anyway.
0
 
happymozartAuthor Commented:
OK thank youi
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now