Expand Minimize

PROPID_M_SRC_MACHINE_ID

(Read-only.) The PROPID_M_SRC_MACHINE_ID property provides the identifier of the computer that sent the message.

Property ID

PROPID_M_SRC_MACHINE_ID

Type Indicator

VT_CLSID

MQPROPVARIANT Field

puuid

Property Value

Globally unique identifier (GUID) of the source computer.

Remarks

The PROPID_M_SRC_MACHINE_ID property is used only by the receiving application when calling MQReceiveMessage or MQReceiveMessageByLookupId.

This property returns the GUID of the computer without the enclosing braces.

To retrieve the identifier of the source computer, include PROPID_M_SRC_MACHINE_ID in the MQMSGPROPS structure, then call MQReceiveMessage or MQReceiveMessageByLookupId and examine the returned value.

Equivalent COM Property

With COM components, the equivalent property is MSMQMessage.SourceMachineGuid.

Example Code

The following code fragment shows PROPID_M_SRC_MACHINE_ID is specified in arrays that can be used to initialize an MQMSGPROPS structure for retrieving the GUID of the computer that sent the message.

CLSID guidBuffer = 0;
aMsgPropId[i] = PROPID_M_SRC_MACHINE_ID;       // Property ID
aMsgPropVar[i].vt = VT_CLSID;                  // Type indicator
aMsgPropVar[i].puuid = &guidBuffer;
i++;

See Also

Show:
© 2015 Microsoft