Hello to all FS men of wisdom,
I am on Vista SP2, AttachWhenLoaded = 1 is set for the Filter Manager and my
minifilter is being loaded at boot time.
I call
FltEnumerateVolumes(Filter, NULL, 0, &NumVolumes);
which returns 0 and NumVolumes is also 0. All of this happens in DriverEntry
at boot time. Is this a correct behaviour or some kind of a bug?
Regards,
Dmitry.
> which returns 0 and NumVolumes is also 0. All of this happens in DriverEntry
at boot time. Is this a correct behaviour or some kind of a bug?
Yes.
When DriverEntry of boot driver runs, there is no volumes yet.
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
Use IoRegisterBootDriverReinitialization and then FltEnumerateVolumes.
-pk
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Dmitry G
Sent: 2. srpna 2009 10:42
To: Windows File Systems Devs Interest List
Subject: [ntfsd] FltEnumerateVolumes question
Hello to all FS men of wisdom,
I am on Vista SP2, AttachWhenLoaded = 1 is set for the Filter Manager and my
minifilter is being loaded at boot time.
I call
FltEnumerateVolumes(Filter, NULL, 0, &NumVolumes);
which returns 0 and NumVolumes is also 0. All of this happens in DriverEntry
at boot time. Is this a correct behaviour or some kind of a bug?
Regards,
Dmitry.
NTFSD is sponsored by OSR
For our schedule of debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
Thanks for the quick answers. The problem I am trying to solve is the
following:
In the IRP_MJ_SHUTDOWN callback I am writing some data to the file
\Device\HarddiskVolume1\test
At boot time I am reading the data, but the file is not found and amazingly
(due to my limited knowledge, maybe) it sits under
\Device\HarddiskVolume2\test
Trying to solve this problem made me look for ways to write the data only to
the system volume which must be the same between reboots.
Why this strange behavior and what is is the best way to save
boot-persistent data?
Thanks!
“Dmitry G” wrote in message news:xxxxx@ntfsd…
> Hello to all FS men of wisdom,
>
> I am on Vista SP2, AttachWhenLoaded = 1 is set for the Filter Manager and
> my minifilter is being loaded at boot time.
>
> I call
>
> FltEnumerateVolumes(Filter, NULL, 0, &NumVolumes);
>
> which returns 0 and NumVolumes is also 0. All of this happens in
> DriverEntry at boot time. Is this a correct behaviour or some kind of a
> bug?
>
> Regards,
>
> Dmitry.
>
>
>
> At boot time I am reading the data, but the file is not found and amazingly
(due to my limited knowledge, maybe) it sits under
\Device\HarddiskVolume2\test
So what? \Device\HarddiskVolume%d numbers are not persistent across reboots.
the system volume which must be the same between reboots.
\SystemRoot\test
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
Maxim, thanks
The problem is \SystemRoot is not visible at boot time…
Thanks,
Dmitry
“Maxim S. Shatskih” wrote in message
news:xxxxx@ntfsd…
> At boot time I am reading the data, but the file is not found and
> amazingly
> (due to my limited knowledge, maybe) it sits under
>
> \Device\HarddiskVolume2\test
So what? \Device\HarddiskVolume%d numbers are not persistent across reboots.
> the system volume which must be the same between reboots.
\SystemRoot\test
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
In the boot driver’s DriverEntry, you have no ways of determining what the boot disk is.
IoGetBootDiskInformation works only from driver reinitialization callback.
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com
I am using your solution and I’ve moved my driver to the SYSTEM_START load
group.
Works fine now.
Regards, Dmitry.
“Maxim S. Shatskih” wrote in message
news:xxxxx@ntfsd…
In the boot driver’s DriverEntry, you have no ways of determining what
the boot disk is.
IoGetBootDiskInformation works only from driver reinitialization
callback.
–
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com