Share via


MSMQQueueInfo.BasePriority (Windows CE 5.0)

Send Feedback

This property specifies a single base priority for all messages sent to a public queue.

HRESULT get_BasePriority( long* plBasePriority);HRESULT put_BasePriority( longlBasePriority);

Parameters

  • plBasePriority or lBasePriority
    Integer value between -32768 and +32767.

    The default is 0.

Return Values

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

A public queue's base priority is used for routing the queue's messages over the network. It can be used to give the messages sent to the queue a higher or lower priority than messages sent to other queues.

When a queue's base priority is set, messages sent to it are given a higher priority than messages sent to queues with a lower base priority. The queue's base priority has no effect on the order of the messages in the queue or how messages are read from the queue.

BasePriority only applies to public queues that can be located through the directory service using a public format name. The base priority of private queues, as well as public queues accessed directly, is always 0.

Message Queuing combines the queue's base priority with the message's priority, MSMQMessage.Priority, to determine the overall priority of a message when it is sent to the queue.

Setting and Retrieving the Queue Priority Level

To specify the priority level when creating a public queue, set the MSMQQueueInfo.BasePriority property and call the MSMQQueueInfo.Create method.

To reset the priority level of an open public queue, set MSMQQueueInfo.BasePriority to a new level 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.

To retrieve the stored priority level of a queue, call the MSMQQueueInfo.Refresh method and inspect the MSMQQueueInfo.BasePriority property.

Equivalent Function property

When using function calls, the priority level of the queue can be set and retrieved using the PROPID_Q_BASEPRIORITY property.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Mqoai.h.
Link Library: Mqoa.lib.

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.