Home

 

DataLength (MQLONG) - output

This is the length in bytes of the application data in the message. If this is greater than BufferLength, only BufferLength bytes are returned in the Buffer parameter (that is, the message is truncated). If the value is zero, the message contains no application data.

If BufferLength is less than the message length, DataLength is still filled in by the queue manager, whether or not MQGMO_ACCEPT_TRUNCATED_MSG is specified on the GetMsgOpts parameter (see MQGMO - Options field for more information). This allows the application to determine the size of the buffer required to accommodate the message data, and then reissue the call with a buffer of the appropriate size.

However, if the MQGMO_CONVERT option is specified, and the converted message data is too long to fit in Buffer, the value returned for DataLength is:



 

Home