Muokkaa

Jaa


IContextTransactionInfo::RegisterTransactionProxy method

Associates an ITransactionProxy implementation with the current context.

Syntax

HRESULT RegisterTransactionProxy(
  [in]  ITransactionProxy *pProxy,
  [out] GUID              *pGuid
);

Parameters

pProxy [in]

An ITransactionProxy implementation to associate with the current context.

pGuid [out]

A GUID that identifies the transaction proxy. COM+ uses this GUID when calling ITransactionProxy::Commit on the transaction proxy.

Return value

This method can return the standard return values E_INVALIDARG, E_OUTOFMEMORY, and E_UNEXPECTED, as well as the following values.

Return code Description
S_OK
The method completed successfully.
CONTEXT_E_ALREADYINTRANSACTION
The current context already has an associated ITransactionProxy implementation.
E_NOTIMPL
The current context is hosting a Bring Your Own Transaction (BYOT) transaction or a non-root transaction.

Remarks

The RegisterTransactionProxy method can only be called if the current context is a root transaction context. It cannot be called if the context is hosting a BYOT transaction or a non-root transaction.

Requirements

Requirement Value
Minimum supported client
Windows XP with SP2 [desktop apps only]
Minimum supported server
Windows Server 2003 with SP1 [desktop apps only]

See also

IContextTransactionInfo