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 5, 2008 7:46:29 am
List:net.java.dev.jna.users

Timothy Wall pisze:

The unicode version of the structure uses wchar_t-based strings, which are represented by WString in JNA, unless you define a type converter for String to WString (see W32API.DEFAULT_OPTIONS). It's easier (and results in a cleaner interface definition) to pass W32API.DEFAULT_OPTIONS to loadLibrary, then you can omit the "-W" suffix from methods and use String for LPTCSTR.

I did that (public static WindowsComDlg32 INSTANCE = (WindowsComDlg32) Native.loadLibrary("comdlg32.dll", WindowsComDlg32.class, W32API.DEFAULT_OPTIONS)) but it still doesn't work - after selection lpstrFile is null.

ML