6 messages in net.java.dev.jna.usersRe: [jna-users] Re: call by reference...
FromSent OnAttachments
Mr Young-soo SongFeb 29, 2008 1:38 am 
Timothy WallMar 2, 2008 6:16 am 
Mr Young-soo SongMar 3, 2008 7:42 pm 
Timothy WallMar 4, 2008 5:42 am 
Mr Young-soo SongMar 5, 2008 12:24 am 
Timothy WallMar 5, 2008 6:24 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] Re: call by reference of double arrayActions...
From:Timothy Wall (twal@dev.java.net)
Date:Mar 4, 2008 5:42:55 am
List:net.java.dev.jna.users

On Mar 3, 2008, at 10:42 PM, Mr Young-soo Song wrote:

Thanks for your answer. But I couldn't get the right value yet. I'd like to get the double array output from DLL by calling by reference. If you provide any sample code of doing this. It would be great to understand how to use it.

Could you give me a example for Memory or DoubleBuffer?

void getValues(double[] array) void getValues(Pointer array) void getValues(DoubleBuffer array);

array = new double[1024]; array = new Memory(1024 * Double.SIZE*8); array = DoubleBuffer.allocate(1024); // on heap array = ByteBuffer.allocateDirect(1024*Double.SIZE*8).asDoubleBuffer(); // as direct (native) buffer

This assumes that the "byref doubleArray" is a pointer to memory.