P
Paul G. Tobey [eMVP]
Yes, I don't think that your application is being called in the same context
exactly, because the pointer has a different value than what you passed to
GWES to register the hook, but that's how I read the code, at least.
They're probably mapping the pointer to kernel space, then back to
application space, then passing it.
Yes, that's true and I hadn't thought of the pinning issue.
Paul T.
exactly, because the pointer has a different value than what you passed to
GWES to register the hook, but that's how I read the code, at least.
They're probably mapping the pointer to kernel space, then back to
application space, then passing it.
Yes, that's true and I hadn't thought of the pinning issue.
Paul T.
Oh fun, so you pass it in and it gets passed back filled out later. That
means that struct better be pinned or you're going to get all sorts of
non-reproduceable crashes in the field when you get GC compaction that
moves it.
--
Chris Tacke, eMVP
Join the Embedded Developer Community
http://community.opennetcf.com
"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:[email protected]...I've checked the GWES source code. The lparam parameter to the hook
callback does appear to be a pointer to the EVENTMSG structure that you
passed to the hooking function (so don't let that be deleted while you're
still using it!)
Yes, your application is going to be slower. You're seeing every single
message to every application before they go into any queue and,
therefore, you're causing all messages in the system to be serialized.
You do also have to CallNextHook in order to assure that the hooking
stack is handled correctly. It does work, although as I think we've
said, it's not for general use.
Paul T.