|Subject:||Re: DNS Server and online status|
|Posted by:||Remy Lebeau (TeamB) (email@example.com)|
|Date:||Mon, 7 Jun 2004|
"Alex Taylor" <bassw…@vnet.hu> wrote in message
> I know the usage of TidDNSResolver but I have a question.
> I'd like to pass the client's default (default to the active internet
> connection) DNS server's IP address to the component.
> How can I do this?
You have to query the OS, or even the network adapter itself directly, to
find out what DNS server is currently active. Look at the GetAdaptersInfo()
function in the Win32 API.
> I saw the demo TraceRoute where the resolving function call
> the gStack's WSGetHostByName function, that is an API call.
> I suppose it uses the default DNS server.
Yes, WSGetHostByName() calls into the OS which then uses the default DNS
> Can I get its IP?
See further above.
DNS Server and online status posted by Alex Taylor on Mon, 07 Jun 2004