Share via


IRAPISession::CeDeleteFile

Send Feedback

This method deletes a file from the object store on a remote Microsoft® Windows® CE–based device.

BOOL CeDeleteFile(
  LPCWSTR lpFileName 
);

Parameters

  • lpFileName
    [in] Long pointer to a null-terminated string that specifies the file to be deleted.

Return Values

Nonzero indicates success. Zero indicates failure. To get extended error information, call IRAPISession::CeGetLastError and IRAPISession::CeRapiGetError.

Remarks

If an application attempts to delete a file that does not exist, the IRAPISession::CeDeleteFile function fails. The IRAPISession::CeDeleteFile function fails if an application attempts to delete a file that is open for normal I/O or as a memory-mapped file.

Use the IRAPISession::CeRemoveDirectory function to delete a directory.

To close an open file handle, use the IRAPISession::CeCloseHandle function.

Requirements

OS Versions: Windows CE 5.01 and later.
Header: Rapi2.h.
Link Library: Ole32.lib, Rapiuuid.lib.

See Also

IRAPISession::IUnknown | IRAPISession::CeCreateFile | IRAPISession::CeRemoveDirectory | IRAPISession::CeCloseHandle

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.