IRepositoryTransaction2::get_DTCTransaction

Meta Data Services Programming

Meta Data Services Programming

IRepositoryTransaction2::get_DTCTransaction

This method returns a pointer to the active Microsoft® Distributed Transaction Coordinator (MS DTC) transaction. If it is not running inside an MS DTC transaction, this method returns NULL. It allows the caller to enlist other resource managers in the same transaction that is being used to access the repository database. For example, you can use the pointer as a parameter of IJoinTransaction::JoinTransaction to instantiate another repository session or an OLE DB provider, which you then can enlist in the MS DTC transaction. Similarly, you can use the pointer in an aggregation wrapper that accesses another resource manager. The wrapped object can get the MS DTC transaction in the transaction that accessed it, so it can enlist the other resource manager in the same transaction.

Syntax

HRESULT get_DTCTransaction (     VARIANT *UnKTransaction
);

Parameters

UnKTransaction

[out]
A pointer to the IUnknown interface on the transaction object.

Return Value

S_OK

The method completed successfully.

Error Values

This method failed to complete successfully.

For more information about the ITransactionJoin interface, see the MSDN® Library.

See Also

IRepositoryTransaction Interface

IRepositoryTransaction2 Interface