Sun GlassFish Message Queue 4.4 Developer's Guide for C Clients

MQSetBytesMessageBytes

The MQSetBytesMessageBytes function defines the body for a bytes message.


MQSetBytesMessageBytes 
                  (const MQMessageHandle messageHandle,
                   const MQInt8 * messageBytes,
                   MQInt32 messageSize);

Return Value

MQStatus. See the MQStatusIsError() function for more information.

Parameters

messageHandle

A handle to an MQ_BYTES_MESSAGE message whose body you want to set.

messageBytes

A pointer to the bytes you want to set. The library makes a copy of the message bytes.

messageSize

An integer specifying the number of bytes in messageBytes .

After you obtain the handle to a bytes message from MQCreateBytesMessage , you can use this handle to define its body with the MQSetBytesMessageBytes() function, to set its application-defined properties with the MQSetMessageProperties() function, and to set certain message headers with the MQSetMessageHeaders() function.