Can someone share me with some simple examples using SYSTEM_INFO in C++. I just need a simple way in C++ to returns me the level of the CPU.
Thanks,
Lik
C++
Last Comment
lik
8/22/2022 - Mon
jkr
What do you mean by the 'level of the CPU'? If you mean 'wProcessorLevel', you'd use
SYSTEM_INFO si;
GetSystemInfo ( &si);
switch ( si.wProcessorLevel) {
case 3: // x386
break;
case 4: // x486
break;
case 5: // Pentium
break;
}
lik
ASKER
Thanks, jkr.
I found the SYSTEM_INFO from the MSDN, and know the code you provided will do the job. The problem I have is I don't know what to header information include to use SYSTEM_INFO. I searched the books and the internet, but just could not find any more information regarding this. Can you help me more?
Thanks,
lik
ASKER
Thanks, jkr.
I found the SYSTEM_INFO from the MSDN, and know the code you provided will do the job. The problem I have is I don't know what to header information include to use SYSTEM_INFO. I searched the books and the internet, but just could not find any more information regarding this. Can you help me more?
SYSTEM_INFO si;
GetSystemInfo ( &si);
switch ( si.wProcessorLevel) {
case 3: // x386
break;
case 4: // x486
break;
case 5: // Pentium
break;
}