MQGetQueueProperties

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 of the 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 that 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

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 Mq.h Msmqrt.lib

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

aPropID, aPropVar, aStatus, MQFreeMemory, PROPID_Q_LABEL, PROPID_Q_PATHNAME, MQQUEUEPROPS

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.