共用方式為


Sending Messages in Transaction Examples

 

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

Messages can be sent using the following types of transactions

  • Microsoft® Distributed Transaction Coordinator (MS DTC) external transaction

  • COM+ (MTS in MSMQ 1.0) transactions

  • Message Queuing internal transactions

  • Single-message transactions

Code Examples

The following examples illustrate how messages are sent within the context of different types of transactions.

Example Language
Sending a Message Using an MS DTC External Transaction C/C++ Code Example: Sending a Message Using an MS DTC External Transaction

 Visual Basic Code Example: Sending a Message Using an MS DTC External Transaction
Sending a Message Using a COM+ Transaction C/C++ Code Example: Sending a Message Using a COM+ Transaction

 Visual Basic Code Example: Sending a Message Using a COM+ Transaction
Sending a Message Using an Internal Transaction C/C++ Code Example: Sending a Message Using an Internal Transaction

 Visual Basic Code Example: Sending a Message Using an Internal Transaction
Sending a Message Using a Single-Message Transaction C/C++ Code Example: Sending a Message Using a Single-Message Transaction

 Visual Basic Code Example: Sending a Message Using a Single-Message Transaction