EldoS | Feel safer!

Software components for data protection, secure storage and transfer

File in use error

Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.
#5564
Posted: 03/23/2008 10:53:15
by Dan Cooper (Basic support level)
Joined: 06/27/2007
Posts: 125

I sometimes get an error when trying to delete files/folders from a CBFS volume which says the file is in use by another person or program without calling either the Delete() or CanFileBeDeleted() callbacks. I have installed 'Unlocker' which says the process which has the file open is 'System'. I would like to know how it is determined that the file is in use and why the System process would have the file open (it never seems to close the file). I have only seen this problem on the CBFS volume and not on normal disks so is this possibly a problem in CBFS?

Thanks.
#5565
Posted: 03/23/2008 10:59:47
by Eugene Mayevski (EldoS Corp.)

Cache Manager holds a reference to the file.
Try calling ReleaseUnusedFiles() before deleting the file.


Sincerely yours
Eugene Mayevski
#5566
Posted: 03/23/2008 11:01:20
by Dan Cooper (Basic support level)
Joined: 06/27/2007
Posts: 125

Thanks for the quick reply. How would I call ReleaseUnusedFiles() before the delete? My CanFileBeDeleted and DeleteFile callbacks are never called.

#5567
Posted: 03/23/2008 11:17:52
by Eugene Mayevski (EldoS Corp.)

Documentation is confusing in the aspect of when ReleaseUnusedFiles may be called, but IIRC you must refrain from calling ReleaseUnusedFiles() from callbacks, but you may call this method from your code before deletion of the files.

We will re-check the description of the method.


Sincerely yours
Eugene Mayevski
#5568
Posted: 03/23/2008 11:19:16
by Dan Cooper (Basic support level)
Joined: 06/27/2007
Posts: 125

My question is how do I know the file is going to be deleted if there are no callbacks called to indicate the file will be deleted?
#5569
Posted: 03/23/2008 11:25:06
by Eugene Mayevski (EldoS Corp.)

Documentation is not confusing after all, and I do remember correctly.


Sincerely yours
Eugene Mayevski
#5570
Posted: 03/23/2008 11:28:45
by Dan Cooper (Basic support level)
Joined: 06/27/2007
Posts: 125

My point is if I am trying to delete a file in Explorer and my callbacks are not called how would I know to call ReleaseUnusedFiles()? A file delete could be attempted at any time in Explorer so it is not feasible to have ReleaseUnusedFiles() called on a timer or similar.
#5571
Posted: 03/23/2008 11:33:40
by Eugene Mayevski (EldoS Corp.)

Now I see.

Then you can set AllowDelayedClose property to false. I am not sure if it's functionality applies to cache manager or only to CBFS driver, but setting it to False definitely won't hurt.


Sincerely yours
Eugene Mayevski
#5572
Posted: 03/23/2008 11:35:25
by Dan Cooper (Basic support level)
Joined: 06/27/2007
Posts: 125

AllowDelayedClose is already set to false.
#5573
Posted: 03/23/2008 11:53:59
by Dan Cooper (Basic support level)
Joined: 06/27/2007
Posts: 125

How does the system determine that the file is in use? Does the information come from a CBFS callback? Maybe I am reporting incorrectly that the file is in use? If I delete the file from a command prompt all works as expected and the file is deleted.
Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.

Reply

Statistics

Topic viewed 10359 times

Number of guests: 3, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!