Sun Java System Message Queue 4.3 Developer's Guide for C Clients

MQGetTextMessageText

The MQGetTextMessageText function passes back the contents of a text message.


MQGetTextMessageText(const MQMessageHandle messageHandle,
                           ConstMQString * messageText);

Return Value

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

Parameters

messageHandle

A handle to an MQ_TEXT_MESSAGE message that is passed to you when you receive a message.

messageText

The output parameter that points to the message text.

After you obtain the handle to a message, you can use the MQGetMessageType() function to determine its type and, if the type is text, you can use the MQGetTextMessageText() function to retrieve the message text.

The MQString passed to you by this function is not a copy. You should not modify the bytes or attempt to free it.