함수 IsApPRunningInDelphi : 부울;
var
hKernelDll : THANDLE;
proc_IsDebuggerPresent : TProcIsDebuggerPresent;
useFindWindow : 부울;
proc : FARPROC;
시작하다
useFindWindow := true;
if (Win32Platform = VER_PLATFORM_WIN32_NT) 그러면
시작하다
// 승리하지 않음
노력하다
hKernelDll := GetModuleHandle(kernel32);
if (hKernelDll = -1) 그러면
hKernelDll := LoadLibrary(kernel32);
if (hKernelDll <> -1) 그러면
시작하다
proc := GetProcAddress(hKernelDll, 'IsDebuggerPresent');
if (proc <> nil) 그러면
시작하다
proc_IsDebuggerPresent := proc;
결과 := proc_IsDebuggerPresent;
useFindWindow := 거짓;
끝;
끝;
제외하고
끝;
끝;
if(UseFindWindow) 다음
시작하다
if FindWindow('TAppBuilder', Nil) <> 0 그러면
결과 := 사실
또 다른
결과 := 거짓;
끝;
끝;