public static string GetDeviceName()
{
RegistryKey folders;
folders = OpenRegistryPath(Registry.LocalMachine, @"/Ident");
string name = folders.GetValue("Name").ToString();
return name;
}
private static RegistryKey OpenRegistryPath(RegistryKey root, string s)
{
s = s.Remove(0, 1) + @"/";
while (s.IndexOf(@"/") != -1)
{
root = root.OpenSubKey(s.Substring(0, s.IndexOf(@"/")));
s = s.Remove(0, s.IndexOf(@"/") + 1);
}
return root;
}
WinCE下使用获取设备名
最新推荐文章于 2017-07-06 09:31:00 发布