cniGetMessageContext

Gets the address of the message context associated with the specified message. The context of an existing message is used to create an output message, for example using the cniCreateMessage function.

Syntax

CciMessageContext* cniGetMessageContext(
  int*         returnCode,
  CciMessage*  message);

Parameters

returnCode
The return code from the function (output).
message
The address of the message object (input).

Return values

If successful, the address of the message context is returned. Otherwise, zero (CCI_NULL_ADDR) is returned, and the returnCode parameter indicates the reason for the error.

Example

  outMsg = cniCreateMessage(&rc, cniGetMessageContext(&rc, message));

Related concepts
User-defined Input nodes
User-defined message processing nodes
User-defined output nodes

Related tasks
Creating an input node in C
Creating a message processing node in C

Related reference
C language node utility functions
cniCreateMessage
cniDeleteMessage
cniFinalize
cniGetEnvironmentMessage
cniPropagate