Initializes the BPS library for use with the caller's current thread.
BPS_API int bps_initialize(void)
The bps_initialize() function initializes the BPS library. This function must be the first BPS function you call for a thread when you want to use BPS library functions.
If initialization of the library fails, a BPS_FAILURE value is returned with the errno value set. The use of any BPS library function without a successful invocation of the bps_initialize() functions results in undefined behavior.
Your application can call the bps_initialize() function more than once. An application that calls the bps_initialize() function multiple times should call the bps_shutdown() function the same number of times.
For multi-threaded applications, call the bps_initialize() function at the beginning of the thread, and call the bps_shutdown() function before the thread terminates. When the bps_initialize() function is called for a new thread, it automatically creates a default channel and sets it as the thread's active channel. Events are requested on a per-channel basis.
For example, when you want to receive navigator events on a new thread, call the navigator_request_events() function after calling bps_initialize() function, even if you had already called the navigator_request_events() function previously on a different thread. See the bps_channel_create() function for more details about channels.
BPS_SUCCESS when the function completes successfully, BPS_FAILURE with the errno value set otherwise.