Intel 05-1832-002 IP Phone User Manual


 
166 Voice API for Windows Operating Systems Library Reference — November 2003
dx_close( ) — close a channel or board device handle
dx_close( )
close a channel or board device handle
!
!!
! Description
The dx_close( ) function closes a channel device handle or board device handle that was previously
opened using dx_open( ). On DM3 boards, the dx_close( ) function also closes a physical board
device that was previously opened using dx_open( ).
This function does not affect any action occurring on a device. It does not affect the hook state or
any of the parameters that have been set for the device. It releases the handle and breaks the link
between the calling process and the device, regardless of whether the device is busy or idle.
Note: The dx_close( ) function disables the generation of all events.
!
!!
! Cautions
Once a device is closed, a process can no longer act on that device using that device handle.
Other handles for that device that exist in the same process or other processes will still be
valid.
The only process affected by dx_close( ) is the process that called the function.
Do not use the Windows close( ) function to close a voice device; unpredictable results will
occur.
The dx_close( ) function discards any outstanding events on that handle.
On DM3 boards, if you close a device via dx_close( ) after modifying speed and volume table
values using dx_setsvmt( ), the dx_getcursv( ) function may return incorrect speed and
volume settings for the device. This is because the next dx_open( ) resets the speed and
volume tables to their default values.
Name: int dx_close(dev)
Inputs: int dev
valid channel or board device handle
Returns: 0 if successful
-1 if error
Includes: srllib.h
dxxxlib.h
Category: Device Management
Mode: synchronous
Platform: DM3, Springware
Parameter Description
dev specifies the valid device handle obtained when a board or channel was opened
using dx_open( )