The MQPathNameToFormatName function returns a format name based on the MSMQ pathname provided.
HRESULT APIENTRY MQPathNameToFormatName( LPCWSTR lpwcsPathName, LPWSTR lpwcsFormatName, LPDWORD lpdwCount );
On output, indicates the length of the returned format name string, including the null-terminating character. If the output value is greater than the initial input value, the supplied buffer is not large enough to contain the complete format name string and MQ_ERROR_FORMATNAME_BUFFER_TOO_SMALL is returned. In this case, only a portion of the format name is returned.
Private (local only) and public MSMQ pathnames can be specified.
Typically, this function is used when you need a format name to specify a queue when calling MQOpenQueue, MQGetQueueProperties, MQSetQueueProperties, MQGetQueueSecurity, or MQSetQueueSecurity and the only available information is the queue's MSMQ pathname.
The format name of a public queue cannot be returned by an independent client computer running offline. For information on offline operations, see MSMQ Offline Support.
Other format name translation functions include MQInstanceToFormatName and MQHandleToFormatName.
For an example of using MQPathNameToFormatName, see Sending Private Messages.
MQGetQueueProperties, MQGetQueueSecurity, MQHandleToFormatName, MQInstanceToFormatName, MQOpenQueue, MQSetQueueProperties, MQSetQueueSecurity