MQDeleteQueue

This function deletes a queue from the local computer.

HRESULT APIENTRY MQDeleteQueue(
LPCWSTR lpwcsFormatName
);

Parameters

  • lpwcsFormatName
    [in] Pointer to the direct format name string of the queue to be deleted.

Return Values

  • MQ_OK
    Indicates success.
  • MQ_ERROR_ACCESS_DENIED
    The process does not have the access rights to delete this queue. To change access rights, call MQSetQueueSecurity.
  • MQ_ERROR_ILLEGAL_FORMATNAME
    The specified format name in lpwcsFormatName is illegal.
  • MQ_ERROR_SERVICE_NOT_AVAILABLE
    Cannot connect to the Queue Manager.
  • MQ_ERROR_UNSUPPORTED_FORMATNAME_OPERATION
    The format name specified by lpwcsFormatName cannot be used to delete a queue. You cannot reference a queue using a direct format name, nor can you delete a journal, dead-letter, or connector queue.

Remarks

All queues must be referenced using a private format name. MSMQ must be able to access the local computer to delete private queues.

Private queues registered on a remote computer, as well as journal, dead-letter, and connector queues cannot be deleted.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later. Versions prior to 2.12 require the MSMQ add-on pack. Mq.h Mq.h Msmqrt.lib

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

MQCloseQueue, MQCreateQueue, MQOpenQueue

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.