拦截窗口打开文件 [英] Intercept windows open file

查看:246
本文介绍了拦截窗口打开文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图创建一个可以拦截文件打开过程的小程序。

I'm trying to make a small program that could intercept the open process of a file.

目的是当用户双击文件一个给定的文件夹,Windows会通知软件,然后它处理该请求并返回窗口的文件的数据。

The purpose is when an user double-click on a file in a given folder, windows would inform to the software, then it process that petition and return windows the data of the file.

也许会有另一个解决方案像监视打开邮件并强制Windows等待程序准备文件的内容。

Maybe there would be another solution like monitoring Open messages and force Windows to wait while the program prepare the contents of the file.

这个概念的一个应用程序,可以以透明的方式管理文件的解密用户。
在这种情况下,加密的文件将在磁盘上,当用户打开它(双击它或与一些应用程序,如记事本),后台进程将拦截该打开事件,解密文件并将该文件的内容提供给请求应用程序。

One application of this concept, could be to manage desencryption of a file in a transparent way to the user. In this context, the encrypted file would be on the disk and when the user open it ( with double-click on it or with some application such as notepad ), the background process would intercept that open event, desencrypt the file and give the contents of that file to the asking application.

这是一个有点奇怪的概念,它可能像中间人网络概念,而不是网络数据包。

It's a little bit strange concept, it could be like "Man In The Middle" network concept, but with files instead of network packets.

感谢您阅读。

推荐答案

最好的方法是通过文件系统过滤器驱动程序来覆盖从任何程序打开的所有情况。 a>。这对你的需求来说太复杂了。

The best way to do it to cover all cases of opening from any program would be via a file system filter driver. This may be too complex for your needs though.

这篇关于拦截窗口打开文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆