EldoS | Feel safer!

Software components for data protection, secure storage and transfer

CreateNonCbFile and dwShareMode

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.
#32572
Posted: 03/10/2015 09:50:00
by Jonathan Blum (Basic support level)
Joined: 08/26/2014
Posts: 3

Hi all --

I'm trying to have a virtual file write data to an (encrypted) file elsewhere using CreateNonCbFile. My prototype is heavily based on the C# sample code -- the CreateNonCbFile call creates the handle in the EncryptContext constructor (which is called from PostCreateFile and PostOpenFile callbacks; as far as I'm aware that should be legal), it has GENERIC_READ and GENERIC_WRITE permissions, and the handle is closed in the EncryptContext.Dispose() function. So far so good.

The main problem seems to be that the file handles are interfering with Dropbox. Dropbox times out while trying to sync the encrypted file to its server -- my best guess is that it can't get a handle because the handle used in CreateNonCbFile is exclusive in some way.

But since CreateNonCbFile doesn't have an equivalent of CreateFile's dwShareMode... is there any other way to allow shared access to a CreateNonCbFile handle?
#32573
Posted: 03/10/2015 10:16:27
by Vladimir Cherniga (EldoS Corp.)

Quote
Jonathan Blum wrote:
ut since CreateNonCbFile doesn't have an equivalent of CreateFile's dwShareMode... is there any other way to allow shared access to a CreateNonCbFile handle?

ShareMode is set to the maximum share access mode in CreateNonCbFile implementation. You should check that timeout is not a result of timeout in CallbackFilter callback handlers. It may be caused by a recursive call in callbacks, etc. ProcMon(sysinternals.com) utility may come in handy finding the source of the problem.

Reply

Statistics

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