标题:读取CPUID和网卡MAC地址源代码
只看楼主
haizongxin
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2006-7-13
 问题点数:0 回复次数:0 
读取CPUID和网卡MAC地址源代码

public string GetCPUID()
{
string Result = "";
ManagementClass mcobject = new ManagementClass("Win32_Processor");
ManagementObjectCollection moc = mcobject.GetInstances();
foreach(ManagementObject mo in moc)
{
Result += mo.Properties["ProcessorId"].Value.ToString();
}
return Result;
}

public string GetNetcarMac()
{
string Result = "";
ManagementClass mcobject = new ManagementClass("Win32_NetworkAdapter");
ManagementObjectCollection moc = mcobject.GetInstances();
foreach(ManagementObject mo in moc)
{
if(mo["MACAddress"]!=null)
Result += mo["MACAddress"].ToString();
}
return Result;
}

搜索更多相关主题的帖子: 源代码 MAC CPUID 网卡 Result 
2006-07-13 10:37



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-78034-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.106270 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved