다음을 통해 공유


ITransaction::GetTransactionInfo

Returns information regarding a transaction.

Syntax

HRESULT GetTransactionInfo(
   XACTTRANSINFO *pInfo);

Parameters

  • pInfo
    [out] A pointer to the caller-allocated XACTTRANSINFO structure in which the method returns information about the transaction. pInfo must not be a null pointer.

    typedef struct XACTTRANSINFO {
       XACTUOW    uow;
       ISOLEVEL   isoLevel;
       ULONG      isoFlags;
       DWORD      grfTCSupported;
       DWORD      grfRMSupported;
       DWORD      grfTCSupportedRetaining;
       DWORD      grfRMSupportedRetaining;
    } XACTTRANSINFO;
    

    The elements of this structure are used as described in the following table.

    Element

    Description

    uow

    The unit of work associated with this transaction. Cannot be NULL and must be unique per transaction.

    isoLevel

    The isolation level associated with this transaction. ISOLATIONLEVEL_UNSPECIFIED indicates that no isolation level was specified. For more information, see ITransactionLocal::StartTransaction.

    isoFlags

    Will be zero.

    grfTCSupported

    This bitmask indicates the XACTTC flags that this transaction implementation supports.

    grfRMSupported

    Will be zero.

    grfTCSupportedRetaining

    Will be zero.

    grfRMSupportedRetaining

    Will be zero.

Return Code

  • S_OK
    The method succeeded.

  • E_FAIL
    A provider-specific error occurred.

  • E_INVALIDARG
    pInfo was a null pointer.

  • E_UNEXPECTED
    An unknown error occurred. No information is returned.

  • XACT_E_NOTRANSACTION
    Unable to retrieve information for the transaction because it was already completed. No information is returned.