how to create/reg/access a virtual drive

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Iwan

    how to create/reg/access a virtual drive

    I have a speciffic task of which i do not know how to start on.

    The task is to create a virtual drive (like a ram drive og deamon tools).
    Through this drive files are to be saved and loaded like a normal drive, but
    the "files" are created runtime by my program. The idea is that the program
    accessing the drive can not tell the diffrence.

    Here is what i need:
    - How to register the drive with windows.
    - How to create a connection between the drive and my program.
    - Which drive operations to implement in my program.

    Thanks :)
    Jens


  • William Stacey

    #2
    Re: how to create/reg/access a virtual drive

    Interesting. This would depend on how "real" the drive needs to appear.
    Can it be something your application abstracts or it something other (i.e.
    not yours) applications would need to see as a windows device? If you can
    just abstract a device for your program, then one way I am thinking (if you
    want a RAM only abstraction) is derive a class from Stream. Inside your
    class, use an object[] or jagged byte array to hold each byte stream of
    files. Naturally, you would need a lot of ram for many files or big files.
    You could also use a backing store of a binary file to serialize your
    structure to disk inside your Stream. Then other programs or your program
    could use this just (kinda) like a file stream or memory stream with some
    added function. If you want a device that shows up in MyComputer, then I
    think you need to create a device driver using c/c++ and maybe even some
    assembler. Check out the device driver SDK for samples and ideas.

    --
    William Stacey, DNS MVP

    "Iwan" <jijRemoveThiz@ esenet.dk> wrote in message
    news:uEdfnZSiDH A.1860@tk2msftn gp13.phx.gbl...[color=blue]
    > I have a speciffic task of which i do not know how to start on.
    >
    > The task is to create a virtual drive (like a ram drive og deamon tools).
    > Through this drive files are to be saved and loaded like a normal drive,[/color]
    but[color=blue]
    > the "files" are created runtime by my program. The idea is that the[/color]
    program[color=blue]
    > accessing the drive can not tell the diffrence.
    >
    > Here is what i need:
    > - How to register the drive with windows.
    > - How to create a connection between the drive and my program.
    > - Which drive operations to implement in my program.
    >
    > Thanks :)
    > Jens
    >
    >[/color]


    Comment

    Working...