I am using Delphi and must get the current IP address of a Windows DNS server so that I can perform a search. What function should I call to find it? The only solution I have now is ipconfig / all to get it, which is horrible.
Found a good one using the GetNetworkParams () function. Seems to work pretty well. You can find it here: http://www.swissdelphicenter.ch/torry/showcode.php?id=2452
Do you really need to know what a DNS server is for searching?
- , IP-, 2 : GetHostName GetHostByName. , GetHostByName , , ?
See GetNetowrkParams Method (Platform SDK: IP Helper)