什么是PC唯一ID? 我们怎样才能获得PC unqiue ID? 是关于硬盘还是主板? 我想在我的窗口程序中存储PC ID.请分享我 这对我有用 Private Function CpuId() As String Dim computer As String = "." Dim wmi As
>我们怎样才能获得PC unqiue ID?
>是关于硬盘还是主板?
我想在我的窗口程序中存储PC ID.请分享我
这对我有用Private Function CpuId() As String Dim computer As String = "." Dim wmi As Object = GetObject("winmgmts:" & _ "{impersonationLevel=impersonate}!\\" & _ computer & "\root\cimv2") Dim processors As Object = wmi.ExecQuery("Select * from " & _ "Win32_Processor") Dim cpu_ids As String = "" For Each cpu As Object In processors cpu_ids = cpu_ids & ", " & cpu.ProcessorId Next cpu If cpu_ids.Length > 0 Then cpu_ids = _ cpu_ids.Substring(2) Return cpu_ids End Function
见here