Navigation:  Reference > Functions By Category > Strings >

ppMarshall2Array()

Previous pageReturn to chapter overviewNext page

ppMarshall2Array( pMem ) -> aArray

 

Gets the strings from Array2ppMarshall() back to the array.

 

The application is responsible to free this buffer using _xfree() when no longer required.

 

_marshall

 

See a snippet of code from libpq4xb.prg ( published in xfree.resources )

 

BEGIN STRUCTURE pqPrintOpt

 ..... other structure members ......

  MEMBER POINTER32 fieldName

  DYNAMIC METHOD SetFieldNames BLOCK {|s,a| _xfree(s:fieldName),;

                   s:fieldName := iif(a == NIL,0,Array2ppMarshall(a)) }

  DYNAMIC METHOD GetFieldNames BLOCK {|s| ppMarshall2Array(s:fieldName) }

END STRUCTURE

 

ppMarshall2Array(pArrayOfStringPointers  ) returns an Xbase++ array from a C array terminated with a NULL pointer.

Really the C string array not need to be marshalized as ppMarshall2Array() does not deallocate the memory,

but as the name indicate it is the reverse function of Array2ppMarshall()

 

For more information about marshalling see here:

English:        http://en.wikipedia.org/wiki/Marshalling_(computer_science)

German:        http://en.wikipedia.org/wiki/Marshalling_(computer_science)