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.
如何在 C++(WinAPI)中从 IP 地址或 sockaddr_in/sockaddr_in6/sockaddr 结构(或其他)获取主机名(如“www.google.com”)?
您正在寻找getnameinfo功能。MSDN 页面上包含的示例。
getnameinfo