Partilhar via


PROPID_QM_SITE_ID

 

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

(Read-only) The PROPID_QM_SITE_ID property provides the site where the computer is located.

Property ID

PROPID_QM_SITE_ID

Type Indicator

VT_CLSID

MQPROPVARIANT Field

puuid

Property Value

Site identifier.

Remarks

The PROPID_QM_SITE_ID property is set by Message Queuing when the computer is created. It is typically used to determine where the queue manager for a specific computer resides.

The site identifier for a computer indicates where the queue manager for that computer is currently located. When the location of the computer changes, Message Queuing automatically updates PROPID_QM_SITE_ID to indicate the new site.

To retrieve the site identifier for a computer, include PROPID_QM_SITE_ID in the MQQMPROPS structure, and then call MQGetMachineProperties and examine the returned property value.

When specifying PROPID_QM_SITE_ID in the MQQMPROPS structure, the type indicator can be set to VT_CLSID or VT_NULL. If you set the type indicator equal to VT_NULL, Message Queuing automatically changes the type indicator to VT_CLSID and allocates memory for the buffer needed during the function call. A pointer to this buffer is stored in the puuid field of the MQPROPVARIANT structure. In that case, after you no longer need the buffer, you must free the memory allocated for it using MQFreeMemory.

Equivalent COM Property

There is no equivalent COM property or method for retrieving the identifier of the site where the computer is located.

Example Code

The following code fragment shows how PROPID_QM_SITE_ID is specified in the MQQMPROPS structure.

aQMPropId[i] = PROPID_QM_SITE_ID;                 // Property ID  
aQMPropVar[i].vt = VT_CLSID;                      // Type indicator  
aQMPropVar[i].puuid = &guidSiteIdBuffer;          // Address of buffer  
i++;  

See Also

Queue Manager Properties
MQFreeMemory
MQGetMachineProperties
MQQMPROPS