views:

197

answers:

1

What's an easiest reliable way to retrieve the fully qualified domain name of the current host in Win32?

I've tried calling gethostname(), but it returns a NetBIOS name.

+1  A: 

Try getnameinfo, it comes with a sample that worked for me.

Shay Erlichmen
Thanks a lot, it works exactly as needed.
sharptooth