All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
ASP.NET从零起步设计网站全过程(12)_[Asp.Net教程]
网页最简短的拖动对象代码实例演示_JavaScript技术_编程技术
GridViewRow可以任意位置单击引发事件的方法_[Asp.Net教程]
C#网络应用编程基础练习题与答案(一)_[Asp.Net教程]
PHP语法中基本符号及使用方法_[PHP教程]
.net开发投票机的思路_.net资料_编程技术
ASP.NET,2.0中XML数据的处理_[Asp.Net教程]
C—sharp开发应避免的几个小滥用_[Asp.Net教程]
MS-SQL数据库开发常用汇总_[SQL,Server教程]
SQL Server服务器内存管理问题_[SQL Server教程]
Reading number is top 10 pictures
The money of more than 100 countries and regions18
Chinese paper-cut grilles art appreciation1
女人化妆前后的对比
2013中国四川省高考作文
XuRe xuan cool and refreshing photoes2
Sell the barbecue as says father du breul5
中国的阶级现状
Street street fighting
生活中总有些低调的人,不经意间散发出土豪的气质
程序员的悲哀
Download software ranking
致我们终将逝去的青春
C#COM编程指南
变速齿轮3.26
打鸟视频
Unix video tutorial4
Visual C++界面编程技术
Unix video tutorial19
天龙八部十二宫服务端
Boxer's Top ten classic battle7
塘西风月痕
delv published in(发表于) 2014/1/6 9:06:38 Edit(编辑)
C#应用:获取cpu序列号,硬盘ID,网卡MAC地址_[Asp.Net教程]

C#应用:获取cpu序列号,硬盘ID,网卡MAC地址_[Asp.Net教程]

C#应用:获取cpu序列号,硬盘ID,网卡MAC地址_[Asp.Net教程]

private void GetInfo()
{
string cpuInfo = "";//cpu序列号
ManagementClass cimobject = new ManagementClass("Win32_Processor");
ManagementObjectCollection moc = cimobject.GetInstances();
foreach(ManagementObject mo in moc)
{
cpuInfo = mo.Properties["ProcessorId"].Value.ToString();
Response.Write ("cpu序列号:"+cpuInfo.ToString ());
}


//获取硬盘ID
String HDid;
ManagementClass cimobject1 = new ManagementClass("Win32_DiskDrive");
ManagementObjectCollection moc1 = cimobject1.GetInstances();
foreach(ManagementObject mo in moc1)
{
HDid = (string)mo.Properties["Model"].Value;
Response.Write ("硬盘序列号:"+HDid.ToString ());
}



//获取网卡硬件地址
9558821702001755616

ManagementClass mc = new ManagementClass("Win32_NetworkAdapterConfiguration");
ManagementObjectCollection moc2 = mc.GetInstances();
foreach(ManagementObject mo in moc2)
{
if((bool)mo["IPEnabled"] == true)
Response.Write("MAC address\t{0}"+mo["MacAddress"].ToString());
mo.Dispose();
}
}


来源:网络







添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.