Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting the DNS server address

Status
Not open for further replies.

yizhar

MIS
Sep 1, 2001
2,282
IL
HI.

I'm programing with Delphi 3 Standard edition (yep, I know, it's an old one...).

I want to get the address of the current DNS server of the workstation at run time, similar to what I get in winipcfg or ipconfig. The program will run on different Windows versions (98,2K,XP), but I can require Winsock2 if it matters.

My program parses firewall logs and I want to resolve many ip addresses to DNS host names quickly and concurently.

I am using ICS from FPiette for my winsock programing (DNS reverse lookup using TDnsQuery), but this object needs me to give it the IP of DNS server to use.
I did try using the WSocket object which can also do reverse lookup without the need for me to give it DNS server address, but this component does not work well when I try to resolve many addresses at the same time.

So - do you know how can I retreive the DNS server address from Windows/Winsock either directly with API or with a 3rd party (but freeware) add-on?

BTW - I also have "Winshoes 7" but this also requires manual DNS server setting, and I cannot use "INDY" because it requires Delphi 4 or later.

Thanks for any comments.
Yizhar Hurwitz
 
Not a direct answer to your question but Delphi 4,5,6 & 7 Standard Edition have been free give aways in a number of PC magazines both in Australia and the UK over the last 12-24 months. If nothing else, it will give you access to Indy.

Contact the publishers of PC Plus in the UK to see what they can send you.

Roger Fedyk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top