Bilger, Matthias | 28 Nov 13:00

Re: Welcome to the "Swig-user" mailing list

Hi,

I have to use a DLL from Java using JNI (JNA will not work < Java 1.4). So I have to write a WrapperDLL offers me a
JNI Interface to the DLL. The problem is a function like this:

int myProblemFunction(int inInt, myStruct** mst)

The struct looks like this:

typedef struct _mStruct{
	int var1;
	int var2;
	void* pointer;
} myStruct;

Is the only way to get the function working (using SWIG) to write a typemap? Or is there an easy to use solution
for this problem?

BTW: what would you call mst? Doublepointer?

Thanks a lot,
Best regards
Matthias Bilger

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
(Continue reading)

William S Fulton | 4 Dec 23:12
Favicon

Re: Welcome to the "Swig-user" mailing list

Bilger, Matthias wrote:
> Hi,
> 
> I have to use a DLL from Java using JNI (JNA will not work < Java 1.4). So I have to write a WrapperDLL offers me a
JNI Interface to the DLL. The problem is a function like this:
> 
> int myProblemFunction(int inInt, myStruct** mst)
> 
> The struct looks like this:
> 
> typedef struct _mStruct{
> 	int var1;
> 	int var2;
> 	void* pointer;
> } myStruct;
> 
> Is the only way to get the function working (using SWIG) to write a typemap? Or is there an easy to use
solution for this problem?
> 
> BTW: what would you call mst? Doublepointer?
> 
"pointer to pointer" is the search term you need and there is some 
advice in the Java.html chapter.

William

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
(Continue reading)


Gmane