ContextInfo::GetTransactionId method (comsvcs.h)

Retrieves the transaction identifier associated with the object context. Objects in the same transaction share the same transaction identifier.

Syntax

HRESULT GetTransactionId(
  [out] BSTR *pbstrTxId
);

Parameters

[out] pbstrTxId

A reference to the transaction identifier.

Return value

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

Return code Description
S_OK
The method completed successfully.
CONTEXT_E_NOTRANSACTION
The object is not executing within a transaction.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header comsvcs.h

See also

ContextInfo