DeleteFile
DeleteFile deletes an existing file.
Syntax
BOOL DeleteFile(
[in] LPCTSTR lpFileName
);
Parameters
[in] lpFileName
Points to a null-terminated string that specifies the file to be deleted.
Return Value
If the function succeeds, it returns TRUE. If the function fails, it returns FALSE. Call GetLastError to get extended error information.
Remarks
If an application attempts to delete a file that does not exist, the DeleteFile function fails.
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, use the CloseHandle function.
Filesystem APIs only support absolute path names. If a relative or simple path name is passed into the function, it will return ERROR_PATH_NOT_FOUND.
Requirements
| Minimum supported version | Header | Library |
|---|---|---|
|
wRTOS 1.0 SDK |
windows.h |
wRTOS_rtss.lib |
See Also: