PROPID_M_RESP_QUEUE_LEN

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 MQMSGPROPS structure. Then call MQReceiveMessage and examine the returned values.

When MQReceiveMessage succeeds, first 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 MQReceiveMessage fails, 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 MQReceiveMessage again.

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

Example

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

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++;

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later. Versions prior to 2.12 require the MSMQ add-on pack. Mq.h    

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

MQReceiveMessage, PROPID_M_RESP_QUEUE, MQMSGPROPS

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.