5 messages in net.java.dev.jna.usersRe: [jna-users] Intercepting Win32 Me...
FromSent OnAttachments
sam westDec 2, 2008 9:42 pm 
Daniel KaufmannDec 3, 2008 3:39 am 
Timothy WallDec 3, 2008 3:43 am 
sam westDec 4, 2008 3:00 pm 
Timothy WallDec 4, 2008 4:33 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] Intercepting Win32 MessagesActions...
From:Timothy Wall (twal@dev.java.net)
Date:Dec 4, 2008 4:33:24 pm
List:net.java.dev.jna.users

On Dec 4, 2008, at 6:00 PM, sam west wrote:

Spot on!

You're right, I thought I was keeping a reference to the WndProcCallbackListener callback object, but your idea to subclass its finalize() method showed that it was getting garbage collected after the first time the callback occurred, preventing any subsequent message from then on getting sent to the AWT Window, and making the gui hang. Thanks to you both for your replies. I had a bit more of a play with the hooking technique, but am still unable to get it to work, I think because of that DLL handle problem. That's ok though, because subclassing WndProc seems like a more flexible approach anyway.

Would it be worthwhile for me to submit some sample code to the contrib CVS directory that deomnstrates how to do this?

Sure. Post a zip to the project issues list as a patch.