Home | Previous Page | Next Page   Function Descriptions >

mi_retrieve_callback( )

The mi_retrieve_callback( ) function retrieves the handle of a registered callback.

Syntax

mi_integer mi_retrieve_callback(conn, event_type, cback_handle, 
   cback_func,user_data)
   MI_CONNECTION *conn;
   MI_EVENT_TYPE event_type;
   MI_CALLBACK_HANDLE *cback_handle;
   MI_CALLBACK_FUNC *cback_func;
   void **user_data;
conn
is either NULL or a connection descriptor established by a previous call to mi_open( ), mi_server_connect( ), or mi_server_reconnect( ).
event_type
is the type of event that the cback_handle callback handles. For a list of valid event types, see the IBM Informix: DataBlade API Programmer's Guide.
cback_handle
is the callback handle from a previous call to mi_register_callback( ).
cback_func
is a pointer to the location at which to return a pointer to the callback function.
user_data
is the user-supplied argument to the callback function.
Valid in Client LIBMI Application? Valid in User-Defined Routine?
Yes Yes

Usage

The mi_retrieve_callback( ) function returns a callback-function pointer (MI_CALLBACK_FUNC) when you pass in a callback handle (MI_CALLBACK_HANDLE). This function is useful when a DataBlade API module needs to temporarily change the callback that is registered for a particular event.

Server Only

For a C UDR, conn must be NULL for the following event types:

End of Server Only
Client Only

For a client LIBMI application, you must provide a valid connection descriptor to mi_retrieve_callback( ) for callbacks that handle the following event types:

End of Client Only

Return Values

MI_OK
indicates that the function was successful.
MI_ERROR
indicates that the function was not successful.

Related Topics

See also the description of mi_register_callback( ).

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]