chi_luci
November 16th, 2004, 05:41 AM
How to create programmatically a RAM drive and access it? :eek:
| // JP opened flex table
Click to See Complete Forum and Search --> : RAM Drive chi_luci November 16th, 2004, 05:41 AM How to create programmatically a RAM drive and access it? :eek: And-or November 16th, 2004, 08:51 AM Here you will find all about it: http://support.microsoft.com/default.aspx?scid=kb;en-us;Q257405 Best Regards And-or chi_luci November 17th, 2004, 08:25 AM thanks, but how to install this driver automatically? And-or November 18th, 2004, 09:30 AM What do you mean by "automatically"? There is an inf file there, that should do it: Ramdisk.inf Installation file for installing the driver chi_luci November 18th, 2004, 05:36 PM what I mean I want to launch a program (.exe) that himself creates the RAM drive, write some files in it, ... then removes the RAM drive! And-or November 30th, 2004, 12:03 PM Why do you want to do this? If you want to store a file in memory, it would be easier to do this without ramdrive. First of all, ramdrive will create only virtual _device_ , that mimics the behaviour of real hard disk. Second, since content of the memory it uses is unknown at the time ramdrive is being created, you will have to create a partition and format it, so it could be recognized by a filesystem driver. Third, I don't know exactly, but I think you can't do all this without having to restart windows. And-or chi_luci December 1st, 2004, 02:24 AM All the scenario is for executing some apps without putting them to hard disk for security reasons. These apps will be linked like encrypted resources in a .exe loader. Only the loader must exist on hard drive. The resources are decrypted using a password that user must supply... my problem is after decrypting data, I only have an array of bytes in memory (which is an application in memory ). How I execute this without putiing it to any non-volatile memory? I thought a RAM-drive would be a good idea... And-or December 1st, 2004, 05:34 AM I don't understand one thing - why can't you just allocate some memory, using LocalAlloc (or something like that) and put your app there? The only thing you will have to do is to mark that memory blok as executable and execute it. To be honest I have never been doing such things, so I may be wrong :). But I think ramdrive isn't good choise for your app. Besides, when you install ramdrive, user will probably see "Windows has found new hardware" message and if you even successfully create partition and windows mount it, it will be available for everyone. So, it will not be very secure... And-or chi_luci December 1st, 2004, 05:48 AM The only thing you will have to do is to mark that memory blok as executable and execute it. And-or How? That's my bigest problem! codeguru.com
Copyright 2007 Jupitermedia Corporation All Rights Reserved. |