Udostępnij za pośrednictwem


ITransactionExport::GetTransactionCookie

 

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

This method transforms a transaction object into a transaction cookie.

If the DTC Network Node and the Transaction Internet Protocol (TIP) Transactions settings are enabled, and the Network Transactions setting is disabled, TIP is the protocol that is used.

Syntax

  
HRESULT GetTransactionCookie(   IUnknown * pITransaction,  ULONG cbTransactionCookie,  byte * rgbTransactionCookie,  ULONG * pcbUsed);  

Parameters

pITransaction
[in] Pointer to the IUnknown interface on the transaction object to be marshaled. The ITransactionExport::Export must have been called previously.

cbTransactionCookie
[in] The size in bytes of the transaction cookie representing the transaction object.

rgbTransactionCookie
[out] Pointer to the caller allocated buffer that will receive the transaction cookie.

pcbUsed
[out] Pointer to the size in bytes of the address returned in rgbTransactionCookie.

Return Values

S_OK
Success.

E_UNEXPECTED
An unexpected error occurred.

E_NOINTERFACE
pITransaction did not support the ITransaction interface.

E_INVALIDARG
A NULL pointer was specified.

XACT_E_PARTNER_NETWORK_TX_DISABLED
The whereabouts is from a remote node and the DTC proxy is the latest version, but network transactions have been disabled.

XACT_E_NOTRANSACTION
The transaction aborted because an older version of the DTC proxy attempted to communicate with a remote DTC.

Requirements

For an explanation of the requirement values, see Requirements (Component Services).

Platforms: Windows Server 2016, Windows 10, Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista

Header: Declared in txcoord.h

See Also

ITransactionExportFactory