kesavan_sridhar
asked on
Native method problem
Hi
I have a c language method that returns a pointer to struct (defined in c file) and
I want to use this c language to receive the value of the members of the structure
returned by the 'C' function.I cant use pointers in java.So how could I use the c function
to get the values of the struct returned by the 'C' function
Thanks sridhar
I have a c language method that returns a pointer to struct (defined in c file) and
I want to use this c language to receive the value of the members of the structure
returned by the 'C' function.I cant use pointers in java.So how could I use the c function
to get the values of the struct returned by the 'C' function
Thanks sridhar
ASKER
To Falter
Helo
Thanks for your response, but is it required to have dependent methods of
a c method to be declared as native method? I mean, if I have a abc() method
of c which I use as a native method
and this abc() method calls some xyz()
method in the c file should I
declare xyz() also as native method
in java file .please explain.
Thanks sridhar
de
Helo
Thanks for your response, but is it required to have dependent methods of
a c method to be declared as native method? I mean, if I have a abc() method
of c which I use as a native method
and this abc() method calls some xyz()
method in the c file should I
declare xyz() also as native method
in java file .please explain.
Thanks sridhar
de
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks very much falter
Bye
sridhar
Bye
sridhar
The wrapper calls the C-function
- getting the data from the struct
- creating a Java Object
- putting the data into the attributes of the Java object
- return this object to the JVM