Article View: borland.public.cppbuilder.nativeapi
Article #17293Re: Hooking another application
From: Remy Lebeau (TeamB)
Date: Fri, 28 Mar 2003 00:46
Date: Fri, 28 Mar 2003 00:46
28 lines
1945 bytes
1945 bytes
"nicolasr" <nicolasrATSIGNgmx.net> wrote in message news:3e83949f@newsgroups.borland.com... > On the other hand with PostMessage() I maybe could > implement a timeout mechanism. Have a look at the SendMessageTimeout() function. Then you can have both in a single call. > I'm a little unsure about the parameters passed to > SetWindowsHookEx? Must the third parameter be > NULL or not in my special case? You can't pass NULL since you're trying to hook another process. NULL is only valid if you are hooking your own process, in which case a DLL is not needed at all. But to hook another process, a DLL is required, and the third parameter is the instance handle for the DLL itself, not the application. > The callback in the DLL looks like this: <snip> You need to export your callback functions from the DLL, if you're not already. Gambit
Technical Details
Message-ID:
<3e839928$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!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>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-27 16:44:05 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> 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> Subject: Re: Hooking another application Date: Thu, 27 Mar 2003 16:46:52 -0800 Lines: 30 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 207.175.226.26 Message-ID: <3e839928$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1048811816 207.175.226.26 (27 Mar 2003 16:36:56 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail