This function registers a call-back function that the runtime will invoke whenever the update event
eventnameoccurs.
MCO_RET mco_register_eventname_handler( /*IN*/ mco_trans_h trans, /*IN*/ mco_eventname_handler, /*IN*/ void *param, /*IN*/ MCO_HANDLING_ORDER when);
| trans | A transaction handle returned by mco_trans_start() |
|
mco_eventname_handler |
A pointer to the handler function |
|
param |
A pointer to user-defined storage |
|
when |
|
This function registers a call-back function that the runtime will invoke whenever the event eventname occurs. Update events are defined in the database schema by specifying the event type (
update) with a field specification and the name of the handler function to be called. Multiple handlers for a given eventname can be registered. The voidparamcan be used to pass any user-defined data structure between the application and the event handler.The
whenargument is one of the valuesMCO_BEFORE_UPDATEorMCO_AFTER_UPDATEand determine whether the handler is called before the object contents are updated, or after.
| MCO_S_OK | The instance was deleted successfully |
| MCO_E_ACCESS | The transaction handle is MCO_READ_ONLY |
| MCO_E_TRANSACT | A transaction error occurred |