Re: Using Visual Basic to Write System-Wide Hooks
- From: "Mark Yudkin" <myudkinATcompuserveDOTcom@xxxxxxxxx>
- Date: Sun, 5 Jun 2005 12:27:10 +0200
"Jonathan Wood" <jwood@xxxxxxxxxxxxxxxx> wrote in message
news:e1QhCsEaFHA.3784@xxxxxxxxxxxxxxxxxxxxxxx
> Mark,
>
>> This is correct. There is no compiler-based technique that allows
>> cross-process memory sharing.
>
> Most of the system-wide hooks examples I've seen use the shared data
> segment
> approach so, unless you can provide some reason why this isn't as good as
> memory mapped files, I'm pretty much going to assume you're just guessing.
Read my post.
<quote>
Karl already said that memoy mapped files are
the simplest way to go if you need to go the shared memory route. There are
also much simpler means of dealing with simple IPC, and for VB6, DCOM /
COM[+], whilst not quite so "simple" from a system viewpoint, is trivial to
code from a VB6 viewpoint.
</quote>
There is no techniques for user-mode sharing of memory across processes in
the NT4/W2K/WXP/W2K3 family except memory mapped files.
Of course, if you were to read the documentation, you'd have seen the
section "Using Shared Memory in a Dynamic-Link Library", which describes
what Karl said.
>
>> Also there is no need for any form of shared storage whatsoever for
> calling
>> CallNextHookEx. The only parameters you need to pass to CallNextHookEx
>> are
>> those your DLL was passed when your hook was called.
>
> Well, there, you are clearly wrong. Ever look at the docs?
<Quote from MS docs>
The CallNextHookEx function passes the hook information to the next hook
procedure in the current hook chain. A hook procedure can call this function
either before or after processing the hook information.
Syntax
LRESULT CallNextHookEx( HHOOK hhk,
int nCode,
WPARAM wParam,
LPARAM lParam
);Parameters
hhk
Ignored.
nCode
[in] Specifies the hook code passed to the current hook procedure. The
next hook procedure uses this code to determine how to process the hook
information.
wParam
[in] Specifies the wParam value passed to the current hook procedure. The
meaning of this parameter depends on the type of hook associated with the
current hook chain.
lParam
[in] Specifies the lParam value passed to the current hook procedure. The
meaning of this parameter depends on the type of hook associated with the
current hook chain.
</Quote>
Nex time you want to be rude about reading documentation, RTFM yourself
first. That ways you won't look quite so stupid.
>> But on the other hand, you don't just argue with Sam, you also don't want
> to
>> listen to me either.
>
> Well, I already demonstrated without question that Sam was wrong about VB
> DLLs unable to have callback because of the way they export functions but
> he
> doesn't have the balls to admit it. What exactly do you think I missed
> that
> you said? I don't even see any other posts by you.
SEARCH THIS FORUM!
>
> --
> Jonathan Wood
> SoftCircuits
> http://www.softcircuits.com
> Available for consulting: http://www.softcircuits.com/jwood/resume.htm
>
>
.
- Follow-Ups:
- Re: Using Visual Basic to Write System-Wide Hooks
- From: Jonathan Wood
- Re: Using Visual Basic to Write System-Wide Hooks
- From: J French
- Re: Using Visual Basic to Write System-Wide Hooks
- References:
- Using Visual Basic to Write System-Wide Hooks
- From: Jonathan Wood
- Re: Using Visual Basic to Write System-Wide Hooks
- From: Sam Hobbs
- Re: Using Visual Basic to Write System-Wide Hooks
- From: Jonathan Wood
- Re: Using Visual Basic to Write System-Wide Hooks
- From: Mark Yudkin
- Re: Using Visual Basic to Write System-Wide Hooks
- From: Jonathan Wood
- Using Visual Basic to Write System-Wide Hooks
- Prev by Date: Re: Camcorder and VB6 application
- Next by Date: Passing string from VB to C++ dll routine
- Previous by thread: Re: Using Visual Basic to Write System-Wide Hooks
- Next by thread: Re: Using Visual Basic to Write System-Wide Hooks
- Index(es):
Relevant Pages
|