Message-Id: <199806250322.EAA11393@sable.ox.ac.uk> Comments: Authenticated sender is From: George Foot To: Till Harbaum Date: Thu, 25 Jun 1998 04:17:37 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Networking Support Reply-to: george DOT foot AT merton DOT oxford DOT ac DOT uk CC: djgpp AT delorie DOT com Precedence: bulk On 24 Jun 98 at 19:23, Till Harbaum wrote: > It seems that libsock somehow doesn't finger out the name of our dns > server (which is properly configured in win95, winipcfg reports dns > to be enabled and the correct ip of the dns server) and instead > gives a null pointer down to the wsock-lib which immediately > crashes. > > Does anybody know, what's wrong with this?? It's not possible to determine the DNS server's IP through the wsock VxD (which is how libsocket works). To get that information you have to dig around in the registry, which means you need a library of registry reading routines, just to read a DNS server. On top of that, the DNS server's IP is in different places for different connection types; there may be more than one, only some of which will work (again for different connection types); in particular, for a dial up RAS connection retreiving the IP is not trivial. I don't know for sure whether or not Indrek Mandre implemented this, but I've never done it in any of my Winsock libraries ;). If you read the docs for libsocket you'll probably find this restriction mentioned somewhere. In practice it doesn't matter if the DNS server you give isn't local, though you should encourage users of the software to set it to a local one. winipcfg is of course a good way to find one. -- george DOT foot AT merton DOT oxford DOT ac DOT uk