EldoS | Feel safer!

Software components for data protection, secure storage and transfer

CallbackMode FormatFixedSize (SolFS.hpp)

Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.
Posted: 08/24/2012 05:46:14
by steve j. (Basic support level)
Joined: 08/14/2012
Posts: 6

I want to format storage.
Code step by step
SolFSStorage * st = new SolFSStorage()
...setting the properties...
In callback mode after opening existing file:
CreateFile (...OpenExisting...) i get valid handle to the file
the SolFSSetFileSizeFnc(UserData,FHandle,NewSize) is called.
How to set Size of storage to newSize?
I called StorageSetFileSizeLong(FHandle,NewSize) but I've got error :Access violation reading location ....
How can I set correctly size to storage?

Same problem with StorageSetStorageSize.

Thanks for help
Posted: 08/24/2012 12:27:49
by Eugene Mayevski (EldoS Corp.)

You have some custom container and you need to set its size. Why would you need to call StorageSetFileSizeLong? You need to resize the container, this is the operation external to SolFS. In your particular case call SetEndOfFile Windows function to resize the container.

Sincerely yours
Eugene Mayevski
Posted: 08/27/2012 02:49:27
by Alexander Plas (EldoS Corp.)

Moved to HelpDesk



Topic viewed 1671 times



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!