/\ Remove an exit program from the exit point and then deregister \/
/\ the exit point. It is not necessary to remove exit programs \/
/\ from an exit point before deregistering the exit point. It is \/
/\ done here only for illustration purposes. \/
/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/
/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/
/\ Initialize the error code parameter. To have exceptions \/
/\ signaled to this program by the API, set the bytes provided \/
/\ field of the code to zero. This program has exceptions sent \/
/\ through the error code parameter; therefore, the bytes \/
/\ provided field is set to the number of bytes that this program \/
/\ gives the API for the parameter. \/
/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/
error_code.ec_fields.Bytes_Provided=sizeof(error_code_struct);
/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/
/\ Call the API to remove the exit program. \/
/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/
QusRemoveExitProgram("EXAMPLE_EXIT_POINT ",
"EXMPð1ðð",
pgm_num,
&error_code);
/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/
/\ If an exception occurs, the API returns the exception in the \/
/\ error code parameter. The bytes available field is set to \/
/\ zero if no exception occurs and nonzero if an exception does \/
/\ occur. \/
/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/
if (error_code.ec_fields.Bytes_Available != ð)
{
printf("ATTEMPT TO REMOVE EXIT PROGRAM FAILED WITH EXCEPTION: %.7s",
error_code.ec_fields.Exception_Id);
exit(1);
}
/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/
/\ If the call to remove the exit program is successful, \/
/\ deregister the exit point. \/
/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/
/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/
/\ Call the API to add the exit program. \/
/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/
QusDeregisterExitPoint("EXAMPLE_EXIT_POINT ",
"EXMPð1ðð",
&error_code);
/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/
/\ If an exception occurs, the API returns the exception in the \/
/\ error code parameter. The bytes available field is set to \/
/\ zero if no exception occurs and nonzero if an exception does \/
/\ occur. \/
/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/
if (error_code.ec_fields.Bytes_Available != ð)
{
printf("ATTEMPT TO DEREGISTER EXIT POINT FAILED WITH EXCEPTION: %.7s",
4-20 System API Programming V4R1