also müsste ich das in etwa so machen:
Delphi-Quellcode:
type
TCallback = procedure(bla: Integer); cdecl;
TMethodCallback = procedure(bla: Integer) of object; cdecl;
TDings = class
private
FCallback: TCallback;
FMethodCallback: TMethodCallback;
Method(bla: Integer); cdecl;
end;
//erstellen
FCallback := TCallback(MakeCdeclCallback(TMethod(FMethodCallback), 4));
FMethodCallback := Method;
procedure TDings.Method(bla: Integer); cdecl;
begin
ShowMessage('MethodCallback: ' + string(Text));
end;
//weg damit
FreeCdeclCallback(@FCallback);
//Hooken
HookHandle := SetWindowsHookEx(WH_KEYBOARD_LL, FCallback, hInstance, 0);
stimmt das alles?