From: Dave Hylands <dhylands@br...> - 2004-09-09 13:59:49
> Is there anything like '/etc/hosts' in mingw?
> I'd like to be able to resolve a simple word
> (like 'ansset') to a local IP# (like 192.168.2.2).
You can add entries to c:\Windows\system32\drivers\etc\hosts
Winsock uses this file as part of its name resolving.
Vancouver, BC, Canada
Luke Dunstan wrote:
> There is nothing specifically "in mingw" but Windows has an
> equivalent file at %SystemRoot%\system32\drivers\etc\hosts
Carlo, please notice that this is only valid for Windows NT series. For
Windows 9x, I remember it is %SystemRoot%\HOSTS.
Do you need to add some entries to it? If you just need to look up a
local name, you do not need to deal with the file directly. Calling
gethostbyname will be OK.