V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
icemanpro
V2EX  ›  问与答

windows 下 “ethernet_32769” 这样的网卡名称是如何获取的?

  •  
  •   icemanpro · 2020-08-24 18:05:46 +08:00 · 1135 次点击
    这是一个创建于 1343 天前的主题,其中的信息可能已经有所发展或是发生改变。
    2 条回复    2020-08-25 23:31:31 +08:00
    icemanpro
        1
    icemanpro  
    OP
       2020-08-25 09:36:40 +08:00   ❤️ 1
    用 GetAdaptersAddresses 获取到 AdapterAddresses,将 AdapterAddresses->Luid 用 ConvertInterfaceLuidToNameW 转换。

    WCHAR buf[IF_MAX_STRING_SIZE + 1];
    ConvertInterfaceLuidToNameW(&AdapterAddresses->Luid, buf, sizeof(buf)/sizeof(buf[0]));
    DGideas
        2
    DGideas  
       2020-08-25 23:31:31 +08:00
    感谢分享
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3119 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 12:57 · PVG 20:57 · LAX 05:57 · JFK 08:57
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.