The MQCloseCursor function closes a given cursor, allowing MSMQ to release the associated resources.
HRESULT APIENTRY MQCloseCursor(
HANDLE hCursor
);
Typically, cursors are closed by calling MQCloseCursor. However, MSMQ automatically closes any cursor created for a given queue when the queue is closed. MQCloseCursor returns MQ_ERROR_INVALID_HANDLE when an attempt is made to close a cursor that is already closed by MSMQ.
To create a cursor, call MQCreateCursor.
For an example of how cursors are used when reading messages, see Reading Messages in a Queue.
For examples of using MQCloseCursor, see Reading Messages Using a Cursor.
Windows NT: Requires version 4.0 SP3 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in mq.h.
Import Library: Use mqrt.lib.
Unicode: Defined only as Unicode.