
Description | Cautions | Example | Errors | See Also
Name: |
int dt_close(devh) | |
Inputs: |
int devh |
|
Returns: |
0 on success | |
Includes: |
srllib.h | |
Category: |
Resource Management | |
Mode: |
synchronous | |
The dt_close( ) function closes Digital Network Interface devices opened previously by a call to dt_open( ). The specified device may be either a Digital Network Interface logical board or time slot device. The dt_close( ) function releases the handle and breaks the link between the calling process and the device.
Parameter |
Description |
devh: |
Specifies the valid Digital Network Interface logical board or Digital Network Interface logical time slot device handle returned by a call to dt_open( ) |
#include <windows.h> /* For Windows applications only */
#include <srllib.h>
#include <dtilib.h>
#include <errno.h>
main()
{
int devh; /* Board device handle */
/*
* Open board 1 device
*/
if ( ( devh = dt_open( "dtiB1", 0 ) ) == -1 ) {
printf( "Cannot open board dtiB1. errno = %d", errno );
exit( 1 );
}
/*
* Continue processing
*/
.
.
.
/*
* Done processing - close device.
*/
if ( dt_close( devh ) == -1 ) {
printf( "Cannot close board dtiB1. errno = %d", errno );
}
}
If the function returns -1, use the SRL Standard Attribute function ATDV_LASTERR( ) to obtain the following error value:
Click here to contact Dialogic Customer Engineering
Copyright 2001, Dialogic Corporation