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:Timothy Wall (twal@dev.java.net)
Date:Sep 12, 2008 8:50:31 am
List:net.java.dev.jna.users

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.