Article View: borland.public.cppbuilder.nativeapi
Article #14421It didn't ran!
From: Anibal
Date: Wed, 13 Aug 2003 13:40
Date: Wed, 13 Aug 2003 13:40
41 lines
2217 bytes
2217 bytes
this was the implemented solution (not completed) but it didn't ran.
//--------------------------------------------------------------------------
-
class THook
{
private:
protected:
public:
__fastcall THook();
virtual __fastcall ~THook();
void __fastcall SetHook();
HHOOK KeyboardHook;
DWORD CurrentThreadID;
LRESULT CALLBACK KeyboardHookProcedure(int Code, WPARAM wParam, LPARAM
lParam);
};
//--------------------------------------------------------------------------
-
LRESULT CALLBACK THook::KeyboardHookProcedure(int Code, WPARAM wParam,
LPARAM lParam)
{
return CallNextHookEx(KeyboardHook, Code, wParam, lParam);
}
//--------------------------------------------------------------------------
-
void __fastcall THook::SetApplicationHook()
{
CurrentThreadID = GetCurrentThreadId();
KeyboardHook = SetWindowsHookEx(WH_KEYBOARD,
(HOOKPROC)KeyboardHookProcedure, HInstance, CurrentThreadID);
return true;
}
//--------------------------------------------------------------------------
-
andre|braz
Technical Details
Message-ID:
<3f3a3f36@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f37d1d2@newsgroups.borland.com> <3f37d2da$1@newsgroups.borland.com> <3f37d498@newsgroups.borland.com> <3f38d0fd@newsgroups.borland.com> <3f392e9b$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,b8d2e09f76f4f6e3 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-08-13 06:40:12 PST From: "Anibal" <anibal@nospam.trigenius.pt> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f37d1d2@newsgroups.borland.com> <3f37d2da$1@newsgroups.borland.com> <3f37d498@newsgroups.borland.com> <3f38d0fd@newsgroups.borland.com> <3f392e9b$1@newsgroups.borland.com> Subject: It didn't ran! Date: Wed, 13 Aug 2003 14:40:47 +0100 Lines: 43 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 213.13.119.156 Message-ID: <3f3a3f36@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1060781878 213.13.119.156 (13 Aug 2003 06:37:58 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail