Share via


MQMgmtGetInfo (Windows Embedded CE 6.0)

1/6/2010

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

Syntax

HRESULT MQMgmtGetInfo(
  LPCWSTR pMachineName, 
  LPCWSTR pObjectName, 
  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 Value

  • 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

Header mqmgmt.h
Library msmqrt.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

MSMQ Functions
MQFreeMemory
aPropID
aPropVar