Compartir a través de


MQMgmtGetInfo (Windows CE 5.0)

Send Feedback

This function retrieves information about a queue or the Message Queuing installation on a computer.

HRESULT MQMgmtGetInfo(  LPCWSTRpMachineName,LPCWSTRpObjectName,MQMGMTPROPS* pMgmtProps);

Parameters

  • pMachineName
    [in] Pointer to a string that contains the name of the computer where the action will take place.

    Must be set to NULL in the embedded version of MSMQ.

  • pObjectName
    [in] Pointer to a string that describes the type of object.

    The following values are possible.

    Value Description
    L"MACHINE" Required when retrieving information about the queue manager.
    L"QUEUE=<formatname>" Required when retrieving information about a queue.
  • pMgmtProps
    [in, out] Pointer to an MQMGMTPROPS structure that specifies the properties to be retrieved.

    On input, the cProps member of the structure specifies the following:

    • The number of properties specified
    • The aPropID array specifies the identifiers of the properties
    • The elements of the aPropVar array must be set to VT_NULL

    On output, the elements of the aPropVar array contain the returned property values.

Return Values

  • MQ_OK
    Indicates success.
  • MQ_ERROR_ILLEGAL_FORMATNAME (0xC00E001E)
    The specified format name in pObjectName is illegal.
  • MQ_ERROR_ILLEGAL_PROPERTY_VT (0xC00E0019)
    An invalid type indicator was supplied for a property value in pMgmtProps.
  • MQ_ERROR_SERVICE_NOT_AVAILABLE (0xC00E000B)
    Cannot connect to the queue manager.
  • MQ_INFORMATION_UNSUPPORTED_PROPERTY (0x400E0004)
    An unsupported property identifier was specified in pMgmtProps.

Remarks

Use this function to retrieve two distinct sets of properties.

Use the following guidelines when making calls to this function.

  • If the pObjectName parameter specifies a computer, retrieve only those properties that start with PROPID_MGMT_MSMQ.
  • If the pObjectName parameter specifies a queue, retrieve only those properties that start with PROPID_MGMT_QUEUE.

You must set the type indicator of each property specified to VT_NULL.

When the type indicator is set to VT_NULL, Message Queuing allocates the resources needed for the returned values.

When the type indicator is not set to NULL,, the operation fails and an MQ_ERROR_ILLEGAL_PROPERTY_VT error is returned.

However, the application must call MQFreeMemory to free these resources when the returned values are not needed.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Mqmgmt.h.
Link Library: Msmqrt.lib.

See Also

MQFreeMemory | aPropID | aPropVar

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.