4 messages in net.java.dev.jna.usersRe: [jna-users] Re: Buffers as struct...
FromSent OnAttachments
Albert StrasheimMar 8, 2008 12:07 am 
Albert StrasheimMar 8, 2008 12:24 am 
Timothy WallMar 8, 2008 5:21 am 
Albert StrasheimMar 8, 2008 11:59 am 
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] Re: Buffers as structure fieldsActions...
From:Albert Strasheim (full@gmail.com)
Date:Mar 8, 2008 11:59:36 am
List:net.java.dev.jna.users

Hello,

On Sat, Mar 8, 2008 at 3:21 PM, Timothy Wall <twal@dev.java.net> wrote:

Put it in as a RFE. The tricky part is figuring out what to do on structure read.

When reading, you have to figure out whether to re-use a user-created buffer, create a new one, or re-use an auto-created one, or leave the field alone.

Right, I'd think about all the possibilities, even for direct buffers.

I am mostly interested in the case where you populate a struct with pointers to some buffers after which it is never changed by native code.

Non-direct buffers have a lot more corner cases.

I bet.

Anyway, I'll file the RFE. As a temporary workaround, I added some "setter" methods to my native library.

Cheers,

Albert