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
All Forums
► RAM Disk & RAM File System
► Current topic
RAM disk has DRIVE_FIXED drive type
|
RAM disk has DRIVE_FIXED drive type 20 June 2024, 06:01 |
Registered: 2 years ago Posts: 4 |
|
|
Re: RAM disk has DRIVE_FIXED drive type 20 June 2024, 14:55 |
Admin Registered: 20 years ago Posts: 2 106 |
Most RAM disk applications for Windows create disks of type DRIVE_FIXED instead of DRIVE_RAMDISK for several reasons:
I am afraid there is no direct way to verify if a specific drive letter is indeed a RAM disk or not.
- 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.
- 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.
- 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.
- 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.
- 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.
I am afraid there is no direct way to verify if a specific drive letter is indeed a RAM disk or not.