11 messages in net.java.dev.jna.usersRe: [jna-users] jna and comdlg32.dll
FromSent OnAttachments
Marek LewczukFeb 4, 2008 2:36 pm 
Marek LewczukFeb 5, 2008 12:09 am 
Timothy WallFeb 5, 2008 5:52 am 
Marek LewczukFeb 5, 2008 7:13 am 
Timothy WallFeb 5, 2008 7:33 am 
Marek LewczukFeb 5, 2008 7:46 am 
Timothy WallFeb 5, 2008 8:05 am 
Timothy WallFeb 5, 2008 8:09 am 
Marek LewczukFeb 6, 2008 1:13 am 
Timothy WallFeb 6, 2008 5:35 am 
Marek LewczukFeb 6, 2008 6:00 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] jna and comdlg32.dllActions...
From:Marek Lewczuk (mar@lewczuk.com)
Date:Feb 6, 2008 6:00:21 am
List:net.java.dev.jna.users

Timothy Wall pisze:

On Feb 6, 2008, at 4:14 AM, Marek Lewczuk wrote:

Write a loop with a pointer offset to the current string and do Pointer.getString(offset, true) until you get an empty string. Each time increase offset by the length of the string just read, plus one, multiplied by the value of Native.WCHAR_SIZE.

I did that, and works great. Before your reply I've made a loop that read char by char with Pointer.getChar(), but I belive that getString() is better choice.

Read the docs. it says you'll get an error if the buffer is too small and returns the length needed as the first two bytes. Presumably you can then call it again without showing the dialog. kind of a crappy API.

Thanks. Now I know everything.

Thanks for help.

Btw, thanks for JNA - it's so comfortable to use it instead JNI.