Oh... please sorry, I've missed that you need a solution for VB6, not VB.NET. Here's example in VB:
Function GetCpuID()
Dim wmi, cpu, cpuid
Set wmi = GetObject("winmgmts:")
For Each cpu in wmi.InstancesOf("Win32_Processor")
cpuid = cpuid + cpu.ProcessorID
Next
MsgBox cpuid
End Function
Sorry if this will not compile, I've tested it using Microsoft VBScript and it works for me