The getsockname function retrieves the local name for a socket, then you can get the MAC address.
GetAdaptersInfoThe GetAdaptersInfo function retrieves adapter information for the local computer. On Windows XP and later: Use the GetAdaptersAddresses function instead of GetAdaptersInfo.可以按IP地址得到Mac。函数说明中有例子
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货