EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Creating mounted disk in memory

Posted: 06/09/2008 14:32:43
by Eugene Mayevski (Team)

In memory quick format really makes a little sense as an operation in RAM is qute fast. As for the file - this depends on the file size. As I understand, complete formatting of the disk is not necessary if you have a virtual disk. Complete formatting is used to either erase the disk or to check the surface in order to mark bad blocks.

Sincerely yours
Eugene Mayevski
Posted: 06/12/2008 07:18:26
by Eugene Mayevski (Team)

Please use the attached sample for C++.

[ Download ]

Sincerely yours
Eugene Mayevski
Posted: 06/12/2008 17:51:31
by Warner Ardelt (Basic support level)
Joined: 05/22/2008
Posts: 10

Wow, what a surprise! When I said I can't wait till July, I meant it as an expression of enthusiasm not of urgency :). Anyway I have tested the new sample and it works well. I noticed that I could only format with FAT, but that's fine.

So looking at the sample code, I see there was no need for .NET Framework [MemoryStream class not req., instead Win32 memmove()], as well using VC6 - yeah!!

For me "the trick" was in the 'CallbackSupportStruct' struct, using a buffer pointer (incl. buflen) instead of a file handle. This seems obvious now, but I was stuck thinking about a handle since the old sample used it everywhere. Other differences I noticed were, allocating memory in OnCBDiskInsertMedia, and finally using memmove(), keeping track of the buffer pointer when reading and writing (CallbackRead/CallbackWrite), also no need for AddCallbackListItem.

So now I still need to do some testing using this new sample as a basis to create a hidden mem disk and see how that works, and then a couple other things. Once again Thank You for the excellent support!

Posted: 06/13/2008 04:47:30
by Eugene Mayevski (Team)

Warner Ardelt wrote:
Anyway I have tested the new sample and it works well. I noticed that I could only format with FAT, but that's fine.

What problems did you have with NTFS? The default size of 1024 Kb is too small for NTFS. You can try setting to max.value of 64Mb. This should work.

Sincerely yours
Eugene Mayevski
Posted: 06/13/2008 14:17:23
by Warner Ardelt (Basic support level)
Joined: 05/22/2008
Posts: 10


When formatting a memory CallbackDisk...

I tried 64Mb and less, (and edited the sample code to accomadate) 128Mb up to my max of 512Mb but still couldn't format NTFS without the following error: "Windows was unable to complete format"

[I'm running WinXP + (SP3 final)]

I could format FAT32 from 64Mb and beyond.

No probs formating with FAT16.

Posted: 06/13/2008 14:36:58
by Eugene Mayevski (Team)

Hmm. We will investigate this immediately. There was some problem with this related to I don't remember what :), but not our bug. So we just need to recall, what caused the problem.

Sincerely yours
Eugene Mayevski
Posted: 06/14/2008 21:09:08
by Warner Ardelt (Basic support level)
Joined: 05/22/2008
Posts: 10

I was also thinking it might be my motherboard, I mean the RAM it supports. I have an older one which only supports the more expensive RAM (RDRAM - so expanding my memory is to expensive - waiting to upgrade to a new motherboard in the future), actually I only have 256MB of RAM (I lied above about my max memory), so when I tried the 512MB memory disk it crapped out when formatting FAT32 - just wanted to see what would happen :). So this is the only thing I can think of for the NTFS formatting error. I did make some changes to the demo sample code, to automatically create, mount and size a virtual disk (using the dialog only for unmounting/exiting.
Posted: 10/29/2014 15:27:28
by Joe Small (Basic support level)
Joined: 10/29/2014
Posts: 1


I would like to try some CallBackDisk Sample applications. Where can I find them?

Thanks, Joe

Posted: 10/30/2014 00:47:45
by Eugene Mayevski (Team)

Samples are in <CallbackDisk>\Samples folder after you install CallbackDisk .

Please follow "one topic - one question" rule and create new topics (or helpdesk tickets) for unrelated questions.

Sincerely yours
Eugene Mayevski



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