实用技巧

关注公众号 jb51net

关闭
首页 > 网络编程 > ASP.NET > 实用技巧 > 硬件信息 CPU序列号

.net获取硬件信息_CPU序列号

作者:

.net获取硬件信息_CPU序列号的实现代码
复制代码 代码如下:

Public Sub getCpuId()
Try
Dim mc As Management.ManagementClass
Dim moc As Management.ManagementObjectCollection
Dim mo As Management.ManagementObject
mc = New Management.ManagementClass("win32_processor")
moc = mc.GetInstances()
For Each mo In moc
strCpuId = mo.Properties("processorid").Value.ToString()
Next mo
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
您可能感兴趣的文章:
阅读全文