
Description | Cautions | Example | Errors | See Also
Name: |
int dcb_dsprescount(devh,valuep) | |
Inputs: |
int devh |
|
int * valuep |
| |
Returns: |
0 on success | |
Includes: |
srllib.h | |
Category: |
Configuration | |
Mode: |
synchronous | |
The dcb_dsprescount( ) function returns the available conferencing resource count for a specified DSP. Each DSP has 32 resources managed by the application.
Parameter |
Description |
devh: |
The DCB/SC DSP device handle. |
valuep: |
Integer pointer to where the free DSP resource count is returned. |
Calling any of the following functions will cause the available resource count to change:
Function |
Condition |
Uses the total number of parties in the new conference. | |
Dcb_addtoconf( ) |
One resource will be used every time a conferee is added to a conference. |
Dcb_remfromconf( ) |
Frees one resource. |
Dcb_delconf( ) |
Frees all resources in use by the conference, including the monitor. |
Dcb_monconf( ) |
Uses one resource. |
Dcb_unmonconf( ) |
Frees one resource. |
This function fails when the device handle specified is invalid.
#include <windows.h>
#include <stdio.h>
#include "srllib.h"
#include "dtilib.h"
#include "msilib.h"
#include "dcblib.h"
#include "errno.h"
main()
{
int dspdevh; /* DCB/SC DSP device descriptor */
int count; /* DSP resource count */
/* Open DCB/SC board 1, DSP 2 */
if ((dspdevh = dcb_open("dcbB1D2",0)) == -1) {
printf("Cannot open dcbB1D2: errno = %d\n", errno);
exit(1);
}
/* Get unused conference-resource count for dspdevh */
if (dcb_dsprescount(dspdevh, &count) == -1) {
printf("Error Message : %s", ATDV_ERRMSGP(dspdevh));
exit(1);
}
else
printf("Free DSP Resource count = %d\n", count);
if (dcb_close(dspdevh) == -1) {
printf("Cannot close dcbB1D2 : %s/n", ATDV.ERRMSGP (dspdevh)),
exit(1);
}
}
If the function does not complete successfully, it will return -1 to indicate an error. Use the Standard Attribute functions ATDV_LASTERR( ) to obtain the applicable error value, or ATDV_ERRMSGP( ) to obtain a more descriptive error message.
Refer to the error type tables found in Chapter 2 of this guide. Error defines can be found in dtilib.h, msilib.h or dcblib.h.
Click here to contact Dialogic Customer Engineering
Copyright 2000, Dialogic Corporation