
Description | Cautions | Example | Errors | See Also
|
Name: |
int dcb_close(devh) |
|
|
Inputs: |
int devh |
|
|
Returns: |
0 on success |
|
| -1 on failure | ||
|
Includes: |
srllib.h |
|
| dcblib.h | ||
| errno.h | ||
| dtilib.h | ||
| msilib.h | ||
|
Category: |
Device Management |
|
|
Mode: |
synchronous |
|
The dcb_close( ) function closes the DCB/SC device previously opened by dcb_open( ). The devices are either DCB/SC boards or DSPs on the board. The dcb_close( ) function releases the handle.
Parameter |
Description |
devh: |
The valid DCB/SC device handle returned by a call to dcb_open( ). |
#include <windows.h>
#include <stdio.h>
#include "srllib.h"
#include "dtilib.h"
#include "msilib.h"
#include "dcblib.h"
#include "errno.h"
main()
{
int dspdevh; /* DSP device descriptor variable */
/* Open DCB/SC board 1, DSP 2 device */
if ((dspdevh = dcb_open("dcbB1D2",0)) == -1) {
printf("Cannot open DSP dcbB1D2 : errno = %d", errno);
exit(1);
}
/* Continue Processing */
/* Done processing - close device */
if (dcb_close(dspdevh) == -1) {
printf("Cannot close DSP dcbB1D2 : errno = %d", errno);
exit(1);
}
}
The dcb_close( ) function does not return errors in the standard return code format. If an error occurred during the dcb_close( ) call, a -1 will be returned, and the specific error number will be returned in the errno global variable.
Click here to contact Dialogic Customer Engineering
Copyright 2000, Dialogic Corporation