Platform SDK: Transaction Server

New Functions and Interfaces

The ODBC driver implements a new function, and MS DTC implements one new interface. Only the ODBC driver needs to use this new interface.

Typedefs

typedef DWORD XA_SWITCH_FLAGS

Constants

#define XA_SWITCH_F_DTC 0x00000001
const XID XID_NULL = {-1, 0, 0, '\0'}

Functions

HRESULT GetXaSwitch (
    XA_SWITCH_FLAGS [in] XaSwitchFlags,
    [out] xa_switch_t ** ppXaSwitch
);

Interface

interface IDtcToXaMapper : IUnknown
{
STDMETHOD (QueryInterface) (REFIID riid, (void **) ppv) PURE;
STDMETHOD_(ULONG) (AddRef) (void) PURE;
STDMETHOD_(ULONG) (Release) (void) PURE;

STDMETHOD (RequestNewResourceManager) ([in] char pszDSN, [in] char  pszClientDllName, [in-out] DWORD * pdwRMCookie) PURE;

STDMETHOD (TranslateTridToXid) ([in] DWORD * pdwITransaction, [in] DWORD dwRMCookie, 
[in-out] XID * pXid) PURE;

STDMETHOD (EnlistResourceManager) ([in] DWORD dwRMCookie, [in] DWORD * pdwITransaction) PURE;

STDMETHOD (ReleaseResourceManager) ([in] DWORD dwRMCookie) PURE;
};