RAM disk has DRIVE_FIXED drive type

Started by Fred

RAM disk has DRIVE_FIXED drive type   20 June 2024, 06:01

I use GetDriveType in my program to do automatic redirection, documented here. I expected it to return 6, which means DRIVE_RAMDISK, but what I get is 3, which means DRIVE_FIXED, which I obviously didn't expect.
I don't know why, but I suppose it has something to do with how the disk is created. What should I use to verify that R:\ is indeed a RAM disk? I use C++.
SoftPerfect Support forum - Andrew avatar image

Re: RAM disk has DRIVE_FIXED drive type   20 June 2024, 14:55

Most RAM disk applications for Windows create disks of type DRIVE_FIXED instead of DRIVE_RAMDISK for several reasons:
  1. Compatibility: Many applications and system processes expect fixed disks (DRIVE_FIXED) and may not function correctly or may not recognise RAM disks (DRIVE_RAMDISK). By using DRIVE_FIXED, RAM disk applications ensure broader compatibility with the software that might not be designed to interact with RAM disks specifically.
  2. File System Features: Fixed disks are expected to support the full range of NTFS features, such as compression, encryption, and file permissions. RAM disks marked as DRIVE_FIXED can leverage these features, providing a more consistent and feature-rich experience.
  3. Disk Management: Some disk management tools and utilities may not support or correctly identify DRIVE_RAMDISK types. By using DRIVE_FIXED, RAM disk applications can ensure that the disks are recognised and managed correctly by these tools.
  4. Backup and Restore: Backup software and other utilities often treat DRIVE_FIXED differently from other types of drives. By presenting RAM disks as DRIVE_FIXED, these applications ensure they are included in backup sets and can be restored if necessary.
  5. System Integration: Various system services and drivers expect fixed disks and may not function properly with other drive types. Ensuring the RAM disk is recognised as a fixed disk helps integrate it more seamlessly into the system.
Overall, the decision to present RAM disks as DRIVE_FIXED is primarily driven by the need for compatibility, feature support, and integration with existing software and system components.

I am afraid there is no direct way to verify if a specific drive letter is indeed a RAM disk or not.

Reply to this topic

Sometimes you can find a solution faster if you try the forum search, have a look at the knowledge base, or check the software user manual to see if your question has already been answered.

Our forum rules are simple:

  • Be polite.
  • Do not spam.
  • Write in English. If possible, check your spelling and grammar.

Author:

Email:

Subject

A brief and informative title for your message, approximately 4–8 words:

     

Spam prevention: please enter the following code in the input field below.

 **     **  ********  **     **  ********  **     ** 
 **     **     **     ***   ***     **     **     ** 
 **     **     **     **** ****     **     **     ** 
 **     **     **     ** *** **     **     ********* 
 **     **     **     **     **     **     **     ** 
 **     **     **     **     **     **     **     ** 
  *******      **     **     **     **     **     ** 

Message: