Virtual Drive?
How do you create (in C/C++) a virtual drive like the windows98 startup disk does?
The startup disk uses RamDrive.sys to create a so called ram disk, a virtual disk which uses XMS memory to store the files. Since DOS and Windows systems aren''t laid out for hot swapping (that is adding and removing drives while the computer is running), you''ll have to install a special driver at startup that at least reserves the drive for itself.
Be warned that there is no standard C way for doing this and I don''t know of an API for creating simulated drives.
Afaik, you''ll have to create a device driver (as if you would write a driver for a special disk drive, ex. ZipDrive) in form of a .vxd (virtual device driver) that is registered and loaded at startup by windows. Perhaps you''ll find further informations in the MS knowledge base / MSDN. You may also want to download the Windows Driver Development Kit (DDK).
If it helps you, PGP 6.0.2 does exactly that. For each possible drive (A-Z), a driver is installed (which makes a long annoying list in the Device Manager coull get wen pressing [Win]+[Break]).
I''m sorry, but that''s all I know, just wanted to point you in the right direction...
If your target system is Linux, BeOS or something else, I cannot help you at all ;..(
-Markus-
Be warned that there is no standard C way for doing this and I don''t know of an API for creating simulated drives.
Afaik, you''ll have to create a device driver (as if you would write a driver for a special disk drive, ex. ZipDrive) in form of a .vxd (virtual device driver) that is registered and loaded at startup by windows. Perhaps you''ll find further informations in the MS knowledge base / MSDN. You may also want to download the Windows Driver Development Kit (DDK).
If it helps you, PGP 6.0.2 does exactly that. For each possible drive (A-Z), a driver is installed (which makes a long annoying list in the Device Manager coull get wen pressing [Win]+[Break]).
I''m sorry, but that''s all I know, just wanted to point you in the right direction...
If your target system is Linux, BeOS or something else, I cannot help you at all ;..(
-Markus-
Professional C++ and .NET developer trying to break into indie game development.
Follow my progress: http://blog.nuclex-games.com/ or Twitter - Topics: Ogre3D, Blender, game architecture tips & code snippets.
Follow my progress: http://blog.nuclex-games.com/ or Twitter - Topics: Ogre3D, Blender, game architecture tips & code snippets.
Holy smokes, that''s awful. Ok let me mention why I was thinking about using it and perhaps there a more simple fix. I''m using the loadimage function to pull in my bitmaps.
bit=(HBITMAP)
LoadImage(NULL,BitmapName,IMAGE_BITMAP, 0,0,LR_DEFAULTSIZE|LR_LOADFROMFILE);
I have a file that I created that stores all my bitmaps into one large file. I''m then extracting each file to a temp file and then loading up using loadimage.
So I was thinking it would be tons faster to extract those into a virtual drive (memory) instead of hitting the HD twice for each picture load (UGH).
Of course I could write my own "LoadImage" function, but I''m trying to avoid it.
bit=(HBITMAP)
LoadImage(NULL,BitmapName,IMAGE_BITMAP, 0,0,LR_DEFAULTSIZE|LR_LOADFROMFILE);
I have a file that I created that stores all my bitmaps into one large file. I''m then extracting each file to a temp file and then loading up using loadimage.
So I was thinking it would be tons faster to extract those into a virtual drive (memory) instead of hitting the HD twice for each picture load (UGH).
Of course I could write my own "LoadImage" function, but I''m trying to avoid it.
dude, you''re looking for a RAMdrive. There might be one at Tweakfiles.com or if it''s there, look on yahoo. Those things are really handy when you have 256MB of RAM, i had AOL on my ramdrive for a while, it loaded up pretty damn fast. one thing i was worried about was, when i turned the computer off, all the files would get deleted, but they didnt. An act of God? I''ll never know.
-Damnit Boy, have you been eating paint chips again?-Paint chips? Oh you mean "wall candy"?
Ya that''s the functionality I''m looking for, but I don''t want people to have to install another program just to use mine either, hehe. I was hoping a library or something existed that allowed an easy implimentation of a "RAMDrive" for C/C++, maybe something Microsoft had come out with...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement