Günther,
Use hb_xgrab( length_of_the_array * size_of_each_element ) to dynamically allocate the required struct memory and call hb_xfree() to release it once you are done.
Please review the source code of source\winapi\drawing.c function PolyPoligon()