Thread: RAM Disk
View Single Post
  #3  
Old 01-05-2006, 02:35 AM
Detlev Dreyer
 
Posts: n/a
Default Re: RAM Disk

anthony_arnold@newsgroups.nospam wrote:

> I have noticed that Windows XP and 2003 come with a RAM Disk driver. I
> have installed the Windows RAM Disk Controller and the Windows RAM Disk
> Device (Volume) but I don't seem to have created a RAM disk.


Same here. Although I managed to setup that specific RAM Disk, it
vanished at next reboot.

> I have looked at KB257405 which gives the Windows 2000 sample RAM Disk
> driver and used these registry settings with no sucess.


No problem here. Excerpt from that article:
http://support.microsoft.com/kb/257405

| Windows XP Update:
|
| Installing the Ramdisk sample driver in a NTFS only machine might make
| it unusable. To resolve this problem make the following change:
|
| While you call the IoCreateDevice function (RamdiskAddDevice function
| in pnp.c), change the device type from FILE_DEVICE_VIRTUAL_DISK to
| FILE_DEVICE_DISK and recompile the driver. After you install the
| driver, restart the system in order to access the Ramdisk through
| Explorer.

When following this advice, all System Restore points disappear while
Windows is trying to create the folder "Recycled" on that FAT drive.
Therefore, the MSKB content manager had been advised to incorporate
this addendum (excerpt):

| Warning Installing Ramdisk in Windows XP may render the System Restore
| feature useless.

I changed that particular code in PNP.C in order to create a RAM Disk
appearing as a *removable* media (w/o recycle bin):

status = IoCreateDevice(
DriverObject,
sizeof(DEVICE_EXTENSION),
&uniDeviceName,
FILE_DEVICE_DISK,
FILE_REMOVABLE_MEDIA|FILE_DEVICE_SECURE_OPEN,
FALSE,
&functionDeviceObject
);

After recompiling that driver, it works perfectly. Also, you can assign
the drive letter B: after this change which is unused in most cases.
Although that RAM Disk size is limited to 32 MB by default, it's good
enough to keep the Browser's temporary Internet Files (IE, Netscape,
Firefox) as well as the Printer spooler directory for instance.

--
d-d
Reply With Quote