7
741025
Unregistered / Unconfirmed
GUEST, unregistred user!
function MouseProc(nCode:integer; wParam:WParam; lParam:LParam): LRESULT; stdcall;begin Result := 0; if nCode<0 then Result:=CallNextHookEx(HookHandle,nCode,wParam,lParam); //Rule of API call, which referred to Win32 Hooks topic in MSDN //if ( (wParam = WM_LBUTTONUP ) or ( wParam = WM_NCLBUTTONUP) ) then if ( (wParam = wm_close )) then SendMessage(pSharedMem^.InstHandle,pSharedMem^.MessageID,0,0); //Sends Message to Instance to which was injected this DLLend;function StartHook(Sender:HWnd; MessageID:word):BOOL;begin Result := False; if HookHandle<>0 then Exit; //Already Installed the hook pSharedMem^.InstHandle := Sender; pSharedMem^.MessageID := MessageID; HookHandle := SetWindowsHookEx(WH_GETMESSAGE ,MouseProc,hInstance,0); Result := HookHandle <> 0;end;