The Recycle Bin provides a repository for deleted files. If your application includes a facility for deleting files, support the Recycle Bin interface. You can also support deletion to the Recycle Bin for nonfile objects by first formatting the deleted data as a file by writing it to a temporary file and then calling the system functions that support the Recycle Bin.
Note
The SHFileOperation function supports deletion using the Recycle Bin interface. For more information about this function, see the documentation included in the Win32 SDK.