Einzelnen Beitrag anzeigen

Benutzerbild von dataspider
dataspider

Registriert seit: 9. Nov 2003
Ort: 04539 Groitzsch
1.350 Beiträge
 
Delphi 11 Alexandria
 
#5

Re: nerviges CPU Debugging Fenster

  Alt 19. Jun 2007, 14:07
Hi,

ich hatte ein ähnliches Problem beim Start aus Delphi.
Ich habe dann folgende Lösung irgendwo im InderNet gefunden:

Delphi-Quellcode:
unit KillCPUWindow;

interface

uses
  Types, SysUtils, Windows;

implementation

  procedure PatchINT3;
  var
    NOP : Byte;
    NTDLL: THandle;
    BytesWritten: DWORD;
    Address: Pointer;
  begin
    if Win32Platform <> VER_PLATFORM_WIN32_NT then Exit;
    NTDLL := GetModuleHandle('NTDLL.DLL');
    if NTDLL = 0 then Exit;
    Address := GetProcAddress(NTDLL, 'DbgBreakPoint');
    if Address = nil then Exit;
    try
      if Char(Address^) <> #$CC then Exit;

      NOP := $90;
      if WriteProcessMemory(GetCurrentProcess, Address, @NOP, 1, BytesWritten) and
        (BytesWritten = 1) then
        FlushInstructionCache(GetCurrentProcess, Address, 1);
    except
      //Do not panic if you see an EAccessViolation here, it is perfectly harmless!
      on EAccessViolation do ;
      else raise;
    end;
  end;

  initialization
    if DebugHook<>0 then
     PatchINT3;
end.
Vielleicht hilft es ja auch bei dir...

Frank
Frank Reim
  Mit Zitat antworten Zitat