다음을 통해 공유


EodNextSeq

 

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

(Introduced in MSMQ 3.0.) The EodNextSeq element of the MSMQCollection object returned by the MSMQOutgoingQueueManagement.EodGetSendInfo method contains an inner MSMQCollection object containing sequence information about the next message to be sent.

Data type: MSMQCollection
Run-time access: Read-only
Set collectionObject = outgoingqueuemanagementObject.EodGetSendInfo
()  
Set innercollectionObject = collectionObject
("EodNextSeq")  

Parameters

collectionObject

Collection (MSMQCollection) object that is returned by the MSMQOutgoingQueueManagement.EodGetSendInfo method and contains the EodNextSeq element along with 10 other exactly-once-delivery (EOD) information elements (in C++, a smart pointer to the IMSMQCollection interface).

outgoingqueuemanagementObject

Outgoing queue management (MSMQOutgoingQueueManagement) object that represents the state of the outgoing queue.

innercollectionObject

Collection (MSMQCollection) object that contains the SeqID, SeqNo, and PrevNo elements (in C++, a smart pointer to the IMSMQCollection interface).

Return Values

An inner MSMQCollection object that is an element of the MSMQCollection object returned and contains the following elements.

  • SeqID (Data type: Variant): The sequence identifier of the message stream being sent to the destination queue.

  • SeqNo (Data type: Long): The sequence number of the next message to be sent to the destination queue.

  • PrevNo (Data type: Long): The previous sequence number specified in the next message to be sent to the destination queue. The message can be delivered only if a message whose sequence number is equal to this number is present in the destination queue.

If no sequence information is available for the applicable message, a Variant containing Null is returned in this element.

Remarks

To obtain sequence information about the next message to be sent, use the MSMQCollection.Item method to retrieve the EodNextSeq element of the MSMQCollection object returned by the MSMQOutgoingQueueManagement.EodGetSendInfo method. This element is, in turn, an MSMQCollection object that contains three elements: SeqID, SeqNo, and PrevNo. Then use the MSMQCollection.Item method to retrieve these elements from the inner MSMQCollection object.

Note

The Item method is the default method for the MSMQCollection object. Therefore, its name can be omitted.

Equivalent API Function Property

When using API functions, the equivalent property is PROPID_MGMT_QUEUE_EOD_NEXT_SEQ.

Example Code

The following code fragment shows how to display the three elements of EodNextSeq for a destination queue on a remote computer.

Dim coll As MSMQCollection  
Dim incoll As MSMQCollection  
Dim mgmt As New MSMQManagement  
Dim outqmgmt As MSMQOutgoingQueueManagement  
mgmt.Init PathName:="remotemachine\queue"    ' Indicates outgoing queue on local computer.  
Set outqmgmt = mgmt    ' An error is returned if a destination queue is used.  
Set coll = outqmgmt.EodGetSendInfo()  
Set incoll = coll("EodNextSeq")  
MsgBox "Sequence ID: " & incoll("SeqID") & Chr(13) & "Sequence number: " & incoll("SeqNo") & Chr(13) & "Previous number: " & coll2("PrevNo")  

Requirements

Windows NT/2000/XP: Included in Windows XP and Windows Server 2003.

Windows 95/98/Me: Unsupported.

Header: Declared in Mqoai.h.

Library: Use Mqoa.lib.

See Also

MSMQCollection
MSMQCollection.Item
MSMQOutgoingQueueManagement
MSMQOutgoingQueueManagement.EodGetSendInfo
PROPID_MGMT_QUEUE_EOD_NEXT_SEQ