Intel 05-1832-002 User Manual

Page of 564
292
Voice API for Windows Operating Systems Library Reference — November 2003
dx_open( ) — open a voice device and return a unique device handle
dx_open( )
open a voice device and return a unique device handle
!
!
!
Description
The dx_open( ) function opens a voice board device, channel device, or physical board device, and 
returns a unique device handle to identify the device. All subsequent references to the opened 
device must be made using the handle until the device is closed. A device can be opened more than 
once by any number of processes. 
The device handle returned by this function is defined by Intel. It is not a standard operating system 
file descriptor. Any attempts to use operating system commands such as read( )write( ), or ioctl( ) 
will produce unexpected results.
By default, the maximum number of times you can simultaneously open the same channel in your 
application is set to 30 in the Windows Registry.
Use Standard Runtime Library device mapper functions to return information about the structure of 
the system, including a list of all physical boards, all virtual boards on a physical board, and all 
subdevices on a virtual board. This device information is used as input in the dx_open( ) function. 
For more information on these functions, see the Standard Runtime Library API Library Reference
Name:
int dx_open(namep, oflags)
Inputs:
char *namep 
pointer to device name to open
Returns:
>0 to indicate valid device handle if successful
-1 if failure
Includes:
srllib.h
dxxxlib.h
Category:
Device Management
Mode:
synchronous
Platform:
DM3, Springware 
Parameter
Description
namep 
points to an ASCIIZ string that contains the name of the valid device. These 
valid devices can be either boards or channels.   
The standard board device naming convention for voice devices is: dxxxB1, 
dxxxB2, and so on. 
The standard channel device naming convention for voice devices is: 
dxxxB1C1, dxxxB1C2, and so on. 
On DM3 boards, if issuing this function for cached prompt management, then 
this parameter points to a physical board device. The physical board device 
naming convention is: brdB1, brdB2, and so on. For more information on 
cached prompt management, see the Voice API Programming Guide
oflags 
reserved for future use. Set this parameter to 0.