WinRT 中以太网网络适配器 ID 的唯一性如何?它是从Mac地址派生的吗? [英] How unique is the ethernet network adapter ID in WinRT? It is derived from the Mac address?

查看:17
本文介绍了WinRT 中以太网网络适配器 ID 的唯一性如何?它是从Mac地址派生的吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

WinRT 中以太网网络适配器 ID 的唯一性如何?是从Mac地址派生的吗?

How unique is the ethernet network adapter ID in WinRT? It is derived from the Mac address?

IReadOnlyCollection<Windows.Networking.Connectivity.ConnectionProfile> profiles =            Windows.Networking.Connectivity.NetworkInformation.GetConnectionProfiles();

Windows.Networking.Connectivity.NetworkAdapter na = profiles.First<Windows.Networking.Connectivity.ConnectionProfile>().NetworkAdapter;

string nid =  na.NetworkAdapterId.ToString();

推荐答案

不,NetworkAdapterId 值是一个GUID,与机器MAC地址无关.您无法通过为 Windows 应用商店应用程序类型公开的 WinRT API 获取计算机的 MAC 地址.

No, the NetworkAdapterId value is a GUID and has nothing to do with the machine MAC address. You cannot get the MAC adress of the computer through WinRT APIs exposed for the Windows Store application type.

这篇关于WinRT 中以太网网络适配器 ID 的唯一性如何?它是从Mac地址派生的吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆