2

I want to make a DNS query to my own DNS server instead the default one.

Which api can I use to do that ?

I know getaddrinfo (which ping.exe using), but how can i make this function query my dns server, instead the default one ?

Thanks!

john terry
  • 69
  • 3

2 Answers2

5

Take a look at the adns resolver library.

Another option is to use the c-ares library, which works on Windows and allows you to use alternative nameservers.

0xfe
  • 4,541
  • 1
  • 18
  • 14
  • I'm not sure why this was down-voted. Both these APIs will allow you to query alternative nameservers (as opposed to using the system resolver). An explanation along with the down-vote will help. :-) – 0xfe Feb 10 '10 at 21:30
0
Community
  • 1
  • 1
bortzmeyer
  • 34,164
  • 12
  • 67
  • 91