MSMQQueueInfo.Label (Compact 2013)
3/26/2014
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."
Locating Queues based on Labels
The MSMQQueueInfo.Label property can be used as search criteria when making a query of existing public queues.
Setting 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.
Using 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 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 |