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. |
This property indicates the length (in Unicode characters) of the format name buffer of the administration queue.
- 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_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_QUEUEin the MQMSGPROPSstructure. Then call MQReceiveMessageand examine the returned values.
When MQReceiveMessagesucceeds, 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 MQReceiveMessagefails, 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 MQReceiveMessageagain.
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 MQMSGPROPSstructure.
Copy Code | |
---|---|
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++; |
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 |