|This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.|
Add data to the provided data chain
int PtAddData( PtDataHdr_t **ptr, long type, long subtype, void *data, long len, PtDataRemoveF_t *remove );
- The address of the pointer to the chain the data should be added to.
- A unique data type.
- A subtype that's used to distinguish multiple blocks of data added as the same type. This argument shouldn't be -1, because -1 has special meaning when searching for a specific block within the provided data chain.
- A pointer to the data to be added to the provided data chain.
- The size of the block of data added, or 0 if it isn't required.
This function adds a piece of data to the provided data chain. The data provided must be in a block of memory created by malloc(). You can retrieve this data by calling PtFindData(), or PtFindNextData().
0 on success, or -1 if an error occurred (e.g. out of memory).