Partager via


MQCloseQueue (Windows Embedded CE 6.0)

1/6/2010

This function closes a given queue.

Syntax

HRESULT APIENTRY MQCloseQueue(
  QUEUEHANDLE hQueue
);

Parameters

  • hQueue
    [in] Handle to the queue you want to close.

Return Value

  • MQ_OK
    Indicates success.
  • MQ_ERROR_INVALID_HANDLE
    The queue handle specified in hQueue is not valid.

Remarks

When an application closes a queue, the queue handle becomes invalid, but the messages waiting in the queue remain in the queue. These include messages are sent to the queue by the application closing the queue.

When MQCloseQueue is called, cursors created for the queue are also closed.

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
Note Versions prior to 2.12 require the MSMQ add-on pack

See Also

Reference

MSMQ Functions
MQOpenQueue