Compartilhar via


MSMQQueueInfos.Reset

 

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 Reset method of the MSMQQueueInfos object, which represents a query, moves the cursor to the position before the first queue in the collection of public queues satisfying the search criteria of the query.

Sub Reset As MSMQQueueInfo  

Parameters

This method has no parameters.

Return Values

This method has no return values.

Error Codes

For information on return codes, see Message Queuing Error and Information Codes.

Remarks

The MSMQQueueInfos object is created and initialized by a call to the MSMQQuery.LookupQueue method.

The Reset method moves the cursor to the position before the first queue in the collection. To move the cursor to the first queue in the collection, call MSMQQueueInfos.Next.

Example Code

The following code fragment displays the path name of one public queue with a specific label.

Dim query As New MSMQQuery  
Dim qinfos As MSMQQueueInfos  
Dim qinfo As MSMQQueueInfo  
Set qinfos = query.LookupQueue( _  
    Label:="examplequeue")  
qinfos.Reset  
Set qinfo = qinfos.Next  
MsgBox qinfo.PathName  

The following example is included in Using Message Queuing.

For an example of See
Locating a set of public queues based on the queue label C++ COM Code Example: Locating a Queue

 Visual Basic Code Example: Locating a Queue

Requirements

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 Mqoai.h.

Library: Use Mqoa.lib.

See Also

MSMQQuery
MSMQQueueInfos