I use GetAdaptersInfo to get MAC addresses of interfaces.
 
GetAdaptersInfo exist on old and new versions of Windows. 
But msdn warns :
    "On Windows XP and later:  Use the GetAdaptersAddresses 
      function instead of GetAdaptersInfo."
Why ? I suspect it is because GetAdaptersAddresses  adds ipv6; GetAdaptersInfo does not have ipv6 addresses.
But I do not need ipv6 addresses.
 
It is difficult to use GetAdaptersAddresses because W2k does not have GetAdaptersAddresses . I need to support w2 and newer oses, too, so here is my question.
 
Is there sesious reason to prefer GetAdaptersAddresses to GetAdaptersInfo when getting MAC addresses of interfaces ?
 
Hi Viki,

To me, it sounds like perhaps GetAdaptersInfo may be dropped at some future point.  Your code could detect W2K and use GetAdaptersInfo, and on XP+ use GetAdaptersAddresses.  I suppose, it comes down to whether you do the work now, or when / if GetAdaptersInfo is dropped.

GetAdaptersInfo & GetAdaptersAddresses的更多相关文章

  1. 【转载】GetAdaptersInfo函数在64位系统上返回ERROR_NOACCESS的有关问题

    From:http://www.educity.cn/wenda/351190.html GetAdaptersInfo函数在64位系统下返回ERROR_NOACCESS的问题 实际应用中一个程序在长 ...

  2. 获取mac地址方法之一 GetAdaptersInfo()

    GetAdaptersInfo -20151116 防止返回的mac出现null 20151116 From:http://blog.csdn.net/weiyumingwww/article/det ...

  3. IP HELPER GetAdaptersAddresses 函数

    自己做的一些笔记,XP以及以后的系统使用: MSDN 函数:http://msdn.microsoft.com/en-US/library/windows/desktop/aa365915(v=vs. ...

  4. 使用GetAdaptersInfo时,网卡类型的值为71

    使用GetAdaptersInfo时,网卡类型的值为71,代表无线网卡.

  5. 【转载】 用 Windows API “GetAdaptersInfo” 获取 MAC 时遇到的问题

    From:http://blog.csdn.net/weiyumingwww/article/details/17554461 前段时间有个项目需要获取客户端的 MAC 地址,用作统计去重的参考数据. ...

  6. GetAdaptersInfo获取网卡配置和Ip地址信息

    一台机器上可能不只有一个网卡,但每一个网卡只有一个MAC地址,而每一个网卡可能配置有多个IP地址:如平常的笔记本电脑中,就会有无线网卡和有线网卡(网线接口)两种:因此,如果要获得本机所有网卡的IP和M ...

  7. WinAPI你知道多少?!(上千个,好多都没见过)

    http://www.cnblogs.com/vanver/archive/2013/06/13/NO-2013_06_13pm.html 播客开篇,讲讲废话:本篇播客只是推荐给热与钻研的同学们... ...

  8. Windows网络接口API函数

    Windows提供了一套非常轻量级的网络函数,方便进行网络应用开发,整理出来供参考使用. The following functions are used in Windows networking: ...

  9. VC++ IPv6的支持

    最近根据项目需要,要在产品中添加对IpV6的支持,因此研究了一下IPV6的相关内容,Ipv6 与原来最直观的改变就是地址结构的改变,IP地址由原来的32位扩展为128,这样原来的地址结构肯定就不够用了 ...

随机推荐

  1. 51nod加农炮

    这道题维护一下前缀最大值然后二分答案就好了哇 233 #include<cstdio> #include<cstring> #include<algorithm> ...

  2. from表单详解

  3. linux USB HOST之EHCI和OHCI【转】

    转自:http://blog.csdn.net/ljzcom/article/details/8186914 版权声明:本文为博主原创文章,未经博主允许不得转载.   目录(?)[-] 2 关键数据结 ...

  4. [MySQL] 一致性读分析

    MySQL MVCC MySQL InnoDB存储引起实现的是基于多版本的并发控制协议---MVCC(Multi-Version Concurrency Control),基于锁的并发控制,Lock- ...

  5. django自带的orm之查询

    一.filter条件查询 用法: 模型类.objects.filter(模型类属性名__查询操作符 = 值) 判等: exact # 例:查询id为1的员工 select * from employe ...

  6. mysql-5.7.15-winx64配置

    1.    配置环境变量 1.1  添加path路径 选择 控制面板>系统和安全>系统>高级系统设置>环境变量 mysql文件目录的绝对路径\bin 1.2  修改mysql ...

  7. selenium 警告框处理 (弹窗处理)

    在web应用中常常会遇见很多用JavaScript编写的alert .confirm 以及prompt 弹窗,这是就需要driver.switchTo().alert()来选取(定位)警告弹窗.再对弹 ...

  8. PEP 3106 -- Revamping(改进) dict.keys(), .values() and .items()

    1. Abstract(摘要) This PEP proposes(建议) to change the .keys(), .values() and .items() methods of the b ...

  9. mySQL的存储过程详解

    mysql存储过程详解 1.      存储过程简介   我们常用的操作数据库语言SQL语句在执行的时候需要要先编译,然后执行,而存储过程(Stored Procedure)是一组为了完成特定功能的S ...

  10. [BZOJ4006][JLOI2015]管道连接 状压dp+斯坦纳树

    4006: [JLOI2015]管道连接 Time Limit: 30 Sec  Memory Limit: 128 MBSubmit: 1020  Solved: 552[Submit][Statu ...