c++ builder > fileIO > error > This process cannot access the file because it is being used by another process.


動作確認
C++ Builder XE4
Windows 7 pro

ファイル書込み処理を繰り返すソフトを長期運用しているときに以下のエラーが出た。

This process cannot access the file because it is being used by another process.

以下を見つけた。
http://codeverge.com/embarcadero.delphi.general/the-process-cannot-access-the-file/1070027

1) Antivirus, indexers, icon handlers and anything else that monitors files or supplies info to explorer about them (column handlers etc) You've got an unfortunate file extension there in that it's the same as a html doc type and windows indexer will try and read it as such

SaveToFile()でなくSaveToStream()を使えという回答もある。