Intel 05-1832-002 IP Phone User Manual


 
Voice API for Windows Operating Systems Library Reference — November 2003 271
retrieve the board serial number — dx_gtsernum( )
!
!!
! Cautions
None.
!
!!
! Errors
If the function returns -1, use the Standard Runtime Library (SRL) Standard Attribute function
ATDV_LASTERR( ) to obtain the error code or use ATDV_ERRMSGP( ) to obtain a descriptive
error message. One of the following error codes may be returned:
EDX_SYSTEM
Error from operating system; use dx_fileerrno( ) to obtain error value. The board device is
busy.
EDX_BADPARM
Invalid device handle or sub-function.
EDX_BADPROD
The board does not support GS_SSN (silicon serial number).
!
!!
! Example
/*$ dx_gtsernum( ) example $*/
#include "stdio.h"
#include "srllib.h"
#include "dxxxlib.h"
void main(int argc, char **argv)
{
int dev;
char serial[10];
/* open the board device */
if ((dev=dx_open("dxxxB1",0 )) == -1) {
printf("Error opening dxxxB1\n");
exit(1);
}
/* get the board serial number and display it */
if (dx_gtsernum(dev, GS_SN, serial) == 0) {
printf("dxxxB1: %s\n", serial);
} else {
printf("Error %d, %s\n", ATDV_LASTERR(dev), ATDV_ERRMSGP(dev));
}
dx_close(dev);
exit(0);
}
!
!!
! See Also
dx_open( )