CPXXserializercreate and CPXserializercreate

This routine creates a new serializer.

int  CPXXserializercreate( CPXSERIALIZERptr * ser_p )

int  CPXserializercreate( CPXSERIALIZERptr * ser_p )

Description

This routine creates a new serializer. Use serializers created by this routine to serialize data in a platform-independent way. The serializer returned by this routine serializes data into a block of memory that is dynamically expanded as needed. To query the memory block, use the routines CPXXserializerlength/CPXserializerlength and CPXXserializerpayload/CPXserializerpayload. The memory requirement for storing an element of type T is sizeof(T). In order to de-serialize data, use a deserializer as returned by CPXXdeserializercreate/CPXdeserializercreate.

Arguments

ser_p
A pointer to where the routine will store the newly created serializer in case of success. This pointer must not be NULL.

Return

The routine returns 0 (zero) if successful and nonzero if an error occurs.