RemoveDirectory (Windows Embedded CE 6.0)


This function deletes an empty directory. A RAPI version of this function exists called CeRemoveDirectory (RAPI).

BOOL RemoveDirectory(
  LPCTSTR lpPathName


[in] Pointer to a null-terminated string that specifies the path of the directory to be removed. The path must specify an empty directory, and the calling process must have delete access to the directory.

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

This function operates only on empty directories. If the directory is not empty, use the FindFirstFile function, the FindNextFile function, this function, and the DeleteFile function to recursively enumerate and delete the files and subdirectories in the directory.

Windows Embedded CEWindows CE 1.0 and later

Community Additions