BOOL IsInVMware() {
BOOL R = TRUE;
bool rc = true;
__try
{
__asm
{
push edx
push ecx
push ebx
mov eax, 'VMXh'
mov ebx, 0
mov ecx, 10
mov edx, 'VX'
in eax, dx
cmp ebx, 'VMXh'
setz[rc]
pop ebx
pop ecx
pop edx
}
}
__except (EXCEPTION_EXECUTE_HANDLER)
{
rc = false;
}
if (rc == false)
{
R = FALSE;
}
return R;
}
C++ 判断程序是否在VMware上运行
最新推荐文章于 2023-12-20 11:24:07 发布