掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
ファイル操作(コピーや、作成、書き換え)を監視する方法 (ID:69920)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
ReadDirectoryChangesW では、あまりに多数のファイルを監視しようとすると、漏れるファイルが出てくる、というのはよく聞く話ですが、MSDN で確かな根拠を探せませんでした。 http://msdn.microsoft.com/en-us/library/aa365465.aspx には、 > When you first call ReadDirectoryChangesW, the system allocates a buffer to store change information. This buffer is associated with the directory handle until it is closed and its size does not change during its lifetime. Directory changes that occur between calls to this function are added to the buffer and then returned with the next call. If the buffer overflows, the entire contents of the buffer are discarded and the lpBytesReturned parameter contains zero. とありますが、これは、バッファサイズさえ十分ならばよく、変更間隔は失敗理由にならないように見えます。 とはいえ、あらかじめファイル数や変更頻度がある程度絞れなければ、バッファサイズをどの程度確保すればよいかわからないわけですが。 フィルタドライバは、アンチウィルスソフトなど、セキュリティのため確実に検出する必要がある用途に使われています。
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.