Bastiaan Veelo wrote:
So I figured out that the first element in the struct is an integer containing the length-1 of the array, but what it should look like for the rest I do not know yet. Do you have an idea?
Your approach relies on compiler-internal specifica that might change with future implementations of GPC. In C, I'd rather treat the GPC array as a pointer and access its contents and schema information with functions. Like this (untested):
Pascal unit:
type CStringArray = array of CString;
Function CStringArrayAt ( aArray: CStringArray; i: CInteger ): CString; attribute ( name = 'C_string_array_at' );
[...]
Function CStringArrayAt ( aArray: CStringArray; i: CInteger ): CString;
begin (* CStringArrayAt *) CStringArrayAt:= aArray [ i ]; end (* CStringArrayAt *);
C header:
char* C_string_array_at ( void* a_array, int i );
By this, you don't need to define a struct where you'd have to guess the correct position of the fields.
Regards,
Markus