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 IsFirstInTransaction2 property of the MSMQMessage object indicates whether the message was the first message sent to the queue within a specific transaction.
IsFirstInTransaction2 is a Boolean property that supersedes the non-Boolean MSMQMessage.IsFirstInTransaction property.
Property IsFirstInTransaction2 As Boolean
A Boolean set to one of the following values:
The message was the first message sent in the transaction.
The message was not the first message sent in the transaction.
IsFirstInTransaction2 is used by receiving applications to verify that a message was the first message sent in a single transaction to a single queue.
Message Queuing provides the following properties for verifying the boundaries (the first and last message sent to a specific queue) of a transaction.
Indicates whether the message was the first message sent to the queue within a specific transaction.
Indicates whether the message is part of a specific transaction.
Indicates whether the message was the last message sent to the queue within a specific transaction.
If only one message is sent in a transaction, both IsFirstInTransaction2 and MSMQMessage.IsLastInTransaction2 are set.
IsFirstInTransaction2 supersedes MSMQMessage.IsFirstInTransaction and should be used whenever possible. IsFirstInTransaction2 returns Boolean values that are consistent with the Microsoft® Visual Basic® Boolean data type. Otherwise, both properties are functionally equivalent.
In C++ COM applications, you must use a smart pointer to the IMSMQMessage3 interface to expose the IsFirstInTransaction2 property.
Equivalent API Function Property
With API function calls, the equivalent property is PROPID_M_FIRST_IN_XACT.
|For information on||See|
|How transaction boundaries can be used||Checking for Transaction Boundaries when Receiving Messages|
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.