Поделиться через


PROPID_PC_VERSION

 

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, introduced in MSMQ 2.0.) The PROPID_PC_VERSION property specifies the version of Message Queuing running on the computer.

Property ID

PROPID_PC_VERSION

Type Indicator

VT_UI4

MQPROPVARIANT Field

ulVal

Remarks

To find the version of Message Queuing that is running on the local computer, specify PROPID_PC_VERSION in an MQPRIVATEPROPS structure. Then, call MQGetPrivateComputerInformation and examine the value returned. When retrieving this property, the type indicator can be set to VT_UI4 or VT_NULL. If you set the type indicator to VT_NULL, Message Queuing automatically changes the type indicator to VT_UI4 during the function call.

The value returned is composed of the build number, the minor version number, and the major version number of Message Queuing. The format for these three numbers is as follows.

word-byte-byte    // build number, minor version, major version  

The value should be interpreted from the least significant byte word (which is the build number) to the most significant byte. For example, a value of "0x03000409" would be interpreted as follows:

  1. The least significant byte word is 0x0409, which means build number 1033.

  2. The next byte is 0x00, which means minor version 0.

  3. The most significant byte is 0x03, which means major version 3.

The value returned is a calculated value. Message Queuing does not access the directory service to get this information.

For information on See
Retrieving the build number of Message Queuing when you are using COM components MSMQApplication.MSMQVersionBuild
Retrieving the major version number of Message Queuing when you are using COM components MSMQApplication.MSMQVersionMajor
Retrieving the minor version number of Message Queuing when you are using COM components MSMQApplication.MSMQVersionMinor

Example Code

The following example shows how PROPID_PC_VERSION is specified in the MQPRIVATEPROPS structure.

DWORD dwMSMQVersion;  
aQMPropId[i] = PROPID_PC_VERSION;   // Property ID  
aQMPropVar[i].vt = VT_UI4;          // Type indicator  
i++;  

See Also

Private Computer Properties
MQGetPrivateComputerInformation
MQPRIVATEPROPS