A CS-Library message callback is defined as follows:
CS_INT cslibmsg_cb(context, message) CS_CONTEXT *context; CS_CLIENTMSG *message;
where:
context is a pointer to the CS_CONTEXT structure for which the message occurred.
message is a pointer to a CS_CLIENTMSG structure containing message information. For information on the CS_CLIENTMSG structure, see the “CS_CLIENTMSG Structure” topics page in the Open Client Client-Library/C Reference Manual. Note the following similarities with Client-Library:
Error severities for CS-Library errors have the same meaning as for Client-Library errors.
The message->msgnumber field is a bit-packed CS_INT. This number is unpacked with the macros CS_LAYER, CS_ORIGIN, CS_NUMBER, and CS_SEVERITY. This method is the same for Client-Library messages.
Note that message can have a new value each time the message callback is called.
A CS-Library message callback must return either:
CS_SUCCEED, to instruct CS-Library to continue any processing that is currently occurring on this context, or
CS_FAIL, to instruct CS-Library to terminate any processing that is currently occurring on this context.