DeleteFile
This function deletes an existing file from a file system. It can also delete an unmounted database volume. A remote application interface (RAPI) version of this function exists, and it is named CeDeleteFile.
BOOL DeleteFile(
LPCTSTR lpFileName );
Parameters
- lpFileName
[in] Pointer to a null-terminated string that specifies the file or database volume to be deleted.
Return Values
Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError.
Remarks
If an application attempts to delete a file that does not exist, the DeleteFile function fails.
Use the RemoveDirectory function to delete a directory.
The DeleteFile function fails if an application attempts to delete a file that is open for normal I/O or as a memory-mapped file.
To close an open file handle, use the CloseHandle function.
To unmount a database volume, use the CeUnmountDBVol function.
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 1.0 and later | Winbase.h | Coredll.lib, Fsmain.lib |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
CeDeleteFile, CeUnmountDBVol, CloseHandle, CreateFile, GetLastError, RemoveDirectory, CeUnmountDBVol
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.