共用方式為


3.23.4.1 ITransactionStream::GetSeqAndTxViaExport (Opnum 3)

This method returns the STxInfo ([MS-DTCO] section 2.2.5.10) of the currently active transaction and the CurrentTSN value.

 HRESULT GetSeqAndTxViaExport(
   [in] unsigned long ulKnownSeq,
   [in] unsigned long ulcbWhereabouts,
   [in, size_is(ulcbWhereabouts)] BYTE* rgbWhereabouts,
   [out] unsigned long* pulCurrentSeq,
   [out] unsigned long* pulcbExportCookie,
   [out, size_is(,*pulcbExportCookie)] 
     BYTE** prgbExportCookie
 );

ulKnownSeq: The caller's CurrentTSN value of the currently active transaction known by the client.

ulcbWhereabouts: The unsigned size, in bytes, of rgbWhereabouts.

rgbWhereabouts: The SWhereabouts instance ([MS-DTCO] section 2.2.5.11) of the caller's local DTCO transaction manager implementation.

pulCurrentSeq: The TSN of the currently active transaction.

pulcbExportCookie: The unsigned size, in bytes, of prgbExportCookie.

prgbExportCookie: An STxInfo of the currently active transaction (as specified in [MS-DTCO] section 2.2.5.10).

Return Values: The method MUST return a positive value or zero, to indicate successful completion, or a negative value to indicate failure. The client MUST treat any negative return value as a fatal error.

When processing this ORPC call, the ITransactionStream Server (section 3.23) MUST do the following:

  • If the DtcCap_CanExport bit is not set in the DtcCapabilities value, it MUST return CO_E_NOT_SUPPORTED.

  • If ulKnownSeq is the same as the CurrentTSN value, the ITransactionStream Server MUST:

    • Set pulCurrentSeq to ulKnownSeq.

    • Set pulcbExportCookie to zero.

    • Set prgbExportCookie to NULL.

  • Otherwise, the ITransactionStream Server MUST:

    • Set pulCurrentSeq to the CurrentTSN value.

    • Set pulcbExportCookie to the size of prgbExportCookie.

    • Copy the STxInfo of the currently active transaction to the prgbExportCookie out parameter.