CciSize cpiBufferSize( int* returnCode, CciParser* parser);
If successful, the size of the buffer, in bytes, is returned. If an error occurs, zero (CCI_NULL_ADDR) is returned, and returnCode indicates the reason for the error.
This example is taken from the sample node file BipSampPluginParser.c (lines 428 to 452):
int cpiParseBufferEncoded( CciParser* parser, CciContext* context, int encoding, int ccsid ){ PARSER_CONTEXT_ST* pc = (PARSER_CONTEXT_ST *)context ; int rc; /* Get a pointer to the message buffer and set the offset */ pc->iBuffer = (void *)cpiBufferPointer(&rc, parser); pc->iIndex = 0; /* Save the format of the buffer */ pc->iEncoding = encoding; pc->iCcsid = ccsid; /* Save size of the buffer */ pc->iSize = cpiBufferSize(&rc, parser);