Guest:
Register
|
Login
|
Member List
|
Search
|
Statistics
|
FAQ
Language
----------
Simplifed Chinese
Traditional Chinese
English
CnPack Forum
»
CnVCL 组件包
» CnFileSystemWatcher问题
‹‹ Last Thread
|
Next Thread ››
Poll
Trade
Reward
Activity
Printable Version
|
Email to Friend
|
Subscription
|
Favorites
Subject: CnFileSystemWatcher问题
toysun
新警察
UID 41468
Digest Posts 0
Credits 10
Posts 3
点点分 10
Reading Access 10
Registered 2008-12-15
Status Offline
#1
Post at 2009-3-23 11:31
Profile
|
Blog
|
P.M.
CnFileSystemWatcher问题
1.4和1.5版本的CnFileSystemWatcher.pas
默认启动监视后,无法修改c:\目录文件名,以下为提示信息
---------------------------
重命名文件或文件夹时出错
---------------------------
无法重命名 ***(文件名) : 文件正在被另一个人或程序使用。
关闭任何可能使用这个文件的程序,重新试一次。
---------------------------
确定
---------------------------
相关代码
procedure TForm1.CnFileSystemWatcher1Change(FileOperation: TFileOperation;
const FileName1, FileName2: String);
begin
caption:=filename1;
end;
[
本帖最后由 toysun 于 2009-3-23 11:39 编辑
]
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#2
Post at 2009-3-23 13:41
Profile
|
Blog
|
P.M.
请问您的操作系统以及IDE版本?
toysun
新警察
UID 41468
Digest Posts 0
Credits 10
Posts 3
点点分 10
Reading Access 10
Registered 2008-12-15
Status Offline
#3
Post at 2009-3-23 15:34
Profile
|
Blog
|
P.M.
IDE : delphi7
OS : xp sp2/sp3 ,win2003 sp2
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#4
Post at 2009-3-23 17:09
Profile
|
Blog
|
P.M.
感谢报告,此问题能复现。问题出自286行附近的Share Mode参数上,应该改成:
TempHandle := CreateFile(PChar(FDirectory), GENERIC_READ,
FILE_SHARE_READ or FILE_SHARE_WRITE or FILE_SHARE_DELETE,
nil, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS
or FILE_FLAG_OVERLAPPED, 0);
我们的修改今晚将提交CVS。
Poll
Trade
Reward
Activity
CnPack Forum
CnPack English Forum
> CnWizards IDE Wizards
> CVSTracNT
> Announcements & Others
All times are GMT++8, the time now is 2024-11-22 18:40
Powered by
Discuz!
5.0.0
© 2001-2006
Comsenz Inc.
Processed in 0.008562 second(s), 9 queries , Gzip enabled
TOP
Clear Cookies
-
Contact Us
-
CnPack Website
-
Archiver
-
WAP
Member's CP Home
Edit Profile
Credits Transaction
Public User Groups
Buddy List
Main
Page Views
User Agents
Posts History
Top Forums
Top Threads
Post Ranking
Credit Ranking
Online Time
Team
Moderation Stats