var EIP: Cardinal; procedure GetEIP(); stdcall; asm pop eax; mov EIP,eax; push eax; end; procedure TForm1.Button1Click(Sender: TObject); begin GetEIP(); ShowMessage('Button1Click, 0x' + IntToHex(EIP, 8)); end;
记录一下。由C++转成Delphi的获取EIP代码。