Parsi Coders
[DELPHI]detect debuggers - نسخه قابل چاپ

+- Parsi Coders (http://parsicoders.com)
+-- انجمن: Cracking / Anti Crack (http://parsicoders.com/forumdisplay.php?fid=75)
+--- انجمن: Anti Debug (http://parsicoders.com/forumdisplay.php?fid=76)
+---- انجمن: Delphi (http://parsicoders.com/forumdisplay.php?fid=81)
+---- موضوع: [DELPHI]detect debuggers (/showthread.php?tid=1077)



[DELPHI]detect debuggers - Amin_Mansouri - 10-16-2011

کد:
function DebuggerPresent : boolean;
type
  TDebugProc = function : boolean;
    stdcall;
var
  Kernel32: HMODULE;
  DebugProc: TDebugProc;
begin
  Result := False;
  Kernel32 := GetModuleHandle('kernel32');
  if Kernel32<>0 then
  begin
    @DebugProc := GetProcAddress(Kernel32, 'IsDebuggerPresent');
    if Assigned(DebugProc) then
      Result := DebugProc
  end;
end;