判断程序是否在虚拟机vmware内运行
function isruninvmware(out errmsg: string): boolean;
begin
result := false;
try
asm
push edx
push ecx
push ebx
mov eax, 'vmxh'
mov ecx, $0a
mov edx, 'vx'
in eax, dx
cmp ebx, 'vmxh'
setz
pop ebx
pop ecx
pop edx
end;
except
on e: exception do
errmsg := e.message;
end;
end; 以上代码摘自 橙子
页:
[1]