const CciByte* cpiBufferPointer( int* returnCode, CciParser* parser);
如果成功,则返回缓冲区的地址。否则,返回零值(CCI_NULL_ADDR),并且 returnCode 参数表明错误的原因。
此示例取自样本解析器文件 BipSampPluginParser.c(428 行到 445 行):
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;