2 messages in net.java.dev.jna.users[jna-users] Callback does not handle ...
FromSent OnAttachments
Alex Lam S.L.Aug 23, 2008 3:18 am 
Timothy WallAug 23, 2008 5:20 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:[jna-users] Callback does not handle String or varargsActions...
From:Alex Lam S.L. (alex@gmail.com)
Date:Aug 23, 2008 3:18:35 am
List:net.java.dev.jna.users

Hi there,

For dll functions which have "char *" or "...", I can use String and Java Varargs as method parameters and it works like a charm.

However, when I tried to do the same with Callback:

typedef int (*PFKT) (char *format, ...);

public interface PFKT extends Callback { int callback(String format, Object ... parameters); }

JNA claims that it cannot find the right conversion to "parameters". It would run if I declare "parameters" as Pointer instead, but it is evidently not the best solution.

Any pointers on the issue?

Regards, Alex.