다음을 통해 공유


MSMQMessage.Extension

 

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 Extension property of the MSMQMessage object specifies additional application-defined information that is associated with the message.

This property is used by connector applications.

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

Property Value

A Variant (array of bytes) containing application-defined information.

Remarks

The Extension property is used by connector applications to store non-Message Queuing message properties when translating between Message Queuing messages and foreign messages. It is the responsibility of the sending application, the connector application, and the receiving application to understand the content of this property. For more information on transferring messages between a Message Queuing system and a foreign messaging system, see Connector Services.

When dimensioning arrays for extension data, always set the lower boundary of the array to 0. When filling in the extension data, 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.Extension)  

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

Equivalent API Function Property

With API function calls, the equivalent property is PROPID_M_EXTENSION.

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_EXTENSION