EldoS | Feel safer!

Software components for data protection, secure storage and transfer

CallAllOpenCloseCallbacks=false stops the CbFsHandleInfo data

Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.
#26781
Posted: 10/10/2013 13:24:15
by Simon Coghlan (Standard support level)
Joined: 12/06/2011
Posts: 19

Visual Studio 2010 (+SP1)
Windows 7 x64 (+SP1)
CBFS V4.0.136.25

In the OpenFile callback, I place data (The processID) into the CbFsHandleInfo.
If CallAllOpenCloseCallbacks = true,
Then EnumerateDirectory has (Which went through OpenFile) the processID as expected.

If CallAllOpenCloseCallbacks is set to false,
Then EnumerateDirectory has this value as Null (i.e. storing zero)

I have it set to a single thread in the pool, and subsequent calls to EnumerateDirectory have the "Reset" value after detecting it being zero.

Is this expected ?
Should the documentation be changed to state that have the setting to false means that CbFsHandleInfo structure is no longer viable ?
Or have I identified a "Bug" ?
#26784
Posted: 10/10/2013 13:48:21
by Volodymyr Zinin (EldoS Corp.)

In the case CallAllOpenCloseCallbacks is false the CbFsHandleInfo context doesn't matter. In order to distinguish different folder enumerations use the CbFsDirectoryEnumerationInfo context.
#26790
Posted: 10/11/2013 03:43:34
by Simon Coghlan (Standard support level)
Joined: 12/06/2011
Posts: 19

Thanks for the response,
Unfortunately, this is the first call to EnumerateDirectory, and I am expecting the information that i have stored in the CbFsHandleInfo to be kept. (In my case the processID / UserID)
This will then determine what can be enumerated (Access rights etc), in the initial call (Or if the Restart flag is set).

Does the documentation need to be updated to state that when "CallAllOpenCloseCallbacks is false" the CbFsHandleInfo is Useless?
If that is the case, should the GetProcessID be called in every callback ? (This is recommended not to be done in the existing documentation !!)
#26797
Posted: 10/11/2013 04:16:33
by Eugene Mayevski (EldoS Corp.)

In your particular scenario GetOriginatorProcessID should be called if you don't have relevant information stored in available parameters (HandleInfo, EnumerationInfo ... ).

Quote
Simon Coghlan wrote:
Does the documentation need to be updated to state that when "CallAllOpenCloseCallbacks is false" the CbFsHandleInfo is Useless?


Yes, we will update it somehow. But as mentioned, most likely we will just move to having CallAllOpenCloseCallbacks always true.

Quote
Simon Coghlan wrote:
If that is the case, should the GetProcessID be called in every callback ? (This is recommended not to be done in the existing documentation !!)


Right, calling GetOriginator* functions in every callback is useless and sometimes won't work (in case of OnReadFile/OnWriteFile). But in yor scenario it's necessary sometimes. Remember of ALL (every) and ANY (sometimes) quantifiers in logic.


Sincerely yours
Eugene Mayevski

Reply

Statistics

Topic viewed 945 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!