Hi all,
I have a disk filter driver (UpperFilter). Is there a way to find out if I am loading on a boot disk/system disk?
Thanks.
–Peter Trinh.
Hi all,
I have a disk filter driver (UpperFilter). Is there a way to find out if I am loading on a boot disk/system disk?
Thanks.
–Peter Trinh.
This will do it…
if(DeviceObject->Vpb && (DeviceObject->Vpb->RealDevice->Flags &
DO_SYSTEM_BOOT_PARTITION))
–
Mark Cariddi
Consulting Associate
OSR, Open Systems Resources, Inc.
http://www.osr.com/
“Peter Trinh” wrote in message
news:xxxxx@ntdev…
> Hi all,
>
> I have a disk filter driver (UpperFilter). Is there a way to find out if I
> am loading on a boot disk/system disk?
>
> Thanks.
> --Peter Trinh.
>
>
>
Why would it be the DeviceObject->Vpb->RealDevice->Flags and not just
DeviceObject->Flags given the ntddk.h has the following line for
DeviceObjects->Flags:
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mark Cariddi
Sent: Wednesday, March 23, 2005 9:37 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] How to know if boot drive?
This will do it…
if(DeviceObject->Vpb && (DeviceObject->Vpb->RealDevice->Flags &
DO_SYSTEM_BOOT_PARTITION))
–
Mark Cariddi
Consulting Associate
OSR, Open Systems Resources, Inc.
http://www.osr.com/
“Peter Trinh” wrote in message
news:xxxxx@ntdev…
> Hi all,
>
> I have a disk filter driver (UpperFilter). Is there a way to find out
if I
> am loading on a boot disk/system disk?
>
> Thanks.
> --Peter Trinh.
>
>
>
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@intel.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Darn fingers hit the wrong key…
The NTDDK comment for DeviceObject->Flags says “// See above: DO_…”
Thanks, MKE.
-----Original Message-----
From: Eschmann, Michael K
Sent: Wednesday, March 23, 2005 10:05 AM
To: ‘Windows System Software Devs Interest List’
Subject: RE: [ntdev] How to know if boot drive?
Why would it be the DeviceObject->Vpb->RealDevice->Flags and not just
DeviceObject->Flags given the ntddk.h has the following line for
DeviceObjects->Flags:
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mark Cariddi
Sent: Wednesday, March 23, 2005 9:37 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] How to know if boot drive?
This will do it…
if(DeviceObject->Vpb && (DeviceObject->Vpb->RealDevice->Flags &
DO_SYSTEM_BOOT_PARTITION))
–
Mark Cariddi
Consulting Associate
OSR, Open Systems Resources, Inc.
http://www.osr.com/
“Peter Trinh” wrote in message
news:xxxxx@ntdev…
> Hi all,
>
> I have a disk filter driver (UpperFilter). Is there a way to find out
if I
> am loading on a boot disk/system disk?
>
> Thanks.
> --Peter Trinh.
>
>
>
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@intel.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Note that this will only work after the volume mount, which takes place
quite a long ways into the boot process. So that first test for a non-null
Vpb is rather critical :-).
=====================
Mark Roddy
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mark Cariddi
Sent: Wednesday, March 23, 2005 12:37 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] How to know if boot drive?
This will do it…
if(DeviceObject->Vpb && (DeviceObject->Vpb->RealDevice->Flags &
DO_SYSTEM_BOOT_PARTITION))
–
Mark Cariddi
Consulting Associate
OSR, Open Systems Resources, Inc.
http://www.osr.com/
“Peter Trinh” wrote in message
news:xxxxx@ntdev…
> Hi all,
>
> I have a disk filter driver (UpperFilter). Is there a way to find out if I
> am loading on a boot disk/system disk?
>
> Thanks.
> --Peter Trinh.
>
>
>
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Thanks.
I am planning to do it during boot, somewhere in my StartDevice routine. Don’t know if it’s legal, though.
From: “Roddy, Mark”
> Date: 2005/03/23 Wed AM 11:55:09 PST
> To: “Windows System Software Devs Interest List”
> Subject: RE: [ntdev] How to know if boot drive?
>
> Note that this will only work after the volume mount, which takes place
> quite a long ways into the boot process. So that first test for a non-null
> Vpb is rather critical :-).
>
>
>
> =====================
> Mark Roddy
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Mark Cariddi
> Sent: Wednesday, March 23, 2005 12:37 PM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] How to know if boot drive?
>
>
>
> This will do it…
>
> if(DeviceObject->Vpb && (DeviceObject->Vpb->RealDevice->Flags &
> DO_SYSTEM_BOOT_PARTITION))
>
>
> –
> Mark Cariddi
> Consulting Associate
> OSR, Open Systems Resources, Inc.
> http://www.osr.com/
> “Peter Trinh” wrote in message
> news:xxxxx@ntdev…
> > Hi all,
> >
> > I have a disk filter driver (UpperFilter). Is there a way to find out if I
>
> > am loading on a boot disk/system disk?
> >
> > Thanks.
> > --Peter Trinh.
> >
> >
> >
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@stratus.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@verizon.net
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>