getaddrinfo() can do it, though not necessarily the best way.
http://msdn.microsoft.com/library/de...addrinfo_2.asp
__________________
If you always think like an expert, you'll always be a beginner. | "A handful of knowledgeable people is more effective than an army of fools" -Writing Secure Code, 2nd Ed.
|