Link to home
Start Free TrialLog in
Avatar of ferozgora
ferozgora

asked on

Capturing File copy/delete/rename thru Shell Extension or other means..

There is a shell extension interface ICopyHook which gets called when there is copy / rename / delete  operation on the FOLDERS (and PRINTERS). By implementing this interface you could deny / allow these
operations on the file system thru Shell (Explorer or Common dialog boxes ).
Question :
I would like to do the same for the FILES too. I didn't find anything in the Shell extension though. How to do this with any other apporach ? Want to do this in the User space.
 
Avatar of Madshi
Madshi

You need to write drivers to allow/deny file actions, and the drivers are totally different for win9x and winNT based systems, sorry for the bad news...   :-(

Regards, Madshi.
Avatar of ferozgora

ASKER

Thanks Madshi for the response.
I was looking for the specific feature of Shell extension in ICopyHook . The copy - paste . If this operation is performed on a folder shell calls into the Icopyhook handler if present. I wanted a similar for files too possibly thru Shell. Else any other way . At driver leve it would not serve the purpose for me.
You could possibly hook the API SHFileOperation system wide. Would that help? That's no easy task, though...
If I can hook to the SHFileOperation and get called for all file operations ( copy,cut-paste in perticular)(without effecting system performance) that would be great. Any idea how I can hookup to it ? I'll go thru the docs in the mean time. Thanks.
Ehm, well, not for copy/paste itself, but for the following file operations. Do you really need to hook the copy/paste itself? In that case it gets *very* complicated. You could try to hook Ctrl-C + Ctrl-V + Ctrl-X and the menues, too. But that's really ugly...   :-(   For what purpose do you need this stuff? Is there really no other way?
Yup that would be really ugly. But your previous comment of hooking upto ShFileOperation made me think if there is a way I can intercept SHFileOperation() call by shell and override it. The purpose is to avoid stuff getting copied from my file system to anywhere else.
ASKER CERTIFIED SOLUTION
Avatar of Madshi
Madshi

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
P.S: My bed is calling. See ya tomorrow...
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial