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
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