MQCloseCursor

 

Updated: July 19, 2016

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

The MQCloseCursor function closes a specific cursor, allowing Message Queuing to release the associated resources.

HRESULT APIENTRY MQCloseCursor(  
  HANDLE hCursor    
);  

hCursor

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

MQ_OK

Indicates success.

MQ_ERROR_INVALID_HANDLE (0xC00E0007)

The cursor handle specified in hCursor is not valid.

Cursors are closed by calling MQCloseCursor. Message Queuing does not automatically close cursors created for a given queue when that queue is closed with MQCloseQueue.

For information on how cursors behave when navigating queues, see Navigating with Cursors.

The following code examples are included in Using Message Queuing.

For an example ofSee
Peeking at each message in a queue using cursorsC/C++ Code Example: Navigating Using Cursors
Filtering specific messages using cursorsC/C++ Code Example: Application-Specific Filters

 C/C++ Code Example: Correlation Identifier Filters

 C/C++ Code Example: Time Sent Filters

Windows NT/2000/XP: Included in Windows NT 4.0 SP3 and later.

Windows 95/98/Me: Included in Windows 95 and later.

Header: Declared in Mq.h.

Library: Use Mqrt.lib.

Message Queuing Functions
MQCreateCursor

Community Additions

ADD
Show: