ContextUtil::TransactionId Property
.NET Framework (current version)
Gets the GUID of the current COM+ DTC transaction.
Assembly: System.EnterpriseServices (in System.EnterpriseServices.dll)
Property Value
Type: System::GuidA GUID representing the current COM+ DTC transaction, if one exists.
| Exception | Condition |
|---|---|
| COMException | There is no COM+ context available. |
| PlatformNotSupportedException | The platform is not Windows 2000 or later. |
The following code example gets the value of a TransactionId property.
[Transaction(TransactionOption::Required)] public ref class ContextUtil_TransactionId: public ServicedComponent { public: void Example() { // Display the ID of the transaction in which the current COM+ context // is enlisted. Console::WriteLine( "Transaction ID: {0}", ContextUtil::TransactionId ); } };
.NET Framework
Available since 1.1
Available since 1.1
Show: