Einzelnen Beitrag anzeigen

blablab

Registriert seit: 3. Jan 2006
509 Beiträge
 
Delphi 7 Enterprise
 
#8

AW: Tastatur-Eingaben abfangen

  Alt 16. Nov 2010, 14:54
Also ich hab eine Hook-dll, die ich so installiere:

MainForm:
Delphi-Quellcode:
function InstallHook(ThreadId: Cardinal): Boolean; stdcall; external FILE_HOOK;

...

CreateProcess(nil, name, nil, nil, true, CREATE_NEW_CONSOLE, nil, nil, StartupInfo, ProcessInfo);
Sleep(200);
InstallHook(ProcessInfo.dwThreadId)
Dll:
Delphi-Quellcode:
function InstallHook(ThreadId: Cardinal): Boolean; stdcall;
begin
   Handle := SetWindowsHookEx(WH_KEYBOARD, @HookProc, HInstance, ThreadId);
   Result := Handle <> 0;
end;
  Mit Zitat antworten Zitat