Forum: Win32/Win64 API (native code)
Delphi
by Relicted,
24. Okt 2007
genau wie WH_Keyboard und WH_Keyboard_LL verhält sich das ganze mit der maus... die messages ohne _LL sind nur lokal - also innerhalb des programms.
take that:
const
WH_Mouse_LL = 14;
gruß
Forum: Win32/Win64 API (native code)
Delphi
by Relicted,
23. Okt 2007
;-)
kein problem - dafür gibts dieses forum :-)
gruß
reli
Forum: Win32/Win64 API (native code)
Delphi
by Relicted,
23. Okt 2007
neeeeee....
const
WH_Keyboard_LL = 13;
wie ich vor ein paar posts schon geschrieben habe...
gruß
Forum: Win32/Win64 API (native code)
Delphi
by Relicted,
23. Okt 2007
ok fehler gefunden...
function KeyboardHookProc(nCode: Integer; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
begin
//es ist ebenfalls moeglich die Bearbeitung an eine Bedingung zu knuepfen
//it's possible to call CallNextHookEx conditional only.
Result := CallNextHookEx(HookHandle, nCode, wParam, lParam);
case nCode < 0 of
TRUE: exit; //wenn code kleiner 0 wird nix gemacht
Forum: Win32/Win64 API (native code)
Delphi
by Relicted,
23. Okt 2007
:gruebel: mit der fehlerbeschreibung kann ich leider nicht viel anfangen... da wird dann hilfe schwer... zip mal deinen quellcode und lad ihn hoch dann kann man mal reinschauen..
Forum: Win32/Win64 API (native code)
Delphi
by Relicted,
23. Okt 2007
TInstallHook = function(Hwnd: THandle): Boolean; stdcall;
TUninstallHook = function: Boolean; stdcall;
procedure InstallHook(); external 'keyboardHook.dll';
so klappt das natürlich nicht...
function InstallHook(Hwnd:THandle):boolean; stdcall; external 'keyboardHook.dll';
Forum: Win32/Win64 API (native code)
Delphi
by Relicted,
23. Okt 2007
klar kannst das so machen... aaaaber:
weil wenn du die funktion ned aufrufst passiert auch nix :-)
Forum: Win32/Win64 API (native code)
Delphi
by Relicted,
23. Okt 2007
mir fehlt auch irgendwie nen "installhook" :D
Forum: Win32/Win64 API (native code)
Delphi
by Relicted,
23. Okt 2007
versuch mal bitte ob key's ankommen wenn du die in das vorhandene memo klimperst... also zusätzlich zu den die normal auch auftauchen :-)
wenn das klappt dann kanns sein dass wir gerade nen localen hook gebaut haben :-) für global brauchst du:
const
WH_Keyboard_LL = 13;
//....
SetWindowsHookEx(WH_KEYBOARD_LL, //...
Forum: Win32/Win64 API (native code)
Delphi
by Relicted,
23. Okt 2007
richtig... das ganze kommt bei dir im hauptprogramm an...
ins hauptprogramm packste folgende funktion:
type
TForm1 = class( TForm )
//...
protected
procedure GotKeyMessage( var msg : TMessage ); message WM_KeyLogMessage;
Forum: Win32/Win64 API (native code)
Delphi
by Relicted,
23. Okt 2007
es muss folgendermaßen heißen:
@InstallHook := GetProcAddress(lib, 'InstallHook');
man beachte das @
... oder statisch angeben...