Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Win32 中检索当前主机的完全限定域名的最简单可靠的方法是什么?
我试过调用 gethostname(),但它返回一个 NetBIOS 名称。
试试getnameinfo吧,它附带了一个对我有用的样本。
getnameinfo