Option 1 has always worked for me.
Try to issue IOCTL_MOUNTMGR_QUERY_POINTS inside PNP_START’s completion
handler.
Off course, you would need to fill in ioctl’s in-buf etc correctly (so
as to avoid status_invalid_parameter)
Harish
-----Original Message-----
From: Girish Aithal [mailto:xxxxx@hotmail.com]
Sent: Tuesday, December 29, 2009 2:47 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Query on IOCTL_MOUNTDEV_LINK_CREATED
Probably this was a bug in XP fixed in 2003 and later.
Thanks Maxim.
In such a case, is there any way where a volume upper filter driver can
get
to know the drive letter/GUID associated with the volume? I am trying to
filter the write requests being issued to the volume that my application
is
interested in. I have tried the following approaches so far but have not
been successful.
Option 1:
a. Issue IOCTL_MOUNTDEV_QUERY_UNIQUE_ID to the lower device object
in
the volume stack (the one on which I am layered over) as part of the
IRP_MN_START_DEVICE
b. Once the unique id is obtained, issue IOCTL_MOUNTMGR_QUERY_POINTS
upon the first IRP_MJ_WRITE to the volume to query the symbolic name and
device name.
Result: I am able to query the unique id, but
IOCTL_MOUNTMGR_QUERY_POINTS always fails with STATUS_INVALID_PARAMETER
Option 2:
a. Capture the symbolic name and device name by interpreting the
data
that is part of IOCTL_MOUNTDEV_LINK_CREATED from within the driver.
Result: This method works on Windows Server 2003, but I do not see
the
IOCTL being issued to the volume stack on Windows XP.
Any help here would be appreciated.
Regards,
Girish.
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars 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