Question about file hook

I have following task,

Program which I develop is container, that can load any assembly(that wasn't written by me) and calls contract method Run(), and executes some code in assembly. So this assembly which was loaded can work with hard drive, and It can work with files. I need to scan all requests for files from my container assembly.

for example:

1) Assembly which a loaded requested some file on drive (using classFileStream or some other way)

2) I caught this request in my assembly container and suspend it, I checked my Data Base for this file by file name and checked if file really exits in my db, than I writer it to to the path to which assembly which i loaded requested it.

3) I "release" request and assembly which I loaded reads file as it was always there on the disk.

Is it possible? and how can i achieve this?

Thanks in advance

[1246 byte] By [MyP3uK] at [2008-1-7]
# 1
I would believe that one would need to route the plugin's file requests through your main process, such as a proxy. Change the interface to run the requests through the process so your checks can be performed.
OmegaMan at 2007-10-2 > top of Msdn Tech,Visual C#,Visual C# General...
# 2
Thats the reason that I can't change interface to run the requests trough.
That's way I am asking if it possible somehow to do this staff? maybe some system file hook or something Sad
MyP3uK at 2007-10-2 > top of Msdn Tech,Visual C#,Visual C# General...