
Description | Cautions | Example | Errors | See Also
Name: |
int fx_close(dev) | |
Inputs: |
int dev |
fax channel device handle |
Returns: |
0 if successful | |
|
-1 if error | |
Includes: |
srllib.h | |
|
dxxxlib.h | |
|
faxlib.h | |
Category: |
resource management | |
Mode: |
synchronous | |
|
||
The fx_close( ) function closes a Dialogic fax channel device opened previously using fx_open( ). It releases the handle and breaks any link the calling process has with the fax device channel through this handle, regardless of whether the device is busy or idle.
|
|
Parameter |
Description |
|
dev |
Specifies the valid Dialogic fax device handle obtained when the channel device was opened. |
#include <windows.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <faxlib.h>
main( )
{
int dev; /* Fax channel device handle. */
/* Open the Voice channel device using dx_open( ). */
.
.
/* Open the FAX channel 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. */
.
.
/* Close the FAX channel device. */
if (fx_close(dev) == -1) {
/* Error closing device. */
printf("Error closing channel\n");
printf("Error - %s (error code %d)\n",
ATDV_ERRMSGP(dev), ATDV_LASTERR(dev));
if (ATDV_LASTERR(dev) == EDX_SYSTEM) {
/* Perform system error processing */
}
exit(1);
}
.
.
}
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 in the Voice Software Reference - Programmer's Guide for a list of the possible system error values.
Click here to contact Dialogic Customer Engineering
Copyright 2002, Intel Corporation