Intel 05-1832-002 User Manual

Page of 564
Voice API for Windows Operating Systems Library Reference — November 2003
203
close a file — dx_fileclose( )
dx_fileclose( )
close a file
!
!
!
Description
The dx_fileclose( ) function closes a file associated with the device handle returned by the 
 function. See the _close function in the Microsoft Visual C++ Run-Time Library 
Reference for more information.   
Use dx_fileclose( ) instead of _close 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
/* 
 * 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_fileclose(handle)
Inputs:
int handle
handle returned from dx_fileopen( ) 
Returns:
0 if success
-1 if failure
Includes:
srllib.h
dxxxlib.h
Category:
File Manipulation
Mode:
synchronous
Platform:
DM3, Springware