Hello ,
I have a doubt regarding ramdisk sample from microsoft.
It doesn’t support formatting. The disk is not visible in the disk management.
I tried to register with mount manager using MOUNTDEV_MOUNTED_DEVICE_GUID. But IOCTLS like IOCTL_MOUNTDEV_QUERY_UNIQUE_ID and IOCTL_MOUNTDEV_QUERY_SUGGESTED_LINK_NAME are not being called. only IOCTL_MOUNTDEV_QUERY_DEVICE_NAME is being called.
what should i do to get the remaining two ioctls called by the mount manager?
any working solution or guidance is appreciable.
I’ve been working on that, more or less, for weeks now and haven’t had good results. The behavior varies greatly between OS versions. You can get drive letter assignment working with some combination of IoCreateSymbolicLink, DefineDosDevice, and sending IOCTLs IOCTL_MOUNTMGR_VOLUME_ARRIVAL_NOTIFICATION and IOCTL_MOUNTMGR_CREATE_POINT. Once you can get a drive letter, you may be able to quickformat if you answer IOCTLs that come back at you properly. Nothing I do seems to allow me to format on Vista though - I do not know what the secret sauce is there.
It becomes apparent that every virtual disk application that you can find online programatically performs it’s own format in FAT.
I’d like to add by saying thanks to Microsoft for creating KMDF to relieve the world of the pain of some of the more tedious tasks that a driver writer need perform. Perhaps in the next version you could add something to somehow make something as reasonable and common as a virtual disk require less than an act of god to work across operating system versions that are still commonly installed around the world.