Ok I see. I have to call the C function that is used to initialize mesh_t in
java.
Thanks.
________________________________
De : Paul Loy <kete...@gmail.com>
À : use...@jna.dev.java.net
Envoyé le : Mercredi, 22 Octobre 2008, 18h22mn 38s
Objet : Re: [jna-users] Re : [jna-users] struct **** as argument
so mesh_t **** is a pointer to a multidimensional array of mesh_t structures, or
a portion of memory. Is there a utility function in the library for initialising
a mesh_t ****? If so use that. If not, it gets a lot more difficult as we'll
have to use Memory, but that needs to be the right size!
Where, if you were writing this in native (C) code, would you have gotten 'a'
from? That's where you need to get it from in JNA too.
Showing us an actual use case in native code is very useful!
i.e. in native code:
mesh_t **** mesh_array = SOME_FUNCTION_CALL_OR_INITIALIZATION_HERE;
bunch_of_ray(mesh_array);
what is SOME_FUNCTION_CALL_OR_INITIALIZATION_HERE?
Paul.
On Wed, Oct 22, 2008 at 5:04 PM, amina guermouche <guer...@yahoo.fr> wrote:
How do I initialize a Pointer?
Whenever I use Pointer a and then call a function that has a as a parameter, I
have an error about initialization of the pointer.
Thanks.
________________________________
De : Paul Loy <kete...@gmail.com>
À : use...@jna.dev.java.net
Envoyé le : Mercredi, 22 Octobre 2008, 17h40mn 22s
Objet : Re: [jna-users] struct **** as argument
Pointer looks like the one to use here.
On Wed, Oct 22, 2008 at 4:35 PM, amina guermouche <guer...@yahoo.fr> wrote:
Hie,
I have a C structure called mesh_t.
It's used as a mesh_t **** a and is an argument of a function I need to call
from JAVA:
void bunch_of_ray(struct mesh_t ****a)
I don't know how to write this function in JAVA (if it was just a struct *
mesh_t I'd have passed the structure direclty).
Thank You.
--
---------------------------------------------
Paul Loy
pa...@keteracel.com
http://www.keteracel.com/paul
---------------------------------------------
Paul Loy
pa...@keteracel.com
http://www.keteracel.com/paul