
How to determine current DNS server IP number?
Tony,
Thanks for your efforts and the info. Found that also in MSDN in the
meantime, but this works only with NT.
In 95 the section, but not the keys and nothing gets filled in. Under 98 the
whole registry layout changed and
the mentioned branch in the registry is no longer present...
So i am one step further now, but the problem remains to be solved for
95/98....
Thanks
Greetings from Africa..
Peter
Quote:
> Peter,
> Found this in MSDN, hope it helps.
> When a client accepts an IP address, and any other configuration
information
> offered by the DHCP server, the client saves the configuration in the
> following Registry keys:
> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services: Network interface
> specific: <adapter>\parameters\Tcpip General: Dhcp\parameters\options\*
> IP addressing information is leased to a client until the client manually
> releases the address, or until the DHCP server cancels the lease and makes
> the address available to other computers on the network.
> >Does anybody know how to find out the current DNS servers when using
> dynamic
> >(DHCP) Nameservers on dial up?
> >I have no problem to read the DSN server IP('s) from the registry when
they
> >are fixed. But how do i obtain the info when DNS servers are given
> >dynamically via DHCP or on PPP dial up?
> >Example: I dial up to my ISP, PPP negotiotes my IP number and DNS
servers.
> >How can my program find out the DNS numbers obtained?
> >Alreday known/discoverd:
> >- winipcfg.exe can do write the information to a file, but it is a bit
> >akward and very slow to shell out to a .exe and then read the results
from
> >a file.
> >- there is a ipcfgdll.dll in Windows 98 that appears to be a dll version
of
> >winipcfg.exe.Ipcfgdll.dll exports functions that appear to do the job,
but
> >the dll is not documented. Anybody knows the function syntax for the
> exports
> >of ipcfgdll.dll ?
> >Thanks
> >Peter