On Oct 16, 2008, at 5:16 PM, Clovis de Oliveira Leoncio Pinheiro
Junior wrote:
I'm trying to map the following structure:
typedef struct _wfs_chk_in_process_form
{
LPSTR lpszFormName;
LPSTR lpszMediaName;
LPSTR lpszInputFields;
LPSTR lpszOutputFields;
LPWSTR lpszUNICODEOutputFields;
DWORD dwOptions;
} WFSCHKINPROCESSFORM, * LPWFSCHKINPROCESSFORM;
LPSTR is equivalent to char**. A sample definition from the DLL
provider is:
lpszInputFields
Pointer to a list of null-terminated field names from which to
read input data, with the final
name terminating with two null characters.
When I'm trying to map this field as String[] I get a "Inline array
of class java.lang.String not supported" error. Any Idea?
You want a Pointer field, not an inline array.
You can use StringArray to initialize a block of char* in native
memory; the field would then need to be of type Pointer. StringArray
automatically NULL-terminates the list of strings. You'll need to
manually invoke StringArray.read() in order to update the contents
after they've been changed by native code.