tibrvMsg_CreateCopy()

Function

Declaration

tibrv_status tibrvMsg_CreateCopy(
   const tibrvMsg   message
   tibrvMsg*        copy);

Purpose

Copy a message.

Remarks

The copy is completely independent of the original message. Pointer data in fields are independent copies of the values.

This function copies only the data within the fields of the message. The copy does not include any supplementary information—for example, address information or certified delivery information. (Programs can explicitly add supplementary information to the copy using functions such as tibrvMsg_SetSendSubject().)

This function allocates the storage for the copy. The duration of the copy is independent of the original message.

A program owns the messages that it creates, and must destroy them to reclaim the storage. That is, each call to this function must be paired with a call to tibrvMsg_Destroy().

Parameter

Description

message

Copy this message.

copy

The function stores a pointer to the new copy in this location.

See Also

tibrvMsg_Destroy()

tibrvMsg_SetReplySubject()

tibrvMsg_SetSendSubject()