is there any winapi call to check if drive has assigned a valid recycle bin?

124 views Asked by At

I mean the situation with removable drives or other non typical HDD's that do not have recycle bin (even if there is a such directory in main path, maybe the drive was connected before as non-removable, who knows) and all files are permanently deleted from such drive, even if using SHFileOperation/SHFILEOPSTRUCT.

I've tried this call: SHQueryRecycleBin - but this is only for desktop apps, and so returns zero on all it's data outputs no matter if I give it a fixed C drive or removable flash.

I found also this approach: How can I tell that a directory is really a recycle bin? , but here I must know first for what directory to look, and I do not want to get to such details, I want to know only if given file will be destroyed or moved to recycle bin.

A side question: is it possible to force system to move a file to recycle bin from a flash drive that doesn't have it ? The only way I think it is approachable is to move the file to the system temp dir and then delete it from there ?

0

There are 0 answers