[Hola nuevamente
No uso VB 6.0 hace muchos años pero te dejaré algo de mi "baúl de los recuerdos". Los datos te los deja en la "Ventana inmediato", hay líneas comentadas, solo bórralas (ni recuerdo que hacen ahí). Activa la referencia a "Microsoft WMI Scripting V1.2 Library" (o similar), pégalo en un módulo estándar:
Option Explicit
Public asCpuPaths() As String
Public m_objCPUSet As SWbemObjectSet
Public m_objWMINameSpace As SWbemServices
Sub Datos()
Dim oCpu As SWbemObject 'WMI Object, in this case, local CPUs
Dim sPath As String, sCaption As String
Dim lElement As Long
ReDim asCpuPaths(0) As String
On Error GoTo ErrorHandler
'Get Default NameSpace, which will be the one for the local machine
'Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
Set m_objWMINameSpace = GetObject("winmgmts:")
'lstCPU.Clear
'Get CPU set
Set m_objCPUSet = m_objWMINameSpace.InstancesOf("Win32_Processor")
Debug.Print "Número Procesadores"; m_objCPUSet.Count
'Populate list box with CPU names
For Each oCpu In m_objCPUSet
With oCpu
sPath = .Path_ & ""
If sPath <> "" Then
Debug.Print .Name
Debug.Print "Processor ID: " & .ProcessorID
'save path to array, so on machines with multiple CPUs,
'each can be identified and their info loaded into text box
'lElement = IIf(asCpuPaths(0) = "", 0, UBound(asCpuPaths) + 1)
'ReDim Preserve asCpuPaths(lElement) As String
'asCpuPaths(lElement) = sPath
End If
End With
Next
'If lstCPU.ListCount <> 0 Then lstCPU.ListIndex = 0
CleanUp:
Set oCpu = Nothing
Exit Sub
ErrorHandler:
MsgBox "CPU Information could not be displayed due to the following error: " & Err.Description, , "WMI Demo Failed"
GoTo CleanUp
End Sub
OJO, en sistemas operativos de 64 bits puede haber errores respecto al número de procesadores tal cual usamos los conceptos hoy.
Abraham Valencia