See the following piece of code:
BEGIN STRUCTURE MyStruct
MEMBER DWORD dwLen
MEMBER LPSTR pText
DYNAMIC PROPERTY cText ;
READ ::_read_(,-1,::dwLen) ;
WRITE ( ::dwLen := ::_write_ (v,-1) )
END STRUCTURE
// ----------------------------------------------
...
local oSt := MyStruct():New()
oSt:_nExtraSize_ := 248
oSt:_alloc_()
oSt:pText := oSt:_addressof(GWST_S_EXTRA)
Sometimes we need to provide structures followed by a variable length data block, for this purpose gwst provide the property _nExtraSize_ that allow to allocate some extra memory for our structure, when our gwst object is still not attached to a true memory pointer with any of the gwst methods ::_link_() , ::_alloc_() or ::_lock_(), and also is not a child member of another structure.
The gwst methods ::_read_() and ::_write_() will accept the value -1 in its second parameter (nShift) meaning to start read or writing at the beginning of the extra memory. Also the method ::_addressof_() with the parameter GWST_S_EXTRA will return the address where the extra memory begins.
So in the previous piece of code pText will point to values witted at cText, and dwLen will reflect the current size of the stored text.