5 messages in net.java.dev.jna.usersRe: [jna-users] Callback repeatedly c...
FromSent OnAttachments
Paul GiffordSep 12, 2008 7:48 am 
Timothy WallSep 12, 2008 8:14 am 
Paul GiffordSep 12, 2008 8:46 am 
Timothy WallSep 12, 2008 8:50 am 
Paul GiffordSep 12, 2008 9:27 am 
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] Callback repeatedly calledActions...
From:Paul Gifford (paul@yahoo.com)
Date:Sep 12, 2008 9:27:26 am
List:net.java.dev.jna.users

That did it!  It works great!  Now I can keep my job for another day :)  Thanks
for your help...if you had a Paypal donation box I'd gladly chip in.  How about
this...it's Friday, take the rest of the day off :)   Paul  

----- Original Message ---- From: Timothy Wall <twal@dev.java.net> To: use@jna.dev.java.net Sent: Friday, September 12, 2008 11:50:54 AM Subject: Re: [jna-users] Callback repeatedly called

On Sep 12, 2008, at 11:46 AM, Paul Gifford wrote:

The callback should return right away.  I wasn't sending anything  funny to the out stream.

Here's the callback method signature:

DWORD __stdcall HandleDataEvent(UCHAR *pData, DWORD deviceID, DWORD  error)                 ^^^^^^^^^

and here's how I implemented it:

    public interface PedalCallback extends Callback

                                                                  ^^^^^^^^ Your callback signatures don't match calling convention.  So when your  callback returns, you've corrupted the stack.  Use StdCallCallback  instead.