代码之家  ›  专栏  ›  技术社区  ›  Rohit

如何从C_中的IP获取计算机的Netbios名称?

  •  10
  • Rohit  · 技术社区  · 15 年前

    给定一台机器的IP地址,如何在C中以编程方式获取它的netbios名称?我知道我可以从命令行通过“nbtstat-a”获得它,但我正在寻找更好的解决方案。

    2 回复  |  直到 8 年前
        1
  •  4
  •   G. Stoynev    8 年前

    检查 Using the Socket class to request the NetBios name of a device over UDP (向下滚动)。

    编辑

    社区已根据原始页面上的404编辑了URL,并将链接更改为 web.archive.org

        2
  •  1
  •   Carlos Gutiérrez    15 年前

    你可以使用winapi gethostbyaddr 带类型 AF_NETBIOS .

    推荐文章