EldoS | Feel safer!

Software components for data protection, secure storage and transfer

CallbackMode FormatFixedSize (SolFS.hpp)

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 (Team)

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 (Team)

Moved to HelpDesk



Topic viewed 2610 times

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


Back to top

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

Got it!