I need to intercept when the system tries to access to a file, and do something before it happens.
Check http://easyhook.codeplex.com/, it provides you directly from c# c++ like dll method overwritting.