Example: lr_get_trans_instance_status

The following example preempts calls to the web server that will probably, fail by checking the transaction instance status along the way.

long trans_handle;
trans_handle = lr_start_transaction_instance("Web-tours", 0);
web_url("home;sz=234x60;tile=1;ord=977672495775323400",
    "URL=http://ad.doubleclick.net/...ord=977672495775323400",
    ..
    "Mode=URL",         LAST );

if (lr_get_trans_instance_status(trans_handle) == LR_FAIL) {

     /* web_url has failed the transaction. No point in continuing,     because future calls will probably fail. */
     lr_end_transaction_instance(trans_handle, LR_FAIL);
     return;
}
/* Continue with the transaction instance */
web_reg_save_param("WCSParam_Diff1", LB=http://", "RB=/", "Ord=17", "Search=body", LAST );