namespace Beisen.Native
{
using Beisen.Pdf;
using System;
using System.Runtime.InteropServices; internal sealed class DeviceInfo
{
private static DeviceInfo _Instance; public static DeviceInfo Instance
{
get
{
if (_Instance == null)
{
_Instance = new DeviceInfo();
}
return _Instance;
}
} public string Id
{
get
{
uint volumeSerialNumber = ;
uint num = 0u;
uint num2 = ;
uint num3 = ;
uint num4 = ;
uint num5 = ;
string systemDirectory = Environment.SystemDirectory;
if ((systemDirectory != null) && (systemDirectory.Length > ))
{
uint num6;
FileSystemFeature fileSystemFeature;
Platform.GetVolumeInformation(string.Format("{0}:\\", systemDirectory[]), null, , out num, out num6, out fileSystemFeature, null, );
}
string g = RegistryWOW6432.GetRegKey32<string>(RegHive.HKEY_LOCAL_MACHINE, @"SOFTWARE\Microsoft\Cryptography", "MachineGuid");
if ((g == null) || (g.Trim() == ""))
{
g = RegistryWOW6432.GetRegKey64<string>(RegHive.HKEY_LOCAL_MACHINE, @"SOFTWARE\Microsoft\Cryptography", "MachineGuid");
}
if (g != null)
{
byte[] buffer = new Guid(g).ToByteArray();
if (buffer != null)
{
num2 = BitConverter.ToUInt32(buffer, );
num3 = BitConverter.ToUInt32(buffer, );
num4 = BitConverter.ToUInt32(buffer, );
num5 = BitConverter.ToUInt32(buffer, );
}
}
return $"{volumeSerialNumber}-{num2}-{num3}-{num4}-{num5}";
}
}
}
}

最新文章

  1. iOS,文本输入,键盘相关
  2. HashMap的面试总结(摘抄)
  3. scala 闭包的概念
  4. Java相关内容解析
  5. WebSocket 浅析
  6. 树-伸展树(Splay Tree)
  7. 关于 ASP.NET 验证码
  8. cocos2d-x项目过程记录(cocos2d-x的新知)
  9. 8天玩转并行开发——第三天 plinq的使用
  10. .NetCore+Jexus代理+Redis模拟秒杀商品活动
  11. 在Centos7下搭建Socks5代理服务器
  12. Springboot &amp; Mybatis 构建restful 服务
  13. 【FJWC 2019】min
  14. idea使用maven打包项目
  15. 从虚拟机指令执行的角度分析JAVA中多态的实现原理
  16. redhat7.3安装yum源
  17. SSO阅读有感
  18. .NET DLL 加密工具
  19. D. Duff in Beach
  20. 利用FFMPEG命令进行文件分割

热门文章

  1. 更改jupyter-notebook启动时的默认目录
  2. Linux命令——systemctl
  3. redis开发相关
  4. Java - 框架之 SpringBoot 攻略day01
  5. CSS hack整理
  6. (转载) 从0开始搭建SQL Server AlwaysOn 第一篇(配置域控)
  7. 数据库Count 语句详解
  8. regedit系统注册表,msconfig系统配置
  9. Nginx和php-fpm的启用和停用脚本
  10. 洛谷 P1376 机器工厂 题解