Messages : tibemsObjectMsg

tibemsObjectMsg
Type
Purpose
A message containing a serializable object.
Related Types
tibemsMsg on page 21
 
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
 
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
 
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
 
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.