Share via


MQCloseCursor (Windows Embedded CE 6.0)

1/6/2010

This function closes a specific cursor, allowing Message Queuing (MSMQ) to release the associated resources.

Syntax

HRESULT APIENTRY MQCloseCursor(
  HANDLE hCursor
);

Parameters

  • hCursor
    [in] Handle to the cursor you want to close.

Return Value

  • MQ_OK
    Indicates success.
  • MQ_ERROR_INVALID_HANDLE
    The cursor handle specified in hCursor is not valid.

Remarks

Typically, cursors are closed by calling MQCloseCursor. However, MSMQ closes any cursor created for a queue when that queue is closed.

MQCloseCursor returns MQ_ERROR_INVALID_HANDLE when an attempt is made to close a cursor that has been closed by MSMQ.

To create a cursor, call MQCreateCursor.

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
MQCreateCursor
MQOpenQueue