MQ_GET_EXIT - Get message
Exit providers can supply an MQ_GET_EXIT function to intercept the MQGET call. The same exit function interface is used for the MQXF_DATA_CONV_ON_GET exit function.
Syntax
- MQ_GET_EXIT (pExitParms, pExitContext, pHconn, pHobj, ppMsgDesc,
- ppGetMsgOpts, pBufferLength, ppBuffer, ppDataLength, pCompCode, pReason)
Parameters
The MQ_GET_EXIT call has the following parameters.
pExitParms (PMQAXP) - input/output
Exit parameter structure.
pExitContext (PMQAXC) - input/output
Exit context structure.
pHconn (PMQHCONN) - input/output
Connection handle.
pHobj (PMQHOBJ) - input/output
Object handle.
ppMsgDesc (PPMQMD) - input/output
Message descriptor.
ppGetMsgOpts (PPMQGMO) - input/output
Options that control the action of MQGET .
pBufferLength (PMQLONG) - input/output
Length in bytes of the ppBuffer area.
ppBuffer (PPMQVOID) - input/output
Area to contain the message data.
ppDataLength (PPMQLONG) - input/output
Length of the message.
pCompCode (PMQLONG) - input/output
Completion code.
pReason (PMQLONG) - input/output
Reason code qualifying pCompCode.
Usage notes
- The MQ_GET_EXIT function interface described here is used for both the MQXF_GET exit function and the MQXF_DATA_CONV_ON_GET exit function. However, separate entry points are defined for these two exit functions, so to intercept both the MQXEP call must be used twice - once with function identifier MQXF_GET, and again with MQXF_DATA_CONV_ON_GET.
Because the MQ_GET_EXIT interface is the same for MQXF_GET and MQXF_DATA_CONV_ON_GET, a single exit function can be used for both; the Function field in the MQAXP structure indicates which exit function has been invoked. Alternatively, the MQXEP call can be used to register different exit functions for the two cases.
- There is no MQXR_AFTER exit function for MQXF_DATA_CONV_ON_GET; the MQXR_AFTER exit function for MQXF_GET provides the required capability for exit processing after data conversion.
C invocation
MQ_GET_EXIT (&ExitParms, &ExitContext, &Hconn, &Hobj, &pMsgDesc, &pGetMsgOpts, &BufferLength, &pBuffer, &pDataLength, &CompCode, &Reason);The parameters passed to the exit are declared as follows:
PMQAXP pExitParms; /* Exit parameter structure */ PMQAXC pExitContext; /* Exit context structure */ PMQHCONN pHconn; /* Connection handle */ PMQHOBJ pHobj; /* Object handle */ PPMQMD ppMsgDesc; /* Message descriptor */ PPMQGMO ppGetMsgOpts; /* Options that control the action of MQGET */ PMQLONG pBufferLength; /* Length in bytes of the pBuffer area */ PPMQVOID ppBuffer; /* Area to contain the message data */ PPMQLONG ppDataLength; /* Length of the message */ PMQLONG pCompCode; /* Completion code */ PMQLONG pReason; /* Reason code qualifying CompCode */