Partilhar via


MSMQMessage.Signature

 

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

(Introduced in MSMQ 2.0.) The Signature property of the MSMQMessage object specifies the MSMQ 1.0 signature or application-generated signature that is attached to the message.

Data type: Variant (array of bytes)
Run-time access: Read/write
Property Signature As Variant  

Property Value

A Variant containing a digital signature in the form of an array of bytes.

Remarks

In most cases, Signature is set by the Message Queuing runtime when the sending application requests authentication. This property can also be set by connector applications sending messages to Message Queuing. In these cases, the receiving application can use this property to retrieve the MSMQ 1.0 or application-generated signature attached to the message.

Note

This property contains an MSMQ 1.0 signature only if the sending application specified an MSMQ 1.0 signature when requesting authentication.

If the sending application sent an MSMQ 2.0 or greater signature, but did not attach an MSMQ 1.0 signature, this property will contain a buffer of 4 zeroed bytes.

Connector applications may also set this property when they call MSMQMessage.Send. However, when a connector application sets this property, Message Queuing does not generate a digital signature for this property. The connector application must generate the digital signature itself based on the certificate of the user sending the message.

When connector applications set Signature, the MSMQMessage.ConnectorTypeGuid property must also be set so that Message Queuing does not generate a digital signature. Signature is ignored if MSMQMessage.ConnectorTypeGuid is not also set when the message is sent.

When dimensioning arrays for the digital signature, always set the lower boundary of the array to 0. When filling in the signature, Message Queuing sets the lower boundary of the returned byte-array to 0 regardless of what boundary was set by the application.

The following Visual Basic® call will always return 0.

LBound
(msg.Signature)  

In C++ COM applications, you must use a smart pointer to the IMSMQMessage2 or IMSMQMessage3 interface to expose the Signature property.

Equivalent API Function Property

With API function calls, the equivalent property is PROPID_M_SIGNATURE.

For information on See
How Message Queuing creates digital signatures How Message Queuing Authenticates Messages
MSMQ 1.0 signatures Digital Signatures

Requirements

Windows NT/2000/XP: Included in Windows 2000 and later.

Windows 95/98/Me: Unsupported.

Header: Declared in Mqoai.h.

Library: Use Mqoa.lib.

See Also

MSMQMessage
PROPID_M_SIGNATURE