I’m writing an upper volume filter driver, which will attach itself to all
volume devices in the system. I’m testing on a Windows 2000 server as well
as Windows 2003, with the same result.
My DriverEntry() is simple. It sets up a dispatch routine for all the
MajorFunctions, sets up the AddDevice and DriverUnload pointers, then
returns STATUS_SUCCESS.
The AddDevice is straightforward as well; it simply creates an unnamed
device (using the device type of the top device in the stack, which is
FILE_DEVICE_DISK), attaches this new device to the DeviceObject passed in,
sets up its DeviceExtension, copies the DO_DIRECT_IO, DO_BUFFERED_IO, and
DO_POWER_PAGABLE flags from the next-lower device on the stack, clears the
DO_DEVICE_INITIALIZING flag, and returns STATUS_SUCCESS.
I trace through and see that my driver attaches itself to each of the
partitions on Disk0, as I’d expect. But something goes wrong when the
system tries to boot (the boot files are on Partition 2 in this case). I
get an INACCESSIBLE_BOOT_DEVICE error - apparently IopMarkBootPartition was
not able to get to the device. I see that the ArcName that it’s trying to
use is \ArcName\multi(0)disk(0)rdisk(0)partition(2). If I disable my
driver, I can use DevView to see that this ArcName is symbolically linked to
Harddisk0\Partition2.
Any ideas what might be causing this failure? Thanks!
Ernie
I found the problem - I wasn’t handling PNP IRP’s correctly.
Ernie
“Ernie Coskrey” wrote in message
news:xxxxx@ntdev…
>
> I’m writing an upper volume filter driver, which will attach itself to all
> volume devices in the system. I’m testing on a Windows 2000 server as
well
> as Windows 2003, with the same result.
>
> My DriverEntry() is simple. It sets up a dispatch routine for all the
> MajorFunctions, sets up the AddDevice and DriverUnload pointers, then
> returns STATUS_SUCCESS.
>
> The AddDevice is straightforward as well; it simply creates an unnamed
> device (using the device type of the top device in the stack, which is
> FILE_DEVICE_DISK), attaches this new device to the DeviceObject passed in,
> sets up its DeviceExtension, copies the DO_DIRECT_IO, DO_BUFFERED_IO, and
> DO_POWER_PAGABLE flags from the next-lower device on the stack, clears the
> DO_DEVICE_INITIALIZING flag, and returns STATUS_SUCCESS.
>
> I trace through and see that my driver attaches itself to each of the
> partitions on Disk0, as I’d expect. But something goes wrong when the
> system tries to boot (the boot files are on Partition 2 in this case). I
> get an INACCESSIBLE_BOOT_DEVICE error - apparently IopMarkBootPartition
was
> not able to get to the device. I see that the ArcName that it’s trying to
> use is \ArcName\multi(0)disk(0)rdisk(0)partition(2). If I disable my
> driver, I can use DevView to see that this ArcName is symbolically linked
to
> Harddisk0\Partition2.
>
> Any ideas what might be causing this failure? Thanks!
>
> Ernie
>
>
>
>