Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function sets the properties of a local queue.

Syntax

HRESULT APIENTRY MQSetQueueProperties(
  LPCWSTR 
lpwcsFormatName,
  MQQUEUEPROPS* 
pQueueProps
);

Parameters

lpwcsFormatName

[in] Pointer to the direct format name string of the queue whose properties will be set.

pQueueProps

[in] Pointer to the MQQUEUEPROPSstructure that specifies the properties to be set.

On input, the cPropmember of MQQUEUEPROPSspecifies the number of properties to be set, the aPropIDarray specifies their property identifiers, and the aPropVararray indicates the new values of the specified properties.

On output, the optional aStatusarray, if it was included in MQQUEUEPROPS, indicates the status of the properties.

Return Value

MQ_OK

Indicates success.

MQ_ERROR_ILLEGAL_FORMATNAME

The lpwcsFormatNameparameter specified an illegal format name.

MQ_ERROR_ILLEGAL_PROPERTY_VALUE

An illegal property value is specified.

MQ_ERROR_PROPERTY

One or more properties resulted in an error.

MQ_ERROR_SERVICE_NOT_AVAILABLE

Cannot connect to the Queue Manager.

MQ_ERROR_UNSUPPORTED_FORMATNAME_OPERATION

The format name specified by the lpwcsFormatNameparameter cannot be used.

You cannot set the queue properties of a journal, dead-letter, or connector queue.

MQ_INFORMATION_PROPERTY

One or more properties resulted in a warning even though the function completed.

Remarks

The following queue properties cannot be set by MQSetQueueProperties.

Property Reason

PROPID_Q_CREATE_TIME

Set by MSMQ.

PROPID_Q_MODIFY_TIME

Set by MSMQ.

PROPID_Q_PATHNAME

Can only be set when the queue is created.

PROPID_Q_TRANSACTION

Can only be set when the queue is created.

Note:
OS versions prior to 2.12 require the MSMQ add-on pack.

Requirements

Header mq.h
Library msmqrt.lib
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later
Note Versions prior to 2.12 require the MSMQ add-on pack

See Also