T
tanxj
Unregistered / Unconfirmed
GUEST, unregistred user!
我从网上得动一些资料,做了一个hookdll.dll
在此dll文件中有如下
HookHandle := SetWindowsHookEx(WH_MOUSE, MouseHookCallBack, HInstance, 0)
function MouseHookCallBack(Code: integer; Msg: WPARAM; MouseHook: LPARAM): LRESULT; stdcall;
function MouseHookCallBack(Code: integer; Msg: word; MouseHook: longint): longint; export;
begin
; if Code >= 0 then begin
; ; case Msg of:
; ; ; WM_LBUTTONDOWN:
; ; ; ; begin
; ; ; ; ; ; ;..........?
; ; ; ; end;
; ; ; WM_LBUTTONUP:
; ; ; ; begin
; ; ; ; ; ; ........?
; ; ; ; end;
; ; ;end;
; Result := CallNextHookEx(HookHandle, Code, Msg, MouseHook);
;end;
我想在mouse有按下左键时运行如下代码:
; clientform.clientsocket.socket.SendText('Mouse1');
;//发送一个mouse动作给服务端
可以在?号处加上怎么代码让它去到clientform,然后在clientform 中加入怎么代码才能执行
clientform.clientsocket.socket.SendText('Mouse1');???
在此dll文件中有如下
HookHandle := SetWindowsHookEx(WH_MOUSE, MouseHookCallBack, HInstance, 0)
function MouseHookCallBack(Code: integer; Msg: WPARAM; MouseHook: LPARAM): LRESULT; stdcall;
function MouseHookCallBack(Code: integer; Msg: word; MouseHook: longint): longint; export;
begin
; if Code >= 0 then begin
; ; case Msg of:
; ; ; WM_LBUTTONDOWN:
; ; ; ; begin
; ; ; ; ; ; ;..........?
; ; ; ; end;
; ; ; WM_LBUTTONUP:
; ; ; ; begin
; ; ; ; ; ; ........?
; ; ; ; end;
; ; ;end;
; Result := CallNextHookEx(HookHandle, Code, Msg, MouseHook);
;end;
我想在mouse有按下左键时运行如下代码:
; clientform.clientsocket.socket.SendText('Mouse1');
;//发送一个mouse动作给服务端
可以在?号处加上怎么代码让它去到clientform,然后在clientform 中加入怎么代码才能执行
clientform.clientsocket.socket.SendText('Mouse1');???