> tibemsObjectMsg
> Type
> Purpose
> A message containing a serializable object.
> Related Types
> tibemsMsg on page 21

> Function | Description | Page
> tibemsObjectMsg_Create | Create an object message. | 104
> tibemsObjectMsg_GetObjectBytes | Get the byte sequence representing a serialized object from a message. | 105
> tibemsObjectMsg_SetObjectBytes | Set the byte sequence of an object message. | 106

> Object Messages in C
> Object messages are used for objects created in .NET or Java. A C program can create, receive, and send object messages. For example, a C application can forward or store an object generated from a Java or .NET application.
> C programs cannot create object messages. However, a C program can receive an object message from a Java or .NET program, and forward it, or store it for later resending.
> Serialization
> The C library neither serializes objects nor reassembles them from bytes.
> tibemsObjectMsg_Create
> Function
> Purpose
> Create an object message.
> C Declaration
> tibems_status tibemsObjectMsg_Create(
> tibemsObjectMsg* message );
> COBOL Call
> CALL "tibemsObjectMsg_Create"
> USING BY REFERENCE message,
> RETURNING tibems-status
> END-CALL.

> | message has usage pointer.

> Parameters

> Parameter | Description
> message | The function stores a pointer to the new message in this location.

> Remarks
> This call creates a new object message.
> When your application creates a message, it also allocates storage for that message. This storage must subsequently be freed by a call to tibemsMsg_Destroy.
> See Also
> tibemsMsg_Create on page 28
> tibemsMsg_Destroy on page 31
> tibemsObjectMsg_GetObjectBytes
> Function
> Purpose
> Get the byte sequence representing a serialized object from a message.
> C Declaration
> tibems_status tibemsObjectMsg_GetObjectBytes(
> tibemsObjectMsg message,
> void** bytes,
> tibems_uint* byteSize );
> COBOL Call
> CALL "tibemsObjectMsg_GetObjectBytes"
> USING BY VALUE message,
> BY REFERENCE bytes,
> BY REFERENCE byteSize,
> RETURNING tibems-status
> END-CALL.

> | message and bytes have usage pointer.

> Parameters

> Parameter | Description
> message | Get bytes (representing an object) from this message.
> bytes | The function stores a pointer to the byte sequence (within the message) in this location.
> byteSize | The function stores the length of the byte sequence in this location.

> Remarks
> When the message does not contain an object (because none has been set), this function places null in the bytes argument, and zero in the byteSize argument.
> tibemsObjectMsg_SetObjectBytes
> Function
> Purpose
> Set the byte sequence of an object message.
> C Declaration
> tibems_status tibemsObjectMsg_SetObjectBytes(
> tibemsObjectMsg message,
> const void* bytes,
> tibems_uint byteSize );
> COBOL Call
> CALL "tibemsObjectMsg_SetObjectBytes"
> USING BY VALUE message,
> BY REFERENCE bytes,
> BY VALUE byteSize,
> RETURNING tibems-status
> END-CALL.

> | message has usage pointer.

> Parameters

> Parameter | Description
> message | Put bytes (representing an object) into this message.
> bytes | Use these bytes (representing a serialized object) as the message body data.
> byteSize | Length of the byte sequence.

> Remarks
> Setting the content of an object message stores a snapshot of the object. subsequent changes to the original object or its serialized representation (as a byte sequence) do not affect the message.

Copyright © TIBCO Software Inc. All Rights Reserved.