This function is implemented and exported by the ODBC driver. After the XA transaction manager (TM) loads the ODBC driver, it obtains this function by calling GetProcAddress. The TM then invokes this function to obtain a pointer to the XA switch. The GetXaSwitch function and all xa_switch_t entry points are expected to use the __cdecl calling convention.
HRESULT GetXaSwitch ( XA_SWITCH_FLAGS XaSwitchFlags, xa_switch_t ** ppXaSwitch);
Parameters
XaSwitchFlags [in]
Any flags that provide information about the TM making the call. Currently XA_SWITCH_F_DTC is the only defined flag.
ppXaSwitch [out]
A pointer to the XA Switch is returned via this out parameter.
Return Values
S_OK
Success.
E_FAIL
Unable to provide the XA switch.
E_INVALIDARG
One or more of the parameters are not valid.