123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190 |
- //-----------------------------------------------------------------------------
- // File: txcoord.idl
- //
- // Copyright: Copyright (c) Microsoft Corporation
- //
- // Contents: Transaction types and interfaces related to
- // transaction coordination.
- //
- // Comments:
- //
- //-----------------------------------------------------------------------------
- import "transact.idl";
- import "objidl.idl"; // needed for IMoniker
- //
- //--------------------------------------------------------------------------
- //
- interface ITransactionResourceAsync;
- interface ITransactionEnlistmentAsync;
- interface ITransactionExportFactory;
- interface ITransactionImportWhereabouts;
- interface ITransactionExport;
- interface ITransactionImport;
- //
- //--------------------------------------------------------------------------
- //
- // @interface ITransactionResourceAsync | Implemented by the resource manager.
- [object,uuid(69E971F0-23CE-11cf-AD60-00AA00A74CCD),pointer_default(unique)]
- interface ITransactionResourceAsync : IUnknown
- {
- HRESULT PrepareRequest
- (
- [in] BOOL fRetaining,
- [in] DWORD grfRM,
- [in] BOOL fWantMoniker,
- [in] BOOL fSinglePhase
- );
- HRESULT CommitRequest
- (
- [in] DWORD grfRM,
- [in] XACTUOW* pNewUOW
- );
- HRESULT AbortRequest
- (
- [in] BOID* pboidReason,
- [in] BOOL fRetaining,
- [in] XACTUOW* pNewUOW
- );
- HRESULT TMDown
- (
- void
- );
- }
- //
- //--------------------------------------------------------------------------
- //
- // @interface ITransactionEnlistmentAsync |
- [object,uuid(0fb15081-af41-11ce-bd2b-204c4f4f5020),pointer_default(unique)]
- interface ITransactionEnlistmentAsync : IUnknown {
- HRESULT PrepareRequestDone
- (
- [in] HRESULT hr,
- [in] IMoniker* pmk,
- [in] BOID* pboidReason
- );
- HRESULT CommitRequestDone
- (
- [in] HRESULT hr
- );
- HRESULT AbortRequestDone
- (
- [in] HRESULT hr
- );
- }
- //
- //==========================================================================
- // Interfaces related to ODBC transaction coordination.
- //==========================================================================
- //
- // @interface ITransactionExportFactory | Used on the client side to associate an export / import object pair with an external connection.
- [object,uuid(E1CF9B53-8745-11ce-A9BA-00AA006C3706),pointer_default(unique)]
- interface ITransactionExportFactory : IUnknown {
- HRESULT GetRemoteClassId
- (
- [out] CLSID* pclsid
- );
- HRESULT Create
- (
- [in] ULONG cbWhereabouts,
- [in, size_is(cbWhereabouts)]
- BYTE* rgbWhereabouts,
- [out] ITransactionExport** ppExport
- );
- }
- //
- //--------------------------------------------------------------------------
- //
- // @interface ITransactionImportWhereabouts | Used on the server side to associate an export / import object pair with an external connection.
- [object,uuid(0141fda4-8fc0-11ce-bd18-204c4f4f5020),pointer_default(unique)]
- interface ITransactionImportWhereabouts : IUnknown {
- HRESULT GetWhereaboutsSize
- (
- [out] ULONG* pcbWhereabouts
- );
- [local]
- HRESULT GetWhereabouts
- (
- [in] ULONG cbWhereabouts,
- [out, size_is(cbWhereabouts)]
- BYTE* rgbWhereabouts,
- [out] ULONG* pcbUsed
- );
- [call_as(GetWhereabouts)] // pcbWhereaboutsUsed is optional; error semantics on it
- HRESULT RemoteGetWhereabouts
- (
- [out] ULONG* pcbUsed,
- [in] ULONG cbWhereabouts,
- [out, size_is(cbWhereabouts), length_is(*pcbUsed)]
- BYTE* rgbWhereabouts
- );
- }
- //
- //--------------------------------------------------------------------------
- //
- // @interface ITransactionExport | Used to plumb up a particular transaction with an export / import pair.
- [object,uuid(0141fda5-8fc0-11ce-bd18-204c4f4f5020),pointer_default(unique)]
- interface ITransactionExport : IUnknown {
- HRESULT Export
- (
- [in] IUnknown* punkTransaction,
- [out] ULONG* pcbTransactionCookie
- );
- [local]
- HRESULT GetTransactionCookie
- (
- [in] IUnknown* punkTransaction,
- [in] ULONG cbTransactionCookie,
- [out, size_is(cbTransactionCookie)]
- BYTE* rgbTransactionCookie,
- [out] ULONG* pcbUsed
- );
- [call_as(GetTransactionCookie)]
- HRESULT RemoteGetTransactionCookie
- (
- [in] IUnknown* punkTransaction,
- [out] ULONG* pcbUsed,
- [in] ULONG cbTransactionCookie,
- [out, size_is(cbTransactionCookie), length_is(*pcbUsed)]
- BYTE* rgbTransactionCookie
- );
- }
- //
- //--------------------------------------------------------------------------
- //
- // @interface ITransactionImport | Used to plumb up a particular transaction with an export / import pair.
- [object,uuid(E1CF9B5A-8745-11ce-A9BA-00AA006C3706),pointer_default(unique)]
- interface ITransactionImport : IUnknown {
- HRESULT Import
- (
- [in] ULONG cbTransactionCookie,
- [in, size_is(cbTransactionCookie)]
- BYTE* rgbTransactionCookie,
- [in] IID* piid,
- [out, iid_is(piid)]
- void** ppvTransaction
- );
- }
|