- 人气:
- 放大
- 缩小
- 二维码
- 赞赏
delphi中嵌入汇编检测是否在虚拟机里运行
function IsVMwarePresent(): LongBool; stdcall;
begin
Result := False;
{$IFDEF CPU386}
try
asm
mov eax, 564D5868h
mov ebx, 00000000h
mov ecx, 0000000Ah
mov edx, 00005658h
in eax, dx
cmp ebx, 564D5868h
jne @@exit
mov Result, True
@@exit:
end;
except
Result := False;
end;
{$ENDIF}
end;
本文来自Delphi之窗,原文地址:http://www.52delphi.com