Поделиться через


Obtaining the Transaction Dispenser from a Transaction

 

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

When the application client calls the IResourceManager2::Enlist2 method, passing it the ITransaction interface to the transaction object, the resource manager proxy needs to know the transaction dispenser from which the transaction object was obtained. This is essential because the transaction can be propagated only by the transaction coordinator that dispensed the transaction.

To get to the appropriate transaction dispenser from a transaction, perform the following steps:

  1. Invoke QueryInterface to obtain the IGetDispenser interface.

  2. Invoke IGetDispenser::GetDispenser to obtain the ITransactionDispenser interface.

  3. Invoke QueryInterface to obtain the ITransactionExportFactory interface.