Compartir a través de


MSMQMessage.Label

 

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

The Label property of the MSMQMessage object specifies a description of the message.

Data type: String
Run-time access: Read/write
Property Label As String  

Property Value

An application-defined string describing the message. The maximum length of a message label is 250 Unicode characters (including end-of-line character).

Remarks

Message labels can be used by administration tools for display purposes. For example, a printing application could put the source application and document name in the label of each message it sends to the printer queue.

Message Queuing COM components ignore any characters that follow the first Null character in a string without returning an error.

Equivalent API Function Property

With API function calls, the equivalent property for setting and retrieving the label of a message is PROPID_M_LABEL.

Example Code

The following examples are included in Using Message Queuing.

For an example of See
Sending messages to a single destination queue Visual Basic Code Example: Sending Messages to a Destination Queue Using a Destination Object
Sending messages using distribution lists Visual Basic Code Example: Sending Messages Using Distribution Lists
Sending messages using multicast addresses Visual Basic Code Example: Sending Messages Using Multicast Addresses
Sending messages using multiple-element format names Visual Basic Code Example: Sending Messages Using Multiple-Element Format Names

Requirements

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

Windows 95/98/Me: Included in Windows 95 and later.

Header: Declared in Mqoai.h.

Library: Use Mqoa.lib.

See Also

MSMQMessage
PROPID_M_LABEL