informix
Informix DataBlade API Programmer's Manual
DataBlade API Function Descriptions

mi_register_callback()

The mi_register_callback() function registers a callback function for a single event type or for all event types.

Syntax

Usage

The mi_register_callback() function registers the callback that cback_func identifies for the event that event_type specifies. If event_type is MI_All_Events, the callback is registered for all events.

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

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

The callback is enabled when it is registered. You can explicitly disable the callback with the mi_disable_callback() function and reenable it with mi_enable_callback().

The mi_register_callback() function initializes the DataBlade API when it is the first DataBlade API function in a client LIBMI application or a C UDR. For more information, see Initializing the DataBlade API.

You can use the user_data parameter to specify the address of a user-defined error structure, which the callback can use to hold additional error information.

Return Values

MI_CALLBACK_HANDLE * is a pointer to the newly registered callback function.
NULL indicates that the function was not successful.

Related Topics

See the descriptions of the following functions: mi_disable_callback(), mi_enable_callback(), mi_retrieve_callback(), and mi_unregister_callback().

For more information, see Registering a Callback.


Informix DataBlade API Programmer's Manual, Version 9.2
Copyright © 1999, Informix Software, Inc. All rights reserved