次の方法で共有


MSMQQueue.ShareMode (Compact 2013)

3/26/2014

This property indicates the share mode of the queue.

Syntax

HRESULT get_ShareMode( 
  long* plShareMode 
);

Parameters

  • plShareMode
    Share mode of the queue. The following table shows the possible values.

    Value

    Description

    MQ_DENY_NONE

    The queue is available to everyone for sending, peeking at, or retrieving messages.

    This is returned if the queue is opened with Access set to MQ_PEEK_ACCESS or MQ_SEND_ACCESS.

    MQ_DENY_RECEIVE_SHARE

    Messages can only be retrieved by this process.

    This value is returned if the queue is opened with Access set to MQ_RECEIVE_ACCESS.

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 ShareMode property returns the share mode of the queue when it was last opened, regardless if the queue is open or closed.

When ShareMode returns MQ_DENY_NONE, several users can be using the queue at the same time.

Requirements

Header

mqoai.h

Library

mqoa.lib

See Also

Reference

MSMQQueue