This call is used by an exit function to register the entry points of other exit functions in the exit suite. This is usually done by the MQ_INIT_EXIT function, but can be done by any exit function in the exit suite.
The MQXEP call is also used to deregister entry points. This is usually done by the MQ_TERM_EXIT function, but can be done by any exit function in the exit suite.
|
The MQXEP call has the following parameters.
Configuration handle.
This handle represents the exit suite to which the current exit function belongs. The queue manager generates this configuration handle when the MQ_INIT_EXIT function is invoked, and uses the Hconfig field in the MQAXP structure to pass the handle to each exit function in the exit suite.
Exit reason.
This specifies when to call the entry point being registered or deregistered. It must be one of the following:
The Function parameter must have the value MQXF_INIT or MQXF_TERM.
The Function parameter can have any of the MQXF_* values other than MQXF_INIT or MQXF_TERM.
The Function parameter can have any of the MQXF_* values other than MQXF_INIT, MQXF_TERM, or MQXF_DATA_CONV_ON_GET.
Function identifier.
This specifies the API call for which the entry point is being registered or deregistered. It must be one of the following:
If the MQXEP call is used more than once to register different entry points for a particular combination of Function and ExitReason, the last call made provides the entry point that is used.
Exit function entry point.
This is the address of the entry point being registered.
If the value specified is the null pointer, it indicates either that the exit function is not provided, or that a previously-registered exit function is being deregistered. The null pointer is assumed for entry points which are not defined using MQXEP .
Reserved.
This is a reserved parameter. The value specified must be the null
pointer.
pCompCode (PMQLONG) - output
Completion code.
The value returned is one of the following:
Reason code qualifying pCompCode.
If CompCode is MQCC_FAILED:
For more information on these reason codes, see the WebSphere MQ Application Programming Reference.
MQXEP (Hconfig, ExitReason, Function, EntryPoint, Reserved, &CompCode, &Reason);
Declare the parameters as follows:
MQHCONFIG Hconfig; /* Configuration handle */ MQLONG ExitReason; /* Exit reason */ MQLONG Function; /* Function identifier */ PMQFUNC EntryPoint; /* Exit function entry point */ MQPTR Reserved; /* Reserved */ PMQLONG pCompCode; /* Completion code */ PMQLONG pReason; /* Reason code qualifying CompCode */