tibrvMsg_Create()
Function
Declaration
tibrv_statustibrvMsg_Create
(
tibrvMsg* message);
tibrv_statustibrvMsg_CreateEx
(
tibrvMsg* message,
tibrv_u32 initialStorage);
Purpose
Allocate storage and initialize it as a new message.
Remarks
This function allocates storage for the new 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().
Programs can add address information to the message using tibrvMsg_SetSendSubject(), and tibrvMsg_SetReplySubject().
Message Size
When adding data to a message would overflow the allocated space, the message automatically expands by allocating additional storage. However, when creating messages that contain many small fields, you can optimize program performance by pre-allocating sufficient storage initially.
Parameter |
Description |
|
The function stores a pointer to the new message in this location. |
|
Initial space (in bytes) to allocate for the message. |