次の方法で共有


PROPID_MGMT_MSMQ_TYPE

 

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, supported only in Windows® XP Professional.) The PROPID_MGMT_MSMQ_TYPE property returns version and build information for the computer operating system and Message Queuing installation.

Property ID

PROPID_MGMT_MSMQ_TYPE

Type Indicator

VT_LPWSTR

MQPROPVARIANT Field

pwszVal

Property Value

String that contains the following:

Windows<operating system type><operating system version> (Build<build number>, <platform type>)-MSMQ<MSMQ version> (Build<build number>), <MSMQ type>

Remarks

To retrieve the version and build information for the computer operating system and Message Queuing installation, include PROPID_MGMT_MSMQ_TYPE in the MQMGMTPROPS structure, call MQMgmtGetInfo, and then parse the value returned.

When specifying PROPID_MGMT_MSMQ_TYPE in the MQMGMTPROPS structure, set its type indicator to VT_NULL. During the function call, Message Queuing automatically changes the type indicator to VT_LPWSTR and creates the string buffer needed to receive the property value. After you no longer need the string buffer, you must free the memory allocated for it using MQFreeMemory.

In the Windows Server 2003 family, this property returns an empty string. For an alternative property, see PROPID_PC_VERSION.

Example Code

The following code fragment shows how PROPID_MGMT_MSMQ_TYPE is specified in arrays that can be used to initialize an MQMGMTPROPS structure.

aMgmtPropID[i] = PROPID_MGMT_MSMQ_TYPE;        // Property identifier  
aMgmtPropVar[i].vt = VT_NULL;                  // Type indicator  
i++;  

The following line of code shows how to free the memory allocated for the version and build information.

MQFreeMemory(aMgmtPropVar[i].pwszVal);  

See Also

Management Properties
MQFreeMemory
MQMgmtGetInfo