又一高难度的问题!

zyb 2000-01-07 04:01:00
如何用DELPHI编程实现: 将硬盘上的某个目录下的所有文件禁止拷贝、删除、移动?
-----若答案有效,我会奉上分数大大的!
...全文
1055 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
jiangbo 2000-01-20
  • 打赏
  • 举报
回复
当你在对文件操作得时候,读写...
Windows 是拒绝访问得.
OK ?
GB
000120
wjyu 2000-01-11
  • 打赏
  • 举报
回复
delphi的demo的shellext中有copyhook的例子,其中这样写到:
// You need to merge the CopyHook.reg file into the registry so that this shell
// extension starts to work. This CopyHook shell extension will alert you everytime
// you try to delete, move or rename a directory in the Explorer.
不知是否满足你的需求
olo 2000-01-11
  • 打赏
  • 举报
回复
ICopyHook可以截获目录拷贝,删除,移动,更名。
很好使,只是现在还不支持文件。:^(
zyb 2000-01-11
  • 打赏
  • 举报
回复
如何截取WINDOWS的改变目录消息?
另外我是说除了禁止访问还要防止目录文件的删除!
barton 2000-01-07
  • 打赏
  • 举报
回复
?
hirong 2000-01-07
  • 打赏
  • 举报
回复
楼上的Firing_Sky说的对,我曾经就这么整过一个人,因为他总是玩小游戏,结果我禁止了这个文件夹后,他以为计算机出了什么问题,主动把游戏删了。
jiangtao 2000-01-07
  • 打赏
  • 举报
回复
我这里有FileMon的源程序,你需要可以问我要,
不过这个问题只有10分.......

The heart of Filemon is in the virtual device driver, Filevxd.vxd. It is dynamically loaded, and in its initialization it installs a file system filter via
the VxD service, IFSMGR_InstallFileSystemApiHook, to insert itself onto the call chain of all file system requests.

When Filemon sees an open, create or close call, it updates an internal hash table that serves as the mapping between internal file handles
and file path names. Whenever it sees calls that are handle based, it looks up the handle in the hash table to obtain the full name for
display. If a handle-based access references a file opened before Filemon started, Filemon will fail to find the mapping in it hash table and
will simply present the handle's value instead.

Information on accesses is dumped into an ASCII buffer that is periodically copied up to the GUI for it to print in its listbox
Firing_Sky 2000-01-07
  • 打赏
  • 举报
回复
这样的问题怎么分数只有10分?
我做过一个东东,是使用截获Windows的改变当前目录的消息来实现禁止访问文件夹的,不知你是否接受这个方法?
huzi 2000-01-07
  • 打赏
  • 举报
回复
你的问题在Novell环境下已经实现:利用Novell系统的一个工具,好象是:FIX.EXE。
该程序针对可执行文件,处理好后,目标程序可以执行,但不能进行复制、改名等操作。

在某期《中国计算机报》/《计算机世界》11/12月(记不清了)的1篇文章,介绍了一些所谓
的Vxd病毒的实现方法,其实是让自己的程序运行在0环,里面涉及到汇编,VC。你可以找找看。我认为,如果这篇文章成立的话,可以写一段程序,让它运行在系统的0环,接管文件系统,过滤对指定目录信息的各种操作。

这样做法与病毒无异,后果是可能被杀毒、病毒检测软件干扰。
lighttop 2000-01-07
  • 打赏
  • 举报
回复
我无法解决这个问题, 但有些思路:
首先得编写个Vxd之类的东西, 接管所有的文件读写操作, 然后判断是否是在操作受保护的目录,如是则返回错误. 难点在于如何从WINDOWS接管文件管理.

有一个行不通的笨办法(我想想而已):
把要"保护" 的子目录下的所有文件通通用排外方式打开 . 这样别的程序就不能删除它了可能也无法去读它.

5,386

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧