Mister Weps, yes it is true that dynamic arrays are used for using array with variable sizes at run time, however when you define the size using length(array,numelements) then Delphi (or what ever pascal compiler) will allocate that numelements size memory and will store a pointer and reference count; but the original problem is about how accesing elements into a block memory already allocated inside a C dll.

So you have a DLL which allocate internally an array and it returns a pointer to the first element, how you access in delphi easily more elements?, you cant just define a dinamic array in the delphi side, set the same length as the dll array and overwrite it with the returned pointer, (you will have a leek!);

so actually, after analizing the problem i think that

0..0 (with range checks disabled!!!) is the best solution. Delphi has no facilities for unbounded arrays.
looks best solution to me too.

tp.

Ps.
Indee i dont see neither in the original code where it is returned the amount elements allocated by the DLL, probably in a different call.