Intel 05-1832-002 IP Phone User Manual


 
246 Voice API for Windows Operating Systems Library Reference — November 2003
dx_GetRscStatus( ) — return assignment status of a shared resource
EDX_SYSTEM
Error from operating system; use dx_fileerrno( ) to obtain error value
!
!!
! Example
/* Check whether a shared Fax resource is assigned to the voice channel */
#include <windows.h>
#include <stdio.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <faxlib.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);
}
}
!
!!
! See Also
DSP Fax topic in the Fax Software Reference