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

MQGetDestinationName

The MQGetDestinatioName function passes back the name of the specified destination.


MQGetDestinationName (const MQDestinationHandle destinationHandle,
                             MQString * destinationName);

Return Value

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

Parameters

destinationHandle

A handle to the destination whose name you want to know.

destinationName

Output parameter for the destination name. The returned destinationName is a copy which the caller is responsible for freeing by calling the MQFreeString() function

Use the MQGetDestinationName function to get the name of a destination. This might be useful for applications that want to do some message processing based on the destination name.

This function is useful when using the Reply-To pattern. You can use the MQGetMessageReplyTo function to obtain a handle to the destination where the message should be sent. You can then use the MQGetDestinationName to get the name of that destination.