I am using the KMDF Ramdisk driver from the WDK as a tool to explore a non-StorPort based driver for a disk device. I?m running into a lot of problems getting the virtual drive working either because I haven?t located the documentation on what exactly I need to do in my driver or because it?s not documented at all. I tracked down all the IOCTLs that I?m being sent, and I?ve supported them as best I can with the sketchy documentation (in some cases) from the WDK, but things still aren?t working.
Although I?ve got a number of issues related to device and symbolic link names, the driver works well enough to get the virtual drive appearing as a disk in device manager, and I can initialize the disk. However, when I attempt to format the drive, DiskMgmt.msc hangs waiting for me to do something. I receive and complete several IOCTLs including:
IOCTL_DISK_IS_CLUSTERED
IOCTL_DISK_GET_DISK_ATTRIBUTES
IOCTL_DISK_IS_WRITABLE
IRP_MJ_WRITE (512 bytes to offset 0x10000)
IOCTL_DISK_SET_DRIVE_LAYOUT_EX
IOCTL_DISK_GET_DRIVE_LAYOUT_EX
I?ve tried creating a child PDO for the new partition, and I exposed a device interface for the child PDO with GUID_DEVINTERFACE_PARTITION. Device manager is actually showing a disk, but disk.sys isn?t loading (Code 31). For the purposes of my experiment if disk.sys is the same disk class driver that?s in the WDK, I?d prefer not to have it load on top of me because I don?t want to translate a bunch of SRB?s.
Anyway, I feel like I?ve gotten way off track with the driver (and this message), so here are my questions:
- Does anyone here know where I can find better documentation that will give me a clue on what DiskMgr.msc is waiting for me to do?
- Is it even possible to manage a disk with DiskMgr.msc without getting disk.sys and partmgr.sys to load on top of my device?
Thanks in advance for any advice or help given.