Here is the idea. Essentially I want to know when a VPN client is trying to open certain media types (mp3, wmv, etc) and instead of opening them on the server-side machine, stream them to the VPN client. So how can I know when a file is trying to be opened? This seems like a Win32 Hook to me, but after some reading it seems as though there is no hook into the filesystem. What is the standard way to do this??
Thanks!
Stephen
Loading
StephenPosted Aug 17, 2008, 6:56 PM
AlanPosted Aug 17, 2008, 1:00 PM
StephenPosted Aug 16, 2008, 7:58 PM
I have one last question though. Since delving into these filters is a little more than I had originally wanted to do, is it possible to edit the context menu in the following way? What I'm envisioning is this:
When a user right clicks one of the media types, under the file menu would be "Stream this file", which would stream the file rather than open it in the standard fashion. I know how to edit Explorer's context menus, so that isn't a problem. But how can I know whether the right-click request is coming from the VPN or a normal user?
Thanks!!!
AlanPosted Aug 16, 2008, 7:38 PM
Well, it's possible to intercept file system requests by attaching filter device objects, as this is the method used by the file monitoring utility FileMon on NT systems:
http://technet.microsoft.com/en-us/sysinternals/bb896642.aspx
However, you'd need to write your own file system filter driver to do this so it's not something that could be done from C#.
StephenPosted Aug 16, 2008, 12:53 PM
If someone can think of a different design to do the same thing let me know as I would be very interested in hearing about it!
AlanPosted Aug 16, 2008, 7:54 AM
Check out the FileSystemWatcher class:
http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx