EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Delete to recycle bin

Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.
#9272
Posted: 03/13/2009 10:57:00
by Daniel Öberg (Standard support level)
Joined: 02/26/2009
Posts: 18

How come CbFltCanFileBeDeletedC is firing when deleting a file to the recycle bin? It should only move the file, right?

When restoring the file from the recycle bin a file in the recycle bin is deleted. But this file don't exist when CbFltCanFileBeDeletedC does the callback. Also just a move as well?

Deleting the file from the recycle bin gets two callbacks. The file and a file that doesn't seem to exist. Perhaps it should be two files, but a bit strange still.

(Vista SP1 x86)
Driver 1.1.15.40
#9278
Posted: 03/13/2009 13:00:14
by Vladimir Cherniga (EldoS Corp.)

Does your recicle bin and deleted file are reside on the same logical disk partition ?
#9282
Posted: 03/13/2009 14:28:26
by Daniel Öberg (Standard support level)
Joined: 02/26/2009
Posts: 18

Yes, they do.
Normal setup. Only one drive (C:).
#9285
Posted: 03/15/2009 13:14:39
by Vladimir Cherniga (EldoS Corp.)

Quote
Daniel Öberg wrote:
How come CbFltCanFileBeDeletedC is firing when deleting a file to the recycle bin? It should only move the file, right?


This is how explorer moves file to the recycle bin. So, the first call with IRP_MJ_SET_INFORMATION/FileDispositionInformation DeleteFile = TRUE, which triggers CbFltCanFileBeDeletedC event, is to make sure delete operation is ok on the file. If its successful, the explorer then instead of sending IRP_MJ_CLOSE/CLEANUP, which would actually delete the file, sends a file undelete notification (IRP_MJ_SET_INFORMATION/FileDispositionInformation DeleteFile = FALSE)as it needs to send it to recycle bin.The Second call is to make sure the file does not actually gets deleted,even after the "close" happens. Then it makes the third call(IRP_MJ_SET_INFORMATION/FileRenameInformation) which actually "delete" file to the recycle bin

Quote
Daniel Öberg wrote:
When restoring the file from the recycle bin a file in the recycle bin is deleted. But this file don't exist when CbFltCanFileBeDeletedC does the callback. Also just a move as well?


The same situation as previous.

Reply

Statistics

Topic viewed 3355 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!