Intel 05-1832-002 IP Phone User Manual


 
Voice API for Windows Operating Systems Library Reference — November 2003 369
install and retrieve user-defined I/O functions — dx_setdevuio( )
dx_setdevuio( )
install and retrieve user-defined I/O functions
!
!!
! Description
The dx_setdevuio( ) function installs and retrieves user-defined I/O functions on a per channel
device basis. The user I/O functions installed using this function are used on all subsequent I/O
operations performed on the channel even if the application installs global user I/O functions for all
devices using the dx_setuio( ) function. The user I/O functions are installed by installing a pointer
to a DX_UIO structure which contains addresses of the user-defined I/O functions.
Name: int dx_setdevuio(chdev, devuiop, retuiop)
Inputs: int chdev
valid channel device handle
DX_UIO *devuiop
pointer to user I/O routines structure
DX_UIO **retuiop
pointer to return pointer for user I/O routines structure
Returns: 0 if successful
-1 error return code
Includes: srllib.h
dxxxlib.h
Category: I/O
Mode: synchronous
Platform: DM3, Springware
Parameter Description
chdev the channel for which the user-defined I/O functions will be installed
devuiop a pointer to an application-defined global DX_UIO structure which
contains the addresses of the user-defined I/O functions. This pointer to
the DX_UIO structure will be stored in the voice DLL for the specified
chdev channel device. The application must not overwrite the DX_UIO
structure until dx_setdevuio( ) has been called again for this device with
the pointer to another DX_UIO structure.
retuiop the address of a pointer to a DX_UIO structure. Any previously installed
I/O functions for the chdev device are returned to the application as a
pointer to DX_UIO structure in retuiop. If this is the first time
dx_setdevuio( ) is called for a device, then retuiop will be filled with the
pointer to the global DX_UIO structure which may contain addresses of
the user-defined I/O function that apply to all devices.
Either of devuiop or retuiop may be NULL, but not both at the same
time. If retuiop is NULL, the dx_setdevuio( ) function will only install
the user I/O functions specified via the DX_UIO pointer in devuiop but
will not return the address of the previously installed DX_UIO structure.
If devuiop is NULL, then the previously installed DX_UIO structure
pointer will be returned in retuiop but no new functions will be installed.