Get the XID structure

The mi_xa_get_current_xid() function returns the pointer to the current XID structure for an XA-compliant, external data source. The XID structure is defined in the $INFORMIXDIR/incl/public/xa.h file.

This XID structure that is returned is valid only until the user-defined routine terminates. The calling user-defined routine must copy this function if it is necessary to keep the data for a longer period of time.

The syntax for the function is:
XID * mi_xa_get_current_xid ()
For example:
     #include "xa.h"
     #include "milib.h"
XID * xid;
xid = mi_xa_get_current_xid();   
if ( (!xid)
       {
        /* Error while getting the curret XID */
       }
 /* Successful */

If successful, this function returns the pointer to the XID structure, which is not null.

For more information about this function, see the Informix® DataBlade® API Function Reference.