MQGetMachineProperties
The MQGetMachineProperties function retrieves information about a Queue Manager computer.
HRESULT APIENTRY MQGetMachineProperties(
LPCWSTR lpwcsMachineName,
GUID pguidMachineID,
MQQMPROPS pQMProps
);
Parameters
-
lpwcsMachineName
-
[in] The name of the Queue Manager computer you want to access. If this parameter is used, set pguidMachineID to NULL.
-
pguidMachineID
-
[in] The identifier of the Queue Manager computer you want to access. If this parameter is used, set lpwcsMachineName to NULL.
-
pQMProps
-
[in, out] Pointer to a Queue Manager properties structure (MQQMPROPS), specifying which properties to retrieve.
Return Values
-
MQ_OK
-
Indicates success.
-
MQ_ERROR_ACCESS_DENIED
-
Access to the specified computer is denied. Verify the access rights for the operation.
-
MQ_ERROR_INVALID_PARAMETER
-
Both name (lpwcsMachineName) and computer (pguidMachineID) identifiers were specified.
-
MQ_ERROR_ILLEGAL_MQQMPROPS
-
Either pQMprops was NULL or no properties were specified.
-
MQ_ERROR_ILLEGAL_PROPERTY_VT
-
An invalid type indicator was supplied for one of the property values in pQMProps.
-
MQ_ERROR_MACHINE_NOT_FOUND
-
The specified computer could not be found in MQIS.
-
MQ_ERROR_NO_DS
-
No connection with the Site Controller server. Cannot access the MQIS.
-
MQ_INFORMATION_UNSUPPORTED_PROPERTY
-
An unsupported property identifier was specified in pQMProps.
-
MQ_INFORMATION_DUPLICATE_PROPERTY
-
A duplicate property identifier was specified in pQMProps. The second entry is ignored.
Remarks
If lpwcsMachineName and pguidMachineID are set to NULL, the properties of the local computer are retreived.
Valid Queue Manager properties are:
-
PROPID_QM_CONNECTION
-
PROPID_QM_ENCRYPTION_PK
-
PROPID_QM_MACHINE_ID
-
PROPID_QM_PATHNAME
-
PROPID_QM_SITE_ID
If a property specified by pQMProps is set to VT_NULL, MSMQ allocates the memory needed to store the property value when MQGetMachineProperties is called. However, when the returned property type replaces the VT_NULL value, the application must still free the memory allocated for the property value by calling MQFreeMemory.
MQGetMachineProperties is not supported for offline operations. For information on offline operations, see MSMQ Offline Support.
Examples
For an example of using MQGetMachineProperties, see:
See Also
PROPID_QM_CONNECTION, PROPID_QM_ENCRYPTION_PK, PROPID_QM_MACHINE_ID, PROPID_QM_PATHNAME, PROPID_QM_SITE_ID, MQFreeMemory
© 1997 by Microsoft Corporation. All rights reserved.