EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Yet another question about file handles and context

Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages
#37025
Posted: 06/17/2016 10:24:18
by Dennis  (Premium support level)
Joined: 10/20/2015
Posts: 20

Hi,
Some app (actually Excel) simultaneously opens file multiple times both for read and write. I have to execute some action then closing file handle which was previously open for WRITE. Context is shared by multiple requests to specific file (by the way what about multiple users?) so it's not an option. Keeping count of FileOpen - FileClose hits gives a huge overhead given how many times Excel opens specific file for read and how long it keeps handles. It would be really ideal to be able to access current handle from callbacks in order to restore specific OpenFile - CloseHandle chain. May be I miss some option to achieve something like that? Please advice.
Thanks,
Denis
#37237
Posted: 07/12/2016 08:48:43
by Vladimir Cherniga (EldoS Corp.)

Sorry for the long delay with answer.
Unfortunately, per-handle context is not supported by the CallbackFilter, so it is not possible to control handles by the order they obtained. Moreover, user handle is not valid in other than user process context. There is also may be a problem detecting writes to the file, as it may be opened with different flags that may cause a truncate, supersede, append, delete, "delete on close", that will modify the file.

Reply

Statistics

Topic viewed 1062 times

Number of guests: 1, 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!