检测Windows资源管理器复制操作资源管理器、操作、Windows

2023-09-02 20:49:31 作者:墨迹

有什么方法来检测,只要复制操作启动Windows资源管理器。

Is there any way to detect whenever a copy operation starts in Windows Explorer.

有点像在SuperCopier: SuperCopier网站

kind of like in SuperCopier : SuperCopier Website ?

和登录参与行动的文件吗?而这样的?

and log files involved in the operation ? and such ?

我已经通过Supercopier code浏览,我无法找到其中涉及检测复制操作,因为我不是流体德尔福的部分。

I've browsed through Supercopier code and I can't find the part which deals with detecting the copy operation, as I'm not fluid in Delphi.

PS:看来他们使用的是外壳扩展......当然,虽然不是

P.S : it seems they are using a Shell Extension ...not sure though.

推荐答案

是的,你可以。

您必须实现一个外壳扩展这也在< A HREF =htt​​p://msdn.microsoft.com/en-us/library/cc144063%28VS.85%29.aspx>勾文件复制操作。有很多关于如何做这些C ++的东西(使用本机的Win32 API),并使用C#或其他.NET框架语言的例子。我敢肯定,你可以用Delphi太多,但我不知道参与制作的Win32 API调用的细节。

You have to implement a shell extension which has to hook the file copy operation. There are plenty of examples of how to do these things in C++ (using the native Win32 API) and also using C# or other .NET framework languages. I'm sure you can use Delphi too but I don't know the details involved in making the Win32 API calls..

下面是一篇文章,其中详细介绍了实现一个简单的shell扩展在C#中的。

Here's an article which details the implementation of a simple shell extension in C#.

当然,你也可能想看看Windows文件I / O过滤器,虽然他们只让你的观察的文件操作,如创建,复制,更改或删除。在.NET中创建一个文件I / O过滤器是微不足道的使用System.IO.FileSystemWatcher类,如果​​你想要的是来的检测和登录的这样的文件复制操作也可能是所有你需要做的。

Of course, you may also want to take a look at windows file I/O filters, although they only allow you to observe file operations such as creating, copying, changing or deleting. In .NET creating a file I/O filter is trivial using the System.IO.FileSystemWatcher class and if all you want is to detect and log such file copy operations it may be all you need to do.

注意如果您决定实施一个外壳扩展在C#中,你应该知道,它只会工作,在.NET框架已经安装了操作系统(你用来创建的版本扩展名) - 虽然现在大多数人至少有.NET 1.1和2.0。

NOTE If you decide to implement a shell extension in C#, you should know that it will only work on operating systems where the .NET framework has been installed (the version that you used to create the extension) - although most people now have at least .NET 1.1, and 2.0..

 
精彩推荐
图片推荐