Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This property indicates the length (in Unicode characters) of the response queue format name buffer.

Type Indicator

VT_UI4

PROPVARIANT Field

ulVal

Property Values

On input, the length of the format name buffer (in Unicode characters) allocated by the receiving application.

On return, the length (in Unicode characters) of the format name string, including the null-terminating character, returned by PROPID_M_RESP_QUEUE.

Remarks

The PROPID_M_RESP_QUEUE_LEN property is only used by the receiving application to determine if a response message is needed and to determine the format name of a response queue.

On input, PROPID_M_RESP_QUEUE_LEN should be large enough to hold the format name string including the null-terminating character.

To retrieve the format name of the response queue, set PROPID_M_RESP_QUEUE and PROPID_M_RESP_QUEUE_LEN in the MQMSGPROPSstructure. Then call MQReceiveMessageand examine the returned values.

When MQReceiveMessagesucceeds, test the returned value of PROPID_M_RESP_QUEUE_LEN to see if a response queue was specified.

A returned value of 0 indicates that a response queue was not specified by the sending application and no response message is needed.

A nonzero return value indicates that the format name of a response queue was returned by PROPID_M_RESP_QUEUE.

If MQReceiveMessagefails, returning an MQ_ERROR_FORMATNAME_BUFFER_TOO_SMALL error, use the returned value of PROPID_M_RESP_QUEUE_LEN to reallocate the format name buffer and call MQReceiveMessageagain.

This property is not needed when you are using COM components.

Examples

This example shows how PROPID_M_RESP_QUEUE_LEN is specified in the MQMSGPROPSstructure when retrieving the format name of the response queue.

Copy Code
aMsgPropId[i] = PROPID_M_RESP_QUEUE_LEN; // Property ID
aMsgPropVar[i].vt = VT_UI4; 			 // Type indicator
aMsgPropVar[i].ulVal = dwRespFormatNameBufferLength;
i++;
aMsgPropId[i] = PROPID_M_RESP_QUEUE; 	// Property ID
aMsgPropVar[i].vt = VT_LPWSTR; 		// Type indicator
aMsgPropVar[i].pwszVal = wszRespFormatNameBuffer;
i++;
Note:
OS versions prior to 2.12 require the MSMQ add-on pack.

Requirements

Header mq.h
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also