CciSize cpiBufferSize( int* returnCode, CciParser* parser);
함수가 정상적으로 실행되면 버퍼 크기(바이트 단위)가 리턴됩니다. 오류가 발생하면, 0(CCI_NULL_ADDR)이 리턴되고 returnCode는 오류의 이유를 표시합니다.
다음 예는 샘플 구문 분석기 파일 BipSampPluginParser.c에서 발췌한 것입니다(428 - 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);