2

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.

sharptooth
  • 167,383
  • 100
  • 513
  • 979

1 Answers1

2

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

Shay Erlichmen
  • 31,691
  • 7
  • 68
  • 87