Intel 05-1832-002 IP Phone User Manual


 
210 Voice API for Windows Operating Systems Library Reference — November 2003
dx_fileread( ) — read data from a file
dx_fileread( )
read data from a file
!
!!
! Description
The dx_fileread( ) function reads data from a file associated with the file handle. The function will
read the number of bytes from the file associated with the handle into the buffer. The number of
bytes read may be less than the value of count if there are fewer than count bytes left in the file or
if the file was opened in text mode. See the _read function in the Microsoft Visual C++ Run-Time
Library Reference for more information.
Use dx_fileread( ) instead of _read to ensure the compatibility of applications with the libraries
across various versions of Visual C++.
!
!!
! Cautions
None.
!
!!
! Errors
If this function returns -1 to indicate failure, a system error has occurred; use dx_fileerrno( ) to
obtain the system error value. Refer to the dx_fileerrno( ) function for a list of the possible system
error values.
!
!!
! Example
#include <stdio.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <windows.h>
main()
{
Name: int dx_fileread(handle, buffer, count)
Inputs: int handle
handle returned from dx_fileopen( )
void *buffer
storage location for data
unsigned int count
maximum number of bytes
Returns: number of bytes if success
-1 if failure
Includes: srllib.h
dxxxlib.h
Category: File Manipulation
Mode: synchronous
Platform: DM3, Springware