1 message in net.java.dev.jna.users[jna-users] Re: The output param unsi...
FromSent OnAttachments
Timothy WallJan 15, 2009 8:13 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:[jna-users] Re: The output param unsigned char *data problemActions...
From:Timothy Wall (twal@dev.java.net)
Date:Jan 15, 2009 8:13:55 pm
List:net.java.dev.jna.users

On Jan 15, 2009, at 9:23 PM, fejjsong wrote:

Hello Timothy: this is a C function: LONG WINAPI HSM_GenWKByMK( HSMHANDLE Handle, int Encmod, int * KeyLen, unsigned char * SymKeyByMK ); the SymKeyByMK is a output param,in JAVA I mapped that byte[],but I can't get the out param,Is there something wrong with my mapping? Thanks for your time.

NativeLong HSM_GenWKByMK(Pointer handle, int encmod, IntByReference keylen, byte[] SymKeyByMK)

Just make sure your byte array is large enough to handle the output, and that your library implements StdCallLibrary.