EldoS | Feel safer!

Software components for data protection, secure storage and transfer

GetVolumeSize => Enlarge maximum size?

Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.
#22623
Posted: 11/23/2012 07:10:46
by Julian  (Basic support level)
Joined: 11/23/2012
Posts: 1

Hello :-)


i'm actually trying to configure an Mounter-example by editing the GetVolumeSize-callback-method. The original code looks like the following:

Code
void CbFsGetVolumeSize(
   CallbackFileSystem* Sender,
   __int64* TotalNumberOfSectors,
   __int64* NumberOfFreeSectors
    )
{
    MEMORYSTATUS status;
    GlobalMemoryStatus(&status);

    *TotalNumberOfSectors = status.dwTotalVirtual / g_CbFs.GetSectorSize();
    *NumberOfFreeSectors  = (status.dwTotalVirtual - CalculateFolderSize(g_DiskContext) + g_CbFs.GetSectorSize()/2) / g_CbFs.GetSectorSize();
}


Now i'm trying to implement a functionality so that the size of the mounted volume does never end. E.g.:

Code
if (*NumberOfFreeSectors < *TotalNumberOfSectors/2){//enlarge maximum size}


Could there be any problems? What would be the best way for implementation?


Thanks for your support! :-)


Regards,
Julian
#22626
Posted: 11/23/2012 10:59:45
by Volodymyr Zinin (Team)

You idea should work. But it's better to check it. CallbackFS does nothing extra with the storage size. It just passes the result returned from the GetVolumeSize callback to the system.

Reply

Statistics

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