intercept "Open" event for any files in a given folder

  • Thread starter Thread starter Morten Overgaard
  • Start date Start date
M

Morten Overgaard

Hi all
Is it possible for a .Net app. to intercept the "open" action on files in a
given directory.
I want to intercept the "open" action and the perhaps direct the client (
the app. which is trying to open the file ) to another file - or stream
another file back to the client in someway???

Any help is appreciated

Regards Morten
 
Hello Morten,

Thanks for your post. As I understand, you need to intercept the "open"
file action and redirect to open another file. Please correct me if there
is any misunderstanding. I now share the following information with you:

1. In .NET, we can use the FileSystemWatcher class to listen to the file
system change notifications and raises events when a directory, or file in
a directory, changes. With this class, we can watch for renaming, deletion,
or creation of files or directories. Please refer to the following MSDN
documentation:

FileSystemWatcher Class
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystemiofilesystemwatcherclasstopic.asp

2. Please kindly note that FileSystemWatcher is just used to get
notifications of file/directory changes. If you want to intercept the file
manipulations and change their behavior, you may need to resort to API Hook
or even File System Filter Driver. Please take a look at following articles:

API Hook SDK
http://www.apihook.com/apihook/index.shtml

Installable File System (IFS) Kit
http://www.microsoft.com/whdc/ddk/ifskit/default.mspx

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top