How do I get a Unique Identifier for a Device within Windows 10 Universal?

后端 未结 5 767
盖世英雄少女心
盖世英雄少女心 2020-11-29 09:33

This is my old implementation to get a Unique DeviceID for Windows Universal 8.1 but the type HardwareIdentification does not exist anymore.

    private sta         


        
5条回答
  •  天命终不由人
    2020-11-29 09:50

    It seems that

    var deviceInformation = new EasClientDeviceInformation();
    string Id = deviceInformation.Id.ToString();
    

    is doing the magic, refering to EasClientDeviceInformation it provides a unique Id.

    The Id property represents the DeviceId using the GUID truncated from the first 16 bytes of the SHA256 hash of the MachineID, User SID, and Package Family Name where the MachineID uses the SID of the local users group.

    BUT it only works for Windows Store Apps... so there have to be another solution.

提交回复
热议问题