【发布时间】:2013-08-14 06:08:32
【问题描述】:
我需要在 Windows 8 中使用我的应用访问设备 MAC ID。
我知道您可以使用 NetworkInformation 类来获取某种网络 ID。
var networkProfiles = Windows.Networking.Connectivity.NetworkInformation.GetConnectionProfiles();
var adapter = networkProfiles[0].NetworkAdapter;
string networkAdapterId = adapter.NetworkAdapterId.ToString();
但是这并没有给我设备的 MAC id。
我的问题是,这些 ID 是否唯一,它们是否容易根据用户硬件而变化,以及如果用户使用平板电脑,这种硬件变化的可能性有多大。
此外,如果在 Windows 8 中无法获取 MAC id,是否可以在 Windows 8.1 中获取它?
谢谢
【问题讨论】:
-
谢谢。我已经考虑过 ASHWID,但要预测用户硬件的哪一部分可能保持不变并不容易。例如。 CPU id 在平板电脑上可能不会改变,但在桌面上可能会改变!
-
对于 Win 8,这点之前已经讨论过:How to get the mac address in WinRT (Windows 8) programmatically?我的猜测是 Win 8.1 也不允许检索。
-
感谢您的评论.. 上述 NetworkAdapter id 可以用来代替 MAC id 作为唯一标识符吗?
-
我使用过 Windows.Networking.Connectivity.NetworkInformation.getConnectionProfiles()[0].networkAdapter.networkAdapterId,我的用户说生成的 id 对于他们安装的大多数平板电脑都是相同的它在。 - 不是唯一的。
标签: c# windows-8 windows-runtime windows-store-apps