
Description | Cautions | Example | Errors | See Also
Name: |
int dx_GetRscStatus(chdev,rsctype,status) | |
Inputs: |
int chdev |
|
int rsctype |
| |
int *status |
| |
Returns: |
0 if success | |
-1 if failure | ||
Includes: |
srllib.h | |
dxxxlib.h | ||
Category: |
Resource Management | |
The dx_GetRscStatus( ) function returns assignment status of the shared resource for the specified channel.
The function parameters are defined as follows:
Parameter |
Description |
chdev |
specifies the valid channel device handle obtained when the channel was opened using dx_open( ). |
rsctype |
specifies the type of shared resource: |
status |
points to the data that represents the assignment status of the resource: RSC_ASSIGNED: A shared resource of the specified rsctype is assigned to the channel. RSC_NOTASSIGNED: A shared resource of the specified rsctype is not assigned to the channel. |
None.
/* Check whether a shared Fax resource is assigned to the voice channel */
#include <stdio.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <faxlib.h>
#include <windows.h>
main()
{
int chdev ; /* Fax channel device handle */
int status;
/*Open the Voice channel resource (device) using dx_open(). */
:
:
/*Open the FAX channel resource(device) */
if((chdev = fx_open("dxxxB1C1", NULL)) == -1) {
/*Error opening device */
/* Perform system error processing */
exit(1);
}
/*Get current Resource Status*/
if(dx_GetRscStatus(chdev, RSC_FAX, &status) == -1) {
printf("Error - %s (error code %d)\n", ATDV_ERRMSGP(chdev), ATDV_LASTERR(chdev));
if(ATDV_LASTERR(chdev) == EDX_SYSTEM) {
/* Perform system error processing */
}
}
else {
printf("The resource status ::%d\n", status);
}
}
If this function returns -1 to indicate failure, use ATDV_LASTERR( ) and ATDV_ERRMSGP( ) to retrieve one of the following error reasons:
|
EDX_BADPARM |
|
EDX_SYSTEM |
|
Click here to contact Dialogic Customer Engineering
Copyright 2002, Dialogic Corporation