dcsimg
Pointers to structs as parameters
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Jon_Thorarinsson
Posted On:   Wednesday, October 13, 2004 09:33 AM

How do you send a pointer to a struct as a parameter to a native call? I have a C++ method that has the following signature: void foo(MyStruct* m); and the MyStruct is defined as follows: typedef struct{ unsigned char* x; unsigned char* y; } MyStruct; I would like to call this method from a java code, using JNI, preferably using the "shared stubs" technology, as described on the java.sun.com web site. Can anyone please help me? Thanks in advance, Jon.    More>>

How do you send a pointer to a struct as a parameter to a native call?


I have a C++ method that has the following signature:


void foo(MyStruct* m);


and the MyStruct is defined as follows:


typedef struct{ unsigned char* x; unsigned char* y; } MyStruct;


I would like to call this method from a java code, using JNI, preferably using the "shared stubs" technology, as described on the java.sun.com web site.


Can anyone please help me?


Thanks in advance,


Jon.

   <<Less
About | Sitemap | Contact