[Bug] ImDisk doesn't support all FS operations

Started by fixer, June 09, 2017, 12:22:57 PM

Previous topic - Next topic

fixer

If your software works with FS and exhibits strange behavior in conjunction with ImDisk, this note is for you.

I wouldn't consider it a bug, more likely a feature. From documentation:
ImDisk Virtual Disk Driver is designed to be a small, simple and yet powerful virtual disk driver. It runs on very old versions of Windows NT as well as modern Windows versions. However, because of this compatibility design and because it emulates disk volumes rather than complete disks, it is not always compatible with all applications and drivers. For instance, you cannot manage things like mount points, drive letters and similar for ImDisk drives using mountvol command line tool or in Disk Management in Windows. As another example, you cannot create or access shadow copies on ImDisk drives. So, applications that use similar Windows features as Disk Management dialog to enumerate disks and disk volumes to find disk properties like sector sizes and similar, might possibly not work as expected with ImDisk drives.

Looks like its driver is quite limited in capabilities. It's a file system driver, so it emulates file system access. But it doesn't support all the queries the standard driver supports. For example GetFinalPathNameByHandle API flag FILE_NAME_NORMALIZED isn't handled at all. And FILE_NAME_OPENED flag only supports VOLUME_NAME_NT flag, but filename returned isn't accepted by CreateFile. Or QueryFullProcessImageName with 0 flag is supposed to return Win32 path format, but it returns native system path format. Actually I wasn't able to make it return Win32 path format at all. Possible solution is to rely on native system path format and manually convert it into Win32 path format.

At the time of writing this issue isn't fixed.