Compartir a través de


MQGetQueueProperties (Windows CE 5.0)

Send Feedback

This function retrieves the specified set of properties for a local queue.

HRESULT APIENTRY MQGetQueueProperties(LPCWSTR lpwcsFormatName,MQQUEUEPROPS* pQueueProps);

Parameters

  • lpwcsFormatName
    [in] Pointer to the format name string of the queue whose properties will be retrieved. Use only the direct format name to specify the queue.

  • pQueueProps
    [in, out] Pointer to the MQQUEUEPROPS structure where the properties are specified.

    On input, the cProp member of MQQUEUEPROPS specifies the number of properties to be retrieved and the aPropID array specifies the specific properties.

    On output, the aPropVar array indicates the current values of the requested properties and the optional aStatus array indicates their status. (To use the property status array, include the aStatus in the MQQUEUEPROPS declaration.)

Return Values

  • MQ_OK
    Indicates success.

  • MQ_ERROR_ILLEGAL_FORMATNAME
    The lpwcsFormatName parameter specified an illegal format name.

  • MQ_ERROR_ILLEGAL_PROPERTY_VT
    The variant type of a property does not match the expected variant type.

    For example, with PROPID_Q_PATHNAME and PROPID_Q_LABEL, the expected variant type is VT_NULL.

  • MQ_ERROR_PROPERTY
    One or more properties resulted in an error.

  • MQ_ERROR_SERVICE_NOT_AVAILABLE
    Cannot connect to the Queue Manager.

  • MQ_ERROR_UNSUPPORTED_FORMATNAME_OPERATION
    The format name specified in the lpwcsFormatName parameter cannot be used. You cannot get properties from a queue using a direct format name.

  • MQ_INFORMATION_DUPLICATE_PROPERTY
    The same property appears more than once in the aPropID array. This information is returned on the second appearance of the property.

  • MQ_INFORMATION_PROPERTY
    One or more properties resulted in a warning code even though the function was completed.

  • MQ_INFORMATION_UNSUPPORTED_PROPERTY
    Not a valid property identifier. The property is ignored.

Remarks

To retrieve the queue's path name (PROPID_Q_PATHNAME) or label (PROPID_Q_LABEL), the corresponding property's variant type must be initially set to VT_NULL so MSMQ knows to allocate memory for the returned value. After using the retrieved value, the application must then call MQFreeMemory to free the memory allocated by MSMQ.

Requirements

OS Versions: Windows CE 2.0 and later. Versions prior to 2.12 require the MSMQ add-on pack.
Header: Mq.h.
Link Library: Msmqrt.lib.

See Also

aPropID | aPropVar | aStatus | MQFreeMemory | PROPID_Q_LABEL | PROPID_Q_PATHNAME | MQQUEUEPROPS

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.