Intel 05-1832-002 User Manual
![Intel](https://files.manualsbrain.com/attachments/5a71b1e7f60391972dadeef20435931cbf4621a5/common/fit/150/50/86c99b5f14aeb2708e9a9e1b5305af4ccf882c1af0155dad25413c2ed84e/brand_logo.png)
208
Voice API for Windows Operating Systems Library Reference — November 2003
dx_fileopen( ) — open a file
dx_fileopen( )
open a file
!
!
!
! Description
The dx_fileopen( ) function opens a file specified by filep, and prepares the file for reading and
writing, as specified by flags. See the _open function in the Microsoft Visual C++ Run-Time
Library Reference for more information.
writing, as specified by flags. See the _open function in the Microsoft Visual C++ Run-Time
Library Reference for more information.
Use dx_fileopen( ) instead of _open to ensure the compatibility of applications with the libraries
across various versions of Visual C++.
across various versions of Visual C++.
!
!
!
! Cautions
When using
to record WAVE files, you cannot use the O_APPEND mode with
dx_fileopen( ), because for each record, a WAVE file header will be created.
!
!
!
! 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.
obtain the system error value. Refer to the dx_fileerrno( ) function for a list of the possible system
error values.
!
!
!
! Example
/* Play a voice file. Terminate on receiving 4 digits or at end of file*/
#include <fcntl.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <windows.h>
Name:
int dx_fileopen(filep, flags, pmode)
Inputs:
const char *filep
•
filename
int flags
•
type of operations allowed
int pmode
•
permission mode
Returns:
file handle if success
-1 if failure
-1 if failure
Includes:
srllib.h
dxxxlib.h
dxxxlib.h
Category:
File Manipulation
Mode:
synchronous
Platform:
DM3, Springware