次の方法で共有


MSMQQueueInfo.Quota (Compact 2013)

3/26/2014

This property specifies the maximum size, in kilobytes, of the queue.

Syntax

HRESULT get_Quota( 
  long* plQuota 
);
HRESULT put_Quota( 
  long lQuota
);

Parameters

  • plQuota or lQuota
    Long integer, default is INFINITE.

    Maximum size is based on the memory available on the computer where the queue's messages are stored.

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

MSMQQueue.Quota is typically set when the queue is created. However, the maximum size of an existing queue can be changed as well.

Setting and Retrieving the Quota

To specify the quota when creating a queue, set MSMQQueueInfo.Quota and call the MSMQQueueInfo.Create method.

To reset the quota of an existing queue, set MSMQQueueInfo.Quota to a new level and call the MSMQQueueInfo.Update method. This method updates the queue information stored by Message Queuing.

To retrieve the quota of a queue, call the MSMQQueueInfo.Refresh method. For public queues, this information is retrieved from the Directory Service. For private queues, this information is retrieved from the local computer.

Equivalent Function property

When using functions, the quota of the queue can be set and retrieved using the PROPID_Q_QUOTA property.

Requirements

Header

mqoai.h

Library

mqoa.lib

See Also

Reference

MSMQQueueInfo