PROPID_M_ADMIN_QUEUE_LEN (Windows CE 5.0)
This property indicates the length (in Unicode characters) of the format name buffer of the administration queue.
Type Indicator
VT_UI4PROPVARIANT Field
ulValProperty 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_ADMIN_QUEUE.
Remarks
PROPID_M_ADMIN_QUEUE_LEN is only used by the receiving application when looking for the administration queue specified by the sending application.
On input, PROPID_M_ADMIN_QUEUE_LEN should be large enough to hold the format name string of the administration queue plus its null-terminating character.
To retrieve the format name of the administration queue, specify PROPID_M_ADMIN_QUEUE_LEN and PROPID_M_ADMIN_QUEUE in the MQMSGPROPS structure. Then call MQReceiveMessage and examine the returned values.
When MQReceiveMessage succeeds, test the returned value of PROPID_M_ADMIN_QUEUE_LEN to see if an administration queue was used.
A returned value of 0 indicates that no administration queue was specified by the sending application.
A nonzero returned value indicates that the format name of an administration queue was returned by PROPID_M_ADMIN_QUEUE.
If MQReceiveMessage fails, returning an MQ_ERROR_FORMATNAME_BUFFER_TOO_SMALL error, use the returned value of PROPID_M_ADMIN_QUEUE_LEN to reallocate the format name buffer and call MQReceiveMessage again.
This property is not needed when you are using Component Object Model (COM) components.
Examples
This example shows how PROPID_M_ADMIN_QUEUE_LEN and PROPID_M_ADMIN_QUEUE are specified in the MQMSGPROPS structure.
aMsgPropId[i] = PROPID_M_ADMIN_QUEUE_LEN; // Property ID
aMsgPropVar[i].vt = VT_UI4; // Type indicator
aMsgPropVar[i].ulVal = dwAdminFormatNameBufferLength;
i++;
aMsgPropId[i] = PROPID_M_ADMIN_QUEUE; // Property ID
aMsgPropVar[i].vt = VT_LPWSTR; // Type indicator
aMsgPropVar[i].pwszVal = wszAdminFormatNameBuffer;
i++;
Requirements
OS Versions: Windows CE 2.0 and later. Versions prior to 2.12 require the MSMQ add-on pack.
Header: Mq.h.
See Also
MQReceiveMessage | PROPID_M_ADMIN_QUEUE | MQMSGPROPS
Send Feedback on this topic to the authors