Article View: borland.public.cppbuilder.nativeapi
Article #17233Re: Hooking another application
From: nicolasr
Date: Mon, 31 Mar 2003 00:52
Date: Mon, 31 Mar 2003 00:52
25 lines
2278 bytes
2278 bytes
Hi, first of all thanks for your help. I have tried everything that came to my mind. I also read former posts from you and others regarding this topic but nothing helps. The problem is: I installed WH_GETMESSAGE and WH_CALLWNDPROCRET hooks. WH_GETMESSAGE works as expected when I call PostMessage() from my client. But the WH_CALLWNDPROCRET hook (used with SendMessage) is only called for messages not sent by my client. In my client I did SendMessage() with my custom message but it does not arrive in the callback. Then I sent f.e. WM_PAINT, still no success. (I used MessageBeep() in the DLL to check whether it arrives) To check whether the message arrives at the server at all I overwrote it's WndProc and yes, the messages all arrive in the servers WndProc but not in the DLLs hook proc? So, if anyone has any idea I would really appreciate it. If not, I think I will have to stick with PostMessage(). The problem is that I then have to pass message return values via shared memory or WM_COPYDATA and take care of synchronization... thanks, Nick
Technical Details
Message-ID:
<3e879160$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!cyclone.bc.net!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3e824b00@newsgroups.borland.com> <3e824e7e$1@newsgroups.borland.com> <3e834e27$1@newsgroups.borland.com> <3e835e66$1@newsgroups.borland.com> <3e83949f@newsgroups.borland.com> <3e839928$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,c5183b6fe95bcc6 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-03-30 16:57:32 PST From: "nicolasr" <nicolasrNOSPAMATSIGNgmx.net> Newsgroups: borland.public.cppbuilder.nativeapi References: <3e824b00@newsgroups.borland.com> <3e824e7e$1@newsgroups.borland.com> <3e834e27$1@newsgroups.borland.com> <3e835e66$1@newsgroups.borland.com> <3e83949f@newsgroups.borland.com> <3e839928$1@newsgroups.borland.com> Subject: Re: Hooking another application Date: Mon, 31 Mar 2003 02:52:59 +0200 Lines: 27 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 80.133.165.20 Message-ID: <3e879160$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1049071968 80.133.165.20 (30 Mar 2003 16:52:48 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!cyclone.bc.net!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail