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.
|
The MQ_GET_EXIT call has the following parameters.
Exit parameter structure.
Exit context structure.
Connection handle.
Object handle.
Message descriptor.
Options that control the action of MQGET .
Length in bytes of the ppBuffer area.
Area to contain the message data.
Length of the message.
Completion code.
Reason code qualifying pCompCode.
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.
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 */