How can I handle the copy operation in C#?

Hi I'm a C# programmer (just a beginner !) and i was asked to control the copy operation in windows (allow or stop copy operation based on criteria i choose preferably controlled in a lan) . Al my researches came to nothing please help.
[238 byte] By [FTGforever] at [2008-1-10]
# 1
Are you talking about all copy operations on the system, or a copy operation in your application?
PeterRitchie at 2007-10-3 > top of Msdn Tech,Visual C#,Visual C# General...
# 2
All operations to control the copy process in a cyber
FTGforever at 2007-10-3 > top of Msdn Tech,Visual C#,Visual C# General...
# 3
Hi,
If i have understand your question properly, it is to monitor the files beging copied/modified in a physical folder. You can implement this through FileWatcher concept. Please go through the below link

http://www.codeproject.com/cs/files/C__FileWatcher.asp

It may help you out.

Cheers,
Balaji Prabu

BalajiPrabu at 2007-10-3 > top of Msdn Tech,Visual C#,Visual C# General...
# 4

Thanks for the reply, but that's not what I need. This page tells me to monitor a folder for change then do something . No, what I want is when windows have a copy or move request it comes to me first then i decide whether this operation occurs or not according to the destination to protect files from being copied from the computer. My search led to an

interface called ICopyHook which is an API method I can't use !!

The link is http://msdn2.microsoft.com/en-us/library/ms646538.aspx.
FTGforever at 2007-10-3 > top of Msdn Tech,Visual C#,Visual C# General...
# 5

ICopyCallback is only used when the shell copies a file or an application uses SHFileOperation to copy the file. A command prompt or a .NET application using File.Copy won't use SHFileOperation.

Short of writing some sort of file system shim or a system hook (both of which can't be done with .NET), you can't intercept a file operation like copying.

PeterRitchie at 2007-10-3 > top of Msdn Tech,Visual C#,Visual C# General...