VB Code:
  1. Public Function ComputerProcessor() As String
  2.     On Error GoTo ErrorHandler
  3.     Dim hKey As Long
  4.     Dim Processor As String
  5.     Dim MHz As Long
  6.     ComputerProcessor = ""
  7.     If RegOpenKeyEx(HKEY_LOCAL_MACHINE, "HARDWARE\DESCRIPTION\System\CentralProcessor\0", 0, KEY_ALL_ACCESS, hKey) <> ERROR_SUCCESS Then
  8.         Form2.DebugPrint "ComputerProcessor.RegOpenKeyEx failed" & Err.Number
  9.         GoTo hClose
  10.     End If
  11.     Processor = Space$(128)
  12.     If RegQueryValueEx(hKey, "ProcessorNameString", 0&, REG_SZ, Processor, Len(Processor)) <> ERROR_SUCCESS Then
  13.         Form2.DebugPrint "ComputerProcessor.RegQueryValueEx(ProcessorNameString) failed" & Err.Number
  14.         GoTo hClose
  15.     End If
  16.     Processor = Left$(Processor, InStr(Processor, Chr(0)) - 1)
  17.     If RegQueryValueEx(hKey, "~MHz", 0&, REG_DWORD, MHz, 4&) <> ERROR_SUCCESS Then
  18.         Form2.DebugPrint "ComputerProcessor.RegQueryValueEx(MHz) failed" & Err.Number
  19.         GoTo hClose
  20.     End If
  21.     ComputerProcessor = Processor & " (" & MHz & "MHz)"
  22. hClose:
  23.     RegCloseKey hKey
  24.     Exit Function
  25. ErrorHandler:
  26.     Form2.DebugPrint "ComputerProcessor.Error: " & Err.Number
  27. End Function

Returns "AMD Athlon(tm) XP 3000+ (0MHz)", whats wrong?