ASetIOErrorHandler(3X)
NAME
ASetIOErrorHandler − replace default I/O error handler with specified handler
SYNOPSIS
AIOErrorHandler
ASetIOErrorHandler (
AIOErrorHandler handler);
DESCRIPTION
ASetIOErrorHandler() replaces the default I/O error handler with the handler specified in handler, and returns a pointer to the handler that was previously in effect. When the new handler exits via return, the application program exits.
handler is the pointer to an application-supplied I/O handler function.
RETURN VALUE
Upon successful completion, ASetIOErrorHandler() returns a pointer to the handler that was previously in effect.
ERRORS
ASetIOErrorHandler() does not return an error status.
EXAMPLE
The following example replaces the default I/O error handler with a handler named my_io_handler.
long my_io_handler(Audio ∗ audio)
{
printf ("An I/O Error Occurred!\n");
return 0;
}
.
.
.
AIOErrorHandler
prev_io_handler; /∗ ptr to previous handler ∗/
AIOErrorHandler
my_io_handler; /∗ this data type is a function∗/
.
.
.
/∗ replace default I/O error handler ∗/
prev_io_handler = ASetIOErrorHandler(my_io_handler);
DEPENDENCIES
This function belongs to the Audio Library of functions that manage connections to an audio server. The audio server must run on a system that has audio hardware. To find out whether or not your system has audio hardware, refer to the hardware manual that accompanies your system.
AUTHOR
ASetIOErrorHandler() was developed by HP.
SEE ALSO
Using the Audio Application Program Interface.
Hewlett-Packard Company — HP-UX Release 8.07: November 1991