#取处理器信息:Function GetA()
Dim R, wmi, obj, i
Set wmi = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set A = wmi.ExecQuery("Select * from Win32_Processor")
For Each obj In A
i=i+1
R = "处理器型号=" & obj.Name & vbCrLf
R = R& "处理器架构_数据=" & obj.Description & vbCrLf
R = R& "处理器厂商=" & obj.Manufacturer & vbCrLf
R = R& "处理器核心数=" & obj.NumberOfCores & vbCrLf
R = R& "处理器线程数=" & obj.NumberOfLogicalProcessors & vbCrLf
R = R& "处理器接口=" & obj.SocketDesignation & vbCrLf
R = R& "处理器位宽=" & obj.DataWidth & "位" & vbCrLf
R = R& "处理器外频=" & obj.ExtClock & "MHz" & vbCrLf
R = R& "处理器主频=" & obj.MaxClockSpeed & "MHz" & vbCrLf
Next
R = R & "处理器数量=" & Cstr(i) & vbCrLf
GetA = R
End Function