CPU Typ rausbekommen?
-
Hi,
ich möchte den CPU Typ rausbekommen z.B. sowas:
AuthenticAMD: Athlon / Duron (Model-7) oder K6-2 (Model-8)bzw.
GenuineIntel: Pentium Celeron (1) oder Pentium Xeon / Xeon-MP
gibt es dafür spezielle winAPI funktionen? Wenn ja wie lauten diese?
-
GetSystemInfo()
MfG SideWinder
-
Über WMI (Forensuche): Win32_Processor

-
SideWinder schrieb:
GetSystemInfo()
MfG SideWinder
Gut gib mir ein beispiel! Mit GetSystemInfo find ich das nämlich net raus

-
Mit flenders' WMI-Methode findest du viel mehr Informationen über die Hardware raus. Aber über GetSystemInfo() und dem dazuegehörigen MSDN-Example (ja da könntest du nächstes Mal selber nachsehen) kriegst du uA den Prozessortyp:
#include <windows.h> #include <stdio.h> void main() { SYSTEM_INFO siSysInfo; // Copy the hardware information to the SYSTEM_INFO structure. GetSystemInfo(&siSysInfo); // Display the contents of the SYSTEM_INFO structure. printf("Hardware information: \n"); printf(" OEM ID: %u\n", siSysInfo.dwOemId); printf(" Number of processors: %u\n", siSysInfo.dwNumberOfProcessors); printf(" Page size: %u\n", siSysInfo.dwPageSize); printf(" Processor type: %u\n", siSysInfo.dwProcessorType); // HIER printf(" Minimum application address: %lx\n", siSysInfo.lpMinimumApplicationAddress); printf(" Maximum application address: %lx\n", siSysInfo.lpMaximumApplicationAddress); printf(" Active processor mask: %u\n", siSysInfo.dwActiveProcessorMask); }MfG SideWinder
-
Schau mal in HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0
Mit inline Assembler und dem befehl cpuid kannst du auch infos
zu den CPU's heraus finden.
Was die Zahlen aber bedeuten must du aus den Beschreibungen
der CPU's entnemhen (bei Intel oder AMD)void Pc104GetCpuId(int iCmd,void *pData) { _asm { mov eax,iCmd mov esi,pData mov ebx,0 mov ecx,0 mov edx,0 cpuid mov dword ptr [esi+ 0], eax mov dword ptr [esi+ 4], ebx mov dword ptr [esi+ 8], ecx mov dword ptr [esi+12], edx } }Meine Webseite:
-
@Die CPU,
wenn dich Assembler interessiert: Schau dir mal folgende Seite an: http://www.sandpile.org/ Hier kannst du sehen, was du CPUID alles auslesen kannst.