Windows Api判断当前系统是否支持虚拟技术

#include <windows.h>
#include <stdio.h>


int main()
{
if(IsProcessorFeaturePresent(PF_VIRT_FIRMWARE_ENABLED))
{
printf("Virtualization is present.\n");
}
else
{
printf("Virtualization not present.\n");
}


return 0;

}

根据https://technet.microsoft.com/zh-CN/library/ms724482

文档中介绍PF_VIRT_FIRMWARE_ENABLED表示Virtualization is enabled in the firmware.不过在VS2008中看不到这个宏,windows官方文档示意此值为21

猜你喜欢

转载自blog.csdn.net/youyudexiaowangzi/article/details/80111384