Copyright © TIBCO Software Inc. All Rights Reserved

> tibemsMsg_GetAsBytesCopy
> Function
> Purpose
> Copies a byte sequence representation of the message object into storage supplied by the program.
> C Declaration
> tibems_status tibemsMsg_GetAsBytesCopy(
> const tibemsMsg message,
> const void* bytes,
> tibems_int avail_size,
> tibems_int* actual_size );
> COBOL Call
> CALL "tibemsMsg_GetAsBytesCopy"
> USING BY VALUE message,
> BY REFERENCE bytes,
> BY VALUE avail-size,
> BY REFERENCE actual-size,
> RETURNING tibems-status
> END-CALL.

> | message has usage pointer.

> Parameters

> Parameter | Description
> message | Fill the byte array with the content of this message.
> bytes | Your program must supply storage suitable for a byte sequence. The function stores the byte sequence in this location.
> avail_size | The length of the storage available for the byte sequence.
> actual_size | The function stores the length of the byte sequence in this location.

> Remarks
> This call formats the data of the message as a byte sequence in EMS wire format, which is suitable for archiving in a file.
> Your program must allocate storage for the byte sequence, and supply a pointer to it as an argument.
> The byte sequence includes data from the message header, message properties, and all message fields.
> The byte sequence might contain interior null bytes.

> Status Code | Description
> TIBEMS_INSUFFICIENT_BUFFER | The buffer is not large enough for the data. The return parameter actual_size indicates the size of the required buffer.

> See Also
> tibemsMsg_CreateFromBytes on page 30
> tibemsMsg_GetAsBytes on page 32
> tibemsMsg_GetByteSize on page 36

Copyright © TIBCO Software Inc. All Rights Reserved