H
hubdog
Unregistered / Unconfirmed
GUEST, unregistred user!
为什么我在hook.dll中用x:=pmousehookstruct(lparam)^.pt.x
PostMessage(HookRec^.Receiver,MOUSE_EVENT,x,y);
就可以得到x,y,而用
PostMessage(HookRec^.Receiver,MOUSE_EVENT,wParam,lParam);发出
用下面过程接收
procedure TForm1.CXHook1Mouse(Sender: TObject; appname: String; wParam,
lparam: Integer);
var
x,y:integer;
begin
x:=PMouseHookStruct(lparam)^.pt.x;//非法读取错误
y:=PMouseHookStruct(lparam)^.pt.y;//非法读取
listbox1.items.add('x:'+inttostr(x)+'y:'+inttostr);
end;
PostMessage(HookRec^.Receiver,MOUSE_EVENT,x,y);
就可以得到x,y,而用
PostMessage(HookRec^.Receiver,MOUSE_EVENT,wParam,lParam);发出
用下面过程接收
procedure TForm1.CXHook1Mouse(Sender: TObject; appname: String; wParam,
lparam: Integer);
var
x,y:integer;
begin
x:=PMouseHookStruct(lparam)^.pt.x;//非法读取错误
y:=PMouseHookStruct(lparam)^.pt.y;//非法读取
listbox1.items.add('x:'+inttostr(x)+'y:'+inttostr);
end;