🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #3884

Re: Disable keyboard only

#3884
From: Remy Lebeau (TeamB)
Date: Tue, 11 Apr 2006 07:32
35 lines
2035 bytes
"Tom" <tom@net.com> wrote in message news:443b501d@newsgroups.borland.com...

> My Form code:

You should call SetWindowsHookEx() from inside the DLL's code, not the EXE's
code.  Have the DLL export two extra functions that the EXE can call to
set/remove the hook.

> MY Dll code:

You did not show your export statements.  Are you exporting the hook
function at all?

> Is this SetWindowsHookEx() ok

It does absolutely nothing to accomplish what you were originally asking
for.  You are not doing anything with the keystrokes, and you are not
discarding them.

> should I simply remove return 0 instead of
> CallNextHookEx(NULL, code, wParam, lParam) from dll?

Did you read the documentation yet?

    "To prevent Windows from passing the message to the rest of the hook
chain or to the target window procedure, the return value must be a nonzero
value."

Please go to http://www.deja.com and do a search through the newsgroup
archives.  Sample code for using global hooks has been posted many times
before.


Gambit
Technical Details
Message-ID: <443b5cbb$2@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <443ab295$1@newsgroups.borland.com> <443acbd9$1@newsgroups.borland.com> <443b501d@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,f3e4bc5a377be414
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <443ab295$1@newsgroups.borland.com> <443acbd9$1@newsgroups.borland.com> <443b501d@newsgroups.borland.com>
Subject: Re: Disable keyboard only
Date: Tue, 11 Apr 2006 00:32:01 -0700
Lines: 37
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <443b5cbb$2@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1144741051 68.69.17.41 (11 Apr 2006 00:37:31 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail