dunno olosoft, I did notice that while in 9x the hosts file is under the windows directory, in Win2k it's under config drivers or whatever. Also, there's another file in that same folder with the hosts file that is rather interesting. You know how netstat can resolve ports to their service names? Well, it takes that info from one of those files in that folder. I've modified that file to customize/upgrade what netstat displays. I wonder what other programs uses it.
I assume that somewhere in the API you can get a service name for a port and it would be based off of the contents of that file.