QString processorInfo()
{
#if defined(Q_WS_WIN32)
SYSTEM_INFO info;
GetSystemInfo(&info);
switch(info.wProcessorArchitecture)
{
#ifdef PROCESSOR_ARCHITECTURE_AMD64
case PROCESSOR_ARCHITECTURE_AMD64:
return "x86_64";
break;
#endif
case PROCESSOR_ARCHITECTURE_INTEL:
return "x86";
break;
case PROCESSOR_ARCHITECTURE_IA64:
#ifdef PROCESSOR_ARCHITECTURE_IA32_ON_WIN64
case PROCESSOR_ARCHITECTURE_IA32_ON_WIN64:
#endif
return "IA64";
break;
default:
return "Unknown";
break;
}
#endif
return QString();
}
{
#if defined(Q_WS_WIN32)
SYSTEM_INFO info;
GetSystemInfo(&info);
switch(info.wProcessorArchitecture)
{
#ifdef PROCESSOR_ARCHITECTURE_AMD64
case PROCESSOR_ARCHITECTURE_AMD64:
return "x86_64";
break;
#endif
case PROCESSOR_ARCHITECTURE_INTEL:
return "x86";
break;
case PROCESSOR_ARCHITECTURE_IA64:
#ifdef PROCESSOR_ARCHITECTURE_IA32_ON_WIN64
case PROCESSOR_ARCHITECTURE_IA32_ON_WIN64:
#endif
return "IA64";
break;
default:
return "Unknown";
break;
}
#endif
return QString();
}
Комментариев нет:
Отправить комментарий