2 messages in net.java.dev.jna.usersMapping a call to a C function that r...
FromSent OnAttachments
Rui CaridadeDec 17, 2007 8:43 pm 
Timothy WallDec 18, 2007 8:13 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:Mapping a call to a C function that returns an array of StringsActions...
From:Rui Caridade (waih@yahoo.com)
Date:Dec 17, 2007 8:43:44 pm
List:net.java.dev.jna.users

Hello. I have a function that returns a list of Strings with the cdrom id names on the
pc (below)

char ** getCDRomDevices();

But whenever i try to call it from java , whether with byte [ ] [ ] or String [
] i get this error (the error below refers when i say within java the function
returns a byte [ ] [ ] )

Exception in thread "main" java.lang.IllegalArgumentException: Unsupported
return type class [[B at com.sun.jna.Function.invoke(Function.java:335) at com.sun.jna.Function.invoke(Function.java:229) at com.sun.jna.Library$Handler.invoke(Library.java:170) at $Proxy0.getCDRomDevices(Unknown Source) at test.main(test.java:43)

One other thing. I'm getting a file from the cdrom into something like this
(char * file), what would be the best way to map this.I later want to transfer
this data to a ByteBuffer (Direct).

Thanks for your input in advance

All the best

Rui