Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

DeleteFile

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

This function deletes a file from a file system. A RAPI version of this function exists called CeDeleteFile (RAPI).


BOOL DeleteFile(
  LPCTSTR lpFileName
);
lpFileName

[in] Pointer to a null-terminated string that specifies the file to be deleted.

Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError.

If the file does not exist, this function fails.

Use the RemoveDirectory function to delete a directory.

This 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.

Headerwinbase.h
Librarycoredll.lib
Windows Embedded CEWindows CE 1.0 and later
Windows MobileWindows Mobile Version 5.0 and later
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.