Intel 05-1832-002 IP Phone User Manual


 
Voice API for Windows Operating Systems Library Reference — November 2003 213
move a file pointer — dx_fileseek( )
dx_fileseek( )
move a file pointer
!
!!
! Description
The dx_fileseek( ) function moves a file pointer associated with the file handle to a new location
that is offset bytes from origin. The function returns the offset, in bytes, of the new position from
the beginning of the file. See the _lseek function in the Microsoft Visual C++ Run-Time Library
Reference for more information.
Use dx_fileseek( ) instead of _lseek to ensure the compatibility of applications with the libraries
across various versions of Visual C++.
!
!!
! Cautions
Do not use dx_fileseek( ) against files that utilize encoding formats with headers (such as GSM).
The dx_fileseek( ) function is not designed to make adjustments for the various header sizes that
some encoding formats use.
!
!!
! 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>
Name: long dx_fileseek(handle, offset, origin)
Inputs: int handle
handle returned from dx_fileopen( )
long offset
number of bytes from the origin
int origin
initial position
Returns: number of bytes read if success
-1 if failure
Includes: srllib.h
dxxxlib.h
Category: File Manipulation
Mode: synchronous
Platform: DM3, Springware