Quote Originally Posted by ?ëu?±o Mart??nez
By the way this code seems to work both Delphi and FPC:[pascal]PROGRAM example;
TYPE
TLIST_ITEMptr = ^TLIST_ITEM;
TLIST_ITEM = RECORD
Field: INTEGER;
Other: INTEGER;
END;

TLISTptr = ^TLIST;
TLIST = ARRAY [0..80] OF TLIST_ITEM;

FUNCTION get_list: TLISTptr; CDECL; EXTERNAL 'lib.dll';

VAR
TheList: TLISTptr;
BEGIN
{ Somewhere }
TheList := get_list;
WriteLn (TheList^[0]);
END.[/pascal]But the returned list size may vary from 1 to infinite, so this isn't the solution

¬øAlny idea about how to work with a non-sized array pointer in Delphi?

Thanks
Wait, first you say "returned list size" but then you are asking to work with non-sized? How do you find out size of this list?

Even this should work and reserve same space as 0..0 when using it through pointers, but this allows compiler to access up to item[255] manually, where 0..0 only allows for [0] or through variable because of range checking:
TLIST = ARRAY [0..255] OF TLIST_ITEM;