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 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 MQMGMTPROPSstructure that specifies the properties to be retrieved.
On input, the cPropsmember of the structure specifies the following:
- The number of properties specified
- The
aPropIDarray
specifies the identifiers of the properties
- The elements of the
aPropVararray must be set to VT_NULL
On output, the elements of the aPropVararray contain the returned property values.
- The number of properties specified
Return Value
- MQ_OK
-
Indicates success.
- MQ_ERROR_ILLEGAL_FORMATNAME (0xC00E001E)
-
The specified format name in pObjectNameis 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
pObjectNameparameter specifies a computer, retrieve only
those properties that start with PROPID_MGMT_MSMQ.
- If the
pObjectNameparameter 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 MQFreeMemoryto 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 |
Windows Mobile | Windows Mobile Version 5.0 and later |