WebSphere Message Brokers
File: as08280_
Writer: Lorraine Waitt

Reference topic

This build: July 31, 2007 21:38:03

cpiBufferPointer

Purpose

Gets a pointer to the buffer containing the bit stream representation of the input message, for the specified parser object.

Syntax

const CciByte* cpiBufferPointer(
  int*        returnCode,
  CciParser*  parser);

Parameters

returnCode
Receives the return code from the function (output).
Possible return codes are:
  • CCI_SUCCESS
  • CCI_EXCEPTION
  • CCI_INV_PARSER_OBJECT
  • CCI_NO_BUFFER_EXISTS
parser
Specifies the address of the parser object (input).

Return values

If successful, the address of the buffer is returned. Otherwise, a value of zero (CCI_NULL_ADDR) is returned, and returnCode indicates the reason for the error.

Sample

This example is taken from the sample parser file BipSampPluginParser.c (lines 428 to 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;
Related concepts
User-defined parsers
User-defined extensions overview
Related tasks
Creating a parser in C
Related reference
cpiAppendToBuffer
cpiBufferByte
cpiBufferSize
C parser utility functions
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:38:03

as08280_ This topic's URL is: