ASP.NET获取CPU序列号,硬盘序列号ID,获取网卡编号

转载 2007年09月18日 10:23:00

//获取硬盘ID
string _HDInfo="";
ManagementClass cimobject1 = new ManagementClass("Win32_DiskDrive");
ManagementObjectCollection moc1 = cimobject1.GetInstances();
foreach(ManagementObject mo in moc1)
{
_HDInfo = (string)mo.Properties["Model"].Value;


}
HDInfo=_HDInfo;
}

public static void GetMacAddress(out string MacAddress)
{
//获取网卡硬件地址

string _MacAddress="";
ManagementClass mc = new ManagementClass("Win32_NetworkAdapterConfiguration");
ManagementObjectCollection moc2 = mc.GetInstances();
foreach(ManagementObject mo in moc2)
{
if((bool)mo["IPEnabled"] == true)
MacAddress=mo["MacAddress"].ToString();
mo.Dispose();
}
MacAddress=_MacAddress;
}



Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=694781

 

//获取硬盘ID
string _HDInfo="";
ManagementClass cimobject1 = new ManagementClass("Win32_DiskDrive");
ManagementObjectCollection moc1 = cimobject1.GetInstances();
foreach(ManagementObject mo in moc1)
{
_HDInfo = (string)mo.Properties["Model"].Value;


}
HDInfo=_HDInfo;
}

public static void GetMacAddress(out string MacAddress)
{
//获取网卡硬件地址

string _MacAddress="";
ManagementClass mc = new ManagementClass("Win32_NetworkAdapterConfiguration");
ManagementObjectCollection moc2 = mc.GetInstances();
foreach(ManagementObject mo in moc2)
{
if((bool)mo["IPEnabled"] == true)
MacAddress=mo["MacAddress"].ToString();
mo.Dispose();
}
MacAddress=_MacAddress;
}



Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=694781

  

相关文章推荐

获取网卡MAC、硬盘序列号、CPU ID、BIOS编号

http://topic.csdn.net/u/20081113/17/a10543d9-90d4-49c5-8d6b-a518cdb7bd64.html 获取网卡MAC、硬盘序列号、CPU I...

获取网卡MAC、硬盘序列号、CPU ID、BIOS编号

以下代码可以取得系统特征码(网卡MAC、硬盘序列号、CPU ID、BIOS编号)     BYTE szSystemInfo[4096]; // 在程序执行完毕后,此处存储取得的系统特征码  ...

C#获取CPU序列号代码、硬盘ID、网卡硬件地址等类文件

using System; using System.Management; namespace GetIDs { /// /// 计算机信息类 /// ...

.net C# 获取硬盘号 CPU序列号 IP地址 Mac地址

获取HardDisk的序列号(两种方法):public static string GetHardDiskID() { //Get the first Ha...

DELPHI获取硬盘、CPU、网卡序列号

//引用及TYPE变量申明 uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,  ...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)