EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Creating mounted disk in memory

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
#6532
Posted: 06/09/2008 14:32:43
by Eugene Mayevski (EldoS Corp.)

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
#6601
Posted: 06/12/2008 07:18:26
by Eugene Mayevski (EldoS Corp.)

Please use the attached sample for C++.


[ Download ]

Sincerely yours
Eugene Mayevski
#6615
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!

Warren
#6616
Posted: 06/13/2008 04:47:30
by Eugene Mayevski (EldoS Corp.)

Quote
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
#6621
Posted: 06/13/2008 14:17:23
by Warner Ardelt (Basic support level)
Joined: 05/22/2008
Posts: 10

Eugene,

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.

#6622
Posted: 06/13/2008 14:36:58
by Eugene Mayevski (EldoS Corp.)

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
#6627
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.
#31190
Posted: 10/29/2014 15:27:28
by Joe Small (Basic support level)
Joined: 10/29/2014
Posts: 1

Hi,

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

Thanks, Joe

joseph.r.small@boeing.com
#31193
Posted: 10/30/2014 00:47:45
by Eugene Mayevski (EldoS Corp.)

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
Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages

Reply

Statistics

Topic viewed 22254 times

Number of guests: 2, 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!