Newsgroups: comp.os.msdos.djgpp From: rd5718 AT irix DOT bris DOT ac DOT uk (Rich Dawe) Subject: Re: Winsock getting dynamic IP Message-ID: Sender: usenet AT fsa DOT bris DOT ac DOT uk (Usenet) Organization: University of Bristol, England References: <01bd079b$c810a020$63206ccb AT ashod> <34b0e1a5 DOT 3820592 AT news DOT easynet DOT co DOT uk> Date: Wed, 7 Jan 1998 14:06:12 GMT Lines: 32 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk George Foot (mert0407 AT sable DOT ox DOT ac DOT uk) wrote: : Maybe. Another way is to contact someone and do a getsockname on the : socket -- but you need someone to contact first. If you have for : example a DNS server's IP (which you probably want anyway), you could : contact the DNS server and read off your own IP. But this requires : you to know your DNS servers' IP addresses. Could you not use the loopback address for this, i.e. contact yourself? : A better way is to get the information from the Win95 registry. I : tried to do this a while ago but didn't get any sane response from the : registry vxd; it seems that it accepts calls from protected mode : without crashing, but doesn't understand any parameters passed that : way. You have to pass all your parameters via conventional memory, : and call it through __dpmi_simulate_real_mode_procedure_retf. I have been trying to write registry access functions too, but I haven't made much progress. My calls to the registry don't crash either - complete rubbish gets returned though. Does __dpmi_simulate_real_mode_procedure_retf work better? I'm already allocating DOS memory using __dpmi_allocate_dos_memory. This is as part of my Win95 library for DJGPP. Rich Dawe -- ============================================================================== Rich Dawe - 3rd year Physicist @ Bristol Uni, UK E-mail: rd5718 AT bristol DOT ac DOT uk Web pages: http://irix.bris.ac.uk/~rd5718/ ==============================================================================