9 messages in net.java.dev.jna.usersRe: [jna-users] Wrapping a C api to c...
FromSent OnAttachments
Richard OteroOct 12, 2007 3:59 pm 
Albert StrasheimOct 12, 2007 4:39 pm 
Albert StrasheimOct 12, 2007 5:51 pm 
Albert StrasheimOct 12, 2007 6:00 pm 
Timothy WallOct 13, 2007 6:05 am 
Timothy WallOct 13, 2007 7:05 am 
Timothy WallOct 13, 2007 7:27 am 
Albert StrasheimOct 13, 2007 10:55 am 
Richard OteroOct 14, 2007 2:50 pm 
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] Wrapping a C api to control Matlab using Java (with example)Actions...
From:Timothy Wall (twal@dev.java.net)
Date:Oct 13, 2007 6:05:11 am
List:net.java.dev.jna.users

On Oct 12, 2007, at 9:01 PM, Albert Strasheim wrote:

After reading matrix.h more carefully, it seems you don't have to make a Structure for mxArray. You can just use the various mx* functions to allocate it and set its contents.

So you can just map mxArray pointers to JNA's Pointer (is there a way to make a "typed" Pointer in a library interface? e.g., I'd like to make an EnginePointer and a MxArrayPointer so that I can't accidentally pass the wrong pointer into the wrong argument).

See com.sun.jna.PointerType, which performs just this purpose.

BTW, there are probably more than a few interested engineers if you post this on the Mathworks' file upload area for MATLAB.

T.