Dear all,
I have a Virtual Cdrom Driver, it can emulate an ISO file on network
drive as a Cdrom.It works well on Win2k/WinXp/Win2003. I need to port
it to Windows Vista, but it can't work well.
In this driver, I use DO_DIRECT_IO as I/O flags, use
MmGetSystemAddressForMdl( Irp->MdlAddress) to get current Mdl Address,
and use ZwReadFile to read data from Virtual Cdrom. I also use
MmGetMdlByteCount(Irp->MdlAddress) to get the length of system
assigned buffer for Mdl.
On Win2k/Xp/2003, ZwReadFile can be executed normally. For the first 3
executed times for ZwReadFile, the length of Mdl buffer is 2k, from
the 4th time of executed ZwReadFile, the length of Mdl buffer is 4k.
But on Vista, ZwReadFile can be only executed 3 times, the length of
Mdl buffer is also 2k for these 3 times. For the 4th executed times of
ZwReadFile, the Mdl buffer is 32k, ZwReadFile is blocked and can't be
executed anymore. Also the driver is blocked.
Can anyone give me a hint for this issue? Any help will be
appreciated!
Brs,
David