Глава 6. Исследование виртуальной памяти 109

РИС. 6-1 (продолжение)

void ShowCPUInfo (HWND hwnd, WORD wProcessorArchitecture,
WORD wProcessorLevel, WORD wProcessorRevision) {

TCHAR szCPUArch[64];

TCHAR szCPULevel[64];

TCHAR szCPURev[64]:

szCPULevel[0] = 0;

szCPURev[0] = 0;

switch (wProcessorArchitecture) {
case PROCESSOR_ARCHITECTURE_INTEL:

lstrcpy(szCPUArch, __TEXT("Intel"));

switch (wProcessorLevel) {
case 3: case 4:

wsprintf(szCPULevel, __TEXT("80%c86"), wProcessorLevel + '0');

if (!g_fWin95IsHost)

wsprintf(szCPURev, __TEXT("%c%d"),

HIBYTE(wProcessorRevision) + __TEXT('A'),
LOBYTE(wProcessorRevision)):

else

lstrcpy(szCPURev, __TEXT("(unknown)"));

break;

case 5:

wsprintf(szCPIJLevel, __TEXT(" Pentium")):

if Ug_fWin95IsHost)
wsprintf(szCPURev,

__TEXT("Model %d, Stepping %d"),
HIBYTE(wProcessorRevision),
LOBYTE(wProcessorRevision));

else

1st rcpy(szCPURev, __TEXT("(unknown)")):

break;

}
break;

case PROCESSOR_ARCHITECTURE_MIPS:

lstrcpy(szCPUArch, __TEXT("MIPS"));

wsprintf(szCPULevel, __TEXT("R%04d"), LOBYTE(wProcessorLevel) * 1000):

wsprintf(szCPURev, __TEXT("%d"), LOBYTE(wProcessorRevision));

break;

case PROCESSOR_ARCHITECTURE_ALPHA:

1st rcpy(szCPUArch, __TEXT("Alpha"));

wsprintf(szCPULevel, __TEXT("%d"), wProcessorLevel):

wsprintf(szGPURev, __TEXT("Model %c, Pass %d"),

HIBYTE(wProcessorRevision) + __TEXT('A').

LOBYTE(wProcessorRevision));

break;

см. след. стр.