
Description | Cautions | Example | Errors | See Also
Name: |
int dx_open(namep,oflags) | |
Inputs: |
char *namep |
|
int oflags |
| |
Returns: |
>0 to indicate valid Dialogic device handle if successful | |
-1 if failure | ||
Includes: |
srllib.h | |
dxxxlib.h | ||
Category: |
Device Management | |
The dx_open( ) function opens a Voice device and returns a unique Dialogic 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.
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.
In applications that spawn child processes off a parent process, the device handle is not inheritable by the child process. Make sure devices are opened in the child process.
The function parameters are defined as follows:
Do not use the Windows open( ) function to open a Voice device. Unpredictable results will occur.
#include <srllib.h>
#include <dxxxlib.h>
#include <windows.h>
main()
{
int chdev; /* channel descriptor */
.
.
.
/* Open Channel */
if ((chdev = dx_open("dxxxB1C1",NULL)) == -1) {
/* process error */
}
.
.
}
If this function returns -1 to indicate failure, a system error has occurred; use dx_fileerrno( ) to obtain the system error value. Refer to the dx_fileerrno( ) function for a list of the possible system error values.
Click here to contact Dialogic Customer Engineering
Copyright 2002, Dialogic Corporation