HI, all
I have a filter driver, which is installed before any file system loads.
Now i need to find the file system device object, belonging to e.g.
C:. It is clear, that I cannot get the device object in the moment when
my filter installs.
Well, I create a worker thread, which (once per 0.5 sec) will try to get
the device object. When succeeds, it will end.
But a problem is that I wouln’t like to use ZwCreateFile for opening
the root directory of the drive (at least until the drive is mounted).
Is it possible to achieve it any other way ?
E.g. using symbolic links ?
Or is it possible to find that the volume is already mounted ?
And another question : Does anyone know what object type I retrieve
when I call this ?
ObReferenceObjectByHandle(SymbolicLinkObjectHandle,
FILE_READ_DATA,
NULL,
KernelMode,
&Object,
NULL)
(It’s not a driver object, not a device object, not a file object.)
Thank you
L.