我想要后端服务 (ws) 的唯一设备 ID,因为我发现以下参考
private string GetDeviceId()
{
var token = Windows.System.Profile.HardwareIdentification.GetPackageSpecificToken(null);
var hardwareId = token.Id;
var dataReader = Windows.Storage.Streams.DataReader.FromBuffer(hardwareId);
byte[] bytes = new byte[hardwareId.Length];
dataReader.ReadBytes(bytes);
return BitConverter.ToString(bytes).Replace("-", "");
}//Note: This function may throw an exception.
但是,我无法理解代码,每次我为我的设备(64 个字符串)获得相同的 ID 时,我想知道它是否适用?我也找不到 MSDN 的任何参考资料
谢谢