Link to home
Start Free TrialLog in
Avatar of kloiv
kloiv

asked on

How to get the local DNS IP address?

Does anybody have an idea how to get the dns ip addresses for a local network card / modem in Delphi 6? ANy help would be appreciated.
ASKER CERTIFIED SOLUTION
Avatar of Lee_Nover
Lee_Nover

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Lukasz Zielinski
Lukasz Zielinski
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
... of course You need WSAStartUp() and WSACleanUp();
ziolko.
Avatar of kloiv
kloiv

ASKER

I like Lee Nover's idea of using Indy 9 to do this, but I can't find the method to get the DNS server addresses - could you explain how this is acheived please? Thanks in advance.
check the properties (Indy 9 IdIPWatch):
CurrentIP
IsOnline
IPHistoryList
LocalIP
LocalName
PreviousIP
... ;-)
oh .. also the events OnStatus and OnStatusChanged
Avatar of kloiv

ASKER

Thanks everyone, but in the end I decided to get the available DNS server addresses using "fixed info" from iphlpapi.dll.
kloiv:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:
        to split points between Lee_Nover and ziolko
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Some days and here is the Christmas Time. I wish good luck and good health for you all and for your loved ones

kacor
EE Cleanup Volunteer