The MQLocateEnd function ends a query, releasing the resources associated with the query.
HRESULT APIENTRY MQLocateEnd( HANDLE hEnum );
MQLocateEnd is not supported for offline operations. For information on offline operations, see MSMQ Offline Support.
For an example of using MQLocateEnd, see Locating a Public Queue.