MSMQMessage.Label (Compact 2013)

3/26/2014

This property specifies a description of the message.

Syntax

HRESULT get_Label( 
  BSTR* pbstrLabel 
);
HRESULT put_Label( 
  BSTR lbstrLabel
);

Parameters

  • pbstrLabel or lbstrLabel
    Application-defined string describing the message. The maximum length of a message label is 250 Unicode characters (including the end-of-line character).

Return Value

The following table describes the common return values.

Value

Description

S_OK

Success

E_INVALIDARG

One or more arguments are invalid

E_NOTIMPL

The function contains no implementation

E_OUTOFMEMORY

Out of memory

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.

You can also set and retrieve the label of a message when using Message Queuing function calls.

Null characters in strings

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

Equivalent Function property

When using functions, the label of the message can be set and retrieved using the PROPID_M_LABEL property.

Requirements

Header

mqoai.h

Library

mqoa.lib

See Also

Reference

MSMQMessage
PROPID_M_LABEL