
Description | Cautions | Example | Errors | See Also
Name: |
int fx_open(namep,mode) | |
Inputs: |
char *namep |
pointer to device name to open |
|
int mode |
reserved for future use |
Returns: |
>0 to indicate valid Dialogic device handle if successful | |
|
-1 if failure | |
Includes: |
srllib.h | |
|
dxxxlib.h | |
|
faxlib.h | |
Category: |
resource management | |
Mode: |
synchronous | |
|
||
The fx_open( ) function opens a fax channel or board device and returns a unique Dialogic device handle to identify the fax channel or board device.
All subsequent Dialogic fax API calls to the opened fax channel/board device must be made using the fax channel/board device handle until the fax channel/board device is closed.
A fax device can be opened more than once by any number of processes.
Issuing an fx_open( ) while the fax device is in use by another process does not affect the current operation of the fax device.
|
|||
Parameter |
Description | ||
namep |
Pointer to a NULL-terminated ASCII string (ASCIIZ string) that contains the name of the valid Dialogic fax channel or board device. The valid device names are automatically generated during installation according to the following naming conventions. | ||
|
The value in the name field takes one of the following forms (by default): | ||
|
Board device: |
dxxxBn | |
|
Channel device: |
dxxxBnCm | |
|
where: | ||
|
n is the decimal number of the board in the system | ||
|
m is the decimal number of the channel on the board | ||
|
Boards and channels are numbered starting from one. | ||
mode |
Reserved for future use. This parameter should be set to NULL. | ||
The fax device handle returned by this function is Dialogic defined. It is not a standard Windows file descriptor. Any attempts to use Windows operating system commands will produce unexpected results.
#include <windows.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <faxlib.h>
main( )
{
int dev; /* Fax channel device handle. */
/* Open the Voice channel resource (device) using dx_open( ). */
.
.
/* Open the FAX channel resource (device). */
if ((dev = fx_open("dxxxB1C1", NULL)) == -1) {
/* Error opening device. */
/* Perform system error processing */
exit(1);
}
.
.
/* FAX transfers (send/receive) calling FAX API functions using dev. */
.
.
}
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, Intel Corporation