AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

WM_PASTE system-wide hook

Ein Thema von randy_dom · begonnen am 12. Apr 2012 · letzter Beitrag vom 14. Apr 2012
Antwort Antwort
randy_dom

Registriert seit: 28. Apr 2008
17 Beiträge
 
#1

WM_PASTE system-wide hook

  Alt 12. Apr 2012, 16:47
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:
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;
I need to hook the WM_PASTE for all Processes .


many thanks
  Mit Zitat antworten Zitat
Benutzerbild von Assarbad
Assarbad

Registriert seit: 8. Okt 2010
Ort: Frankfurt am Main
1.234 Beiträge
 
#2

AW: WM_PASTE system-wide hook

  Alt 14. Apr 2012, 16:00
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.
Oliver
"... aber vertrauen Sie uns, die Physik stimmt." (Prof. Harald Lesch)
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 15:23 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz