避免将文件从一个驱动器复制到另一个驱动器. [英] To avoid Copying a file from one Drive to another drive.

查看:131
本文介绍了避免将文件从一个驱动器复制到另一个驱动器.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好..

让我解释一下情况..

我有两个驱动器,主要是D-Drive和I-Removable Disk.通常,我们可以将文件从I盘复制到D盘.
我的问题是:是否可以避免将文件从I驱动器以编程方式(WIN32)复制到D驱动器. ?


谢谢..

Hi Everyone..

Let me explain the situation..

Am having two drives mainly D-Drive & I-Removable Disk. In normal suitation we can copy the files from I drive to D drive.
And my question is: Can it be done to avoid copying the files from I Drive to D drive Programmatically(WIN32). ?


Thank you..

推荐答案

嗨.
我希望知道的是将文件从I:驱动器复制到D:驱动器的方式.
如果您想通过资源管理器阻止复制,则有可能.
因为资源管理器使用Windows API函数复制文件.
因此您可以通过挂钩WINDOS API来实现它.

但是如果您想阻止所有复制方式.我认为这是不可能的.
因为许多程序不使用Windows API就从I:驱动器读取数据并将其写入D:驱动器.
首先,我们需要检测复制以阻止它.
但是以上述方式,当一个进程从I:驱动器读取数据时,我们如何知道该进程是否要将数据写入D:驱动器.

但是我们可以阻止对D:驱动器的所有写入,也可以阻止对I:
的所有读取. 可以解决您的问题吗?
Hi.
what I hope to know is which way you copy files from I: Drive to D: Drive.
If you want to block copying through explorer, it can be possible.
Because explorer uses Windows API function for copying files.
so you can implement it by hooking WINDOS API.

But if you want to block all the ways of copying. I think it is impossible.
because many programs read data from I: drive and write that to D: Drive without using Windows API.
First we need to detect the copying for blocking it.
but in above way, when one process read data from I: drive, how can we know if that process''s going to write that data to D: drive.

But we can block all writing to D: drive, or block all reading from I:
can this be solution for your problem?


这篇关于避免将文件从一个驱动器复制到另一个驱动器.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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