Intel 05-1832-002 IP Phone User Manual


 
216 Voice API for Windows Operating Systems Library Reference — November 2003
dx_filewrite( ) — write data from a buffer into a file
dx_filewrite( )
write data from a buffer into a file
!
!!
! Description
The dx_filewrite( ) function writes data from a buffer into a file associated with file handle. The
write operation begins at the current position of the file pointer (if any) associated with the given
file. If the file was opened for appending, the operation begins at the current end of the file. After
the write operation, the file pointer is increased by the number of bytes actually written. See the
_write function in the Microsoft Visual C++ Run-Time Library Reference for more information.
Use dx_filewrite( ) instead of _write 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()
{
int cd; /* channel device descriptor */
DX_UIO myio; /* user definable I/O structure */
Name: int dx_filewrite(handle, buffer, count)
Inputs: int handle
handle returned from dx_fileopen( )
void *buffer
data to be written
unsigned int count
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