Partager via


MSMQQueueInfo.Label (Windows Embedded CE 6.0)

1/6/2010

This property specifies a description of the queue.

Syntax

HRESULT get_Label( 
  BSTR* pbstrLabel 
);

Parameters

  • pbstrLabel
    Application-defined string. The default is "". The maximum length of the string is MQ_MAX_Q_LABEL_LEN, which is 124 Unicode characters.

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

The label of the queue can be used to identify the queue. For example, queues that accept incoming message can all use the label "Incoming Queue."

Ee499725.collapse(en-US,WinEmbedded.60).gifLocating Queues based on Labels

The MSMQQueueInfo.Label property can be used as search criteria when making a query of existing public queues.

Ee499725.collapse(en-US,WinEmbedded.60).gifSetting and Retrieving the Queue Label

To specify the label when creating the queue, set the MSMQQueueInfo.Label property and call the MSMQQueueInfo.Create method.

To reset the label of an open queue, set MSMQQueueInfo.Label to a new value and call the MSMQQueueInfo.Update method. This method updates the queue information stored by Message Queuing.

For public queues, this information is stored in the directory service.

For private queues, this information is stored on the computer where the messages of the queue are stored.

To retrieve the stored label of a queue, call the MSMQQueueInfo.Refresh method and inspect the MSMQQueueInfo.Label property.

Ee499725.collapse(en-US,WinEmbedded.60).gifUsing Null characters in strings

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

Ee499725.collapse(en-US,WinEmbedded.60).gifEquivalent Function property

When using function calls, the label of the queue can be set and retrieved using the PROPID_Q_LABEL property.

Requirements

Header mqoai.h
Library mqoa.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

MSMQQueueInfo