[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 611
  • Last Modified:

Implementing a virtual disk

I want to make a virtual disk that has a set of extra functions specially designed for an application that i want to / am going to make.

I have not yet explored the windows API for documentation on this kind of work.

I'd like some professional advice, and an overview of the interface that i need to implement.


thanks

classmate
0
classmate
Asked:
classmate
  • 7
  • 5
  • 2
  • +3
3 Solutions
 
robert_marquardtCommented:
A virtual disk cannot be made without the help of a driver. A driver cannot be written with Delphi.
I think the free Daemon tools should help you along. I do not know if source code is available, but at least you should be able to find more information.
0
 
GwenaCommented:
Tell us how much and what sort of data needs to be stored on this disk.

If your needs are not too great then I may have a solution.
Maybe all you need is a data file that you can save,delete,replace and retrieve items from by name :-)
0
 
new_xCommented:
Hi all there, Gwena I want to hear your solution
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
GwenaCommented:
Hi new_x :-)

On my website is a simple demo...   http://www.geocities.com/gacarpenter386/datafiles.zip
(you may need to right-click the link and choose 'save target as' to download)

It shows how to store strings and numbers into an external datafile by giving the data variable names.
Of course you can store,delete,alter,replace anything at all and not just numbers and strings.
If the datafile became really large this method might become cumbersome... but several MB should work
fine...just test it out with the amount of data you anticipate using and see if anything blows up :-)

There is a compiled demo exe inside the zip along with full source.

Here is the readme from this old demo :-)

------------------------------------------------------------
This demo shows how to create a data file and store
numbers and strings into it.

You store the data using variable names and you can
alter the data stored under a name by saving new data
over it.

Numbers are stored as strings in the data file...this
makes looking at the data files easy as you can read the
values in a text editor. Conversions are easily made
to/from string and numerical using the delphi functions

IntToStr(x);
StrToInt(S);

FloatToStr(X);
StrToFloat(S);

You are not limited to storing text or numbers... any data
can be stored and retrieved just as easily...images,exe files
...anything. Code is included in ExeMod to handle any data
that needs to be in a stream for easy use...like a jpg.

There are other routines that make handling the data file
much like a dir on a hd... getting a listing of the variable
names in a data file, the size of the data elements and
the number of elements is easy.


To run the demo the first thing you need to do is create
a data file to hold your data... I chose to name the file
MyData.dat and to place it in the dir where the exe resides.
You can of course create any number of files and store them
anywhere on disk.
(you can also append the data to existing files like dll's
or exe files..even the running exe if you wish)

To create MyData.dat just click the button [Create MyData.dat]

Now you can choose some variable names and some strings/numbers
to store in MyData.dat under those names... you can then simply
click [Display string] or [Display number] to display the values.

-----------
This demo uses my ExeMod.pas unit becuse I have a lot of useful
data and file handling code in this unit... you can if you wish
pull out the routines and use them without the unit or simply
include the unit in any program you write (it is freeware for all uses)

I have disabled the CD handling code in the included version of ExeMod
since for these purposes it is not useful.
0
 
classmateAuthor Commented:
Gwena:
>Maybe all you need is a data file that you can save,delete,replace and retrieve items from by name :-)

Nope ;-)


Paulb1989:
>http://www.appcontrols.com/manuals/diskcontrols/index.html?tdcvirtualdrives.htm

This link shows how to link a disk drive to a directory.
What i want is to make a disk that is independent of all existing file structures. Its purpose is to communicate with another system, giving the operating system a disk-like interface to the other system.


robert_marquardt:
>I think the free Daemon tools should help you along.
you wouldn't know where to begin to look for theese tools? is it microsoft, borland, something else?



0
 
robert_marquardtCommented:
Entering "Daemon tools" gives you all the links you need.

From the explanation above you want to implement a network file system.
Not the easiest thing to do and not without Windows 2003 DDK and programming in C.

It is not clear what you realyl want to do though.
I am not sure if your design decision is correct. Tell more about the other system.
0
 
classmateAuthor Commented:
>Entering "Daemon tools" gives you all the links you need.
Yes, but where do i find "Daemon tools" in the first place? Delphi? (i use D7) Microsoft's homepage? Windows accessories/control panel? Borland's Homepage? Experts-Exchange?

The design idea is related to handling special multi-user file access for special kinds of file based applications. The files will actually be stored in a specially designed database, but will have a outward interface like a disk with directories.

The design decision is "correct" since the idea as whole is based upon this way of doing it.


0
 
robert_marquardtCommented:
Sorry, Google. It is of course not a Delphi program though.

You may get away wiith implementing a virtual folder like "My Documents" (which only happens to be a real folder also).
AFAIK this is a Explorer/shell extension.
0
 
classmateAuthor Commented:
"Daemon tools" seems to have been using the desired approach to their solution. I couldn't find any source code though.

"virtual folders" : There is a chance that this will work, but i am not sure. It will have to be tested.

Still there will be a lot of implementation to do. Do you know how to write a shell extension in delphi? Above all, is it possible?

0
 
paulb1989Commented:
0
 
classmateAuthor Commented:
Unfortunately one of the most interesting applications cannot relate to virtual folders. Folder names will always be converted to real folder names. So there has to be a virtual disk for this to work.



0
 
odissey1Commented:
To Classmate,

This is what I found for myself (Super Cache II by SuperSpeed.com):
http://www.superspeed.com/desktop/supercache.php

Regards,
odissey1
0
 
classmateAuthor Commented:
Hi odissey1,

Seems like a nice solution for speeding up regular file management, but unfortunately not applicable in this case.

What i want is to create a new, reliable concept of teamworking by extending functionality in the file management mechanisms.

Actually i want a database (like interbase/firebird, MS SQL server, etc) to handle the actual, internal storage (not visible to users). This is because of reliable transaction mechanisms and multi user features. The virtual disk drive is just supposed to map disk access to a underlying system, that in turn accesses a database system for reading and writing.


0
 
robert_marquardtCommented:
Sounds idiotic. At least the idea to use a file system access as interface.
This is either WinFS which even MS failed on or something Subversion nicely handles already.
0
 
classmateAuthor Commented:
hi robert marquardt

The idea of using file system access, is to "fool" user applications to write data directly into a system that includes (among other things) user defined / user managed version handling. It could perhaps be defined like a team source development project say in MS SourceSafe, except that the files should be written directly into the handling system when files are saved in the development tool. And also be read directly from the system when loaded, of course.
The version handling tools would probably function differently from the Sourcesafe solution, though.

The basic idea is however to create a general teamwork tool that is as easy to MANAGE as possible. At first it has to be a multipurpose solution, but then different versions could eventually aim at different needs, different kinds of teams and different applications.



Subversion is a system or something i know nothing about - does it cover theese needs you think?



0
 
robert_marquardtCommented:
I do not think that this can be solved much simpler than WinFS. It definitely needs to write file system drivers.
Subversion is a CVS which means it handles versioning of files with the help of a SQL database.

My impression is that you try to do things the wrong way and on the wrong OS.
It is much simpler to implement a virtual file system on Linux.

I doubt that you understand what the tasks of a teamwork solution really are.
Maybe you should have a look at TortoiseSVN (http://tortoisesvn.tigris.org/). It is a Subversion client which integrates in the Windows Explorer.
0
 
classmateAuthor Commented:
robert_marquardt :


> i doubt that you understand what the tasks of a teamwork solution really are

I understand some but not all. I know there are nice working solutions on the market, serving huge projects in practice.

My object is to learn on the way. The task of writing a device driver could be a nice challenge since I never have done that before. Discovering if it could be used in the way outlined could also become a nice experience. And for all anyone knows, it could become a nice solution sometime in a far future, but that secondary to the experience process i will gain while trying.

I suspect that it would cost me disproportionate amount of money to get able to dig in to some of the advanced systems. I will try to take a closer look at those you've mentioned. All teamwork that i've been involved in has after all made use of simple tools with limited functionality.

Seems like the object of this q is a learning process after all ;-)

Hang on for more comments, you could earn points as i get wiser


0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 7
  • 5
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now