![]() |
WM_PASTE system-wide hook
Hi , Is there any way i can hook the Clipboard WM_PASTE operation , i know i must refer to WH_GetMessage hook procedure But really i don't how to implement it .
for WM_COPY i use this in a Hook Dll :
Delphi-Quellcode:
I need to hook the WM_PASTE for all Processes .
function SysMsgProc(Code:integer; wParam: Word; lParam: Longint) : longint; stdcall;
begin CallNextHookEx(SysHook, Code, wParam, lParam); if code = HC_ACTION then begin if TMsg(Pointer(lParam)^).message = WM_COPY then MessageBox(0, 'Copy Operation Detected', 'my DLL', 0); end; end; many thanks |
AW: WM_PASTE system-wide hook
System-wide? Simply put: nope there isn't. Each hook is limited to the window station in which it was installed.
But quite frankly it would make more sense had you also commented on what you are trying to achieve. Installing a clipboard viewer, for example, is more than enough to achieve what you are trying with the WM_COPY hook you gave as sample code. Aside from that each global hook (with few exceptions such as low-level keyboard hooks) causes the DLL with the hook function to be injected into the target process. This will only work if the bitness of process and DLL agree. If not, this will simply fail. |
Alle Zeitangaben in WEZ +1. Es ist jetzt 19:00 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz