How to find out mapping between Mount Points and disk?

If we have Device Object for a disk, is it possible to get all Mount Points from
that disk?

How to use IOCTL_MOUNTMGR_QUERY_POINTS for this?

Thanks & Regards,
Pratima

Yes, no, maybe. Define the problem and I can tell you if you can get what
you need. I have seen it return ‘all’, but I have also seen some names that
are not returned. However you can query with a name you have from a create
IRP and then find the real device name of the volume.

wrote in message news:xxxxx@ntdev…
> If we have Device Object for a disk, is it possible to get all Mount
> Points from
> that disk?
>
> How to use IOCTL_MOUNTMGR_QUERY_POINTS for this?
>
> Thanks & Regards,
> Pratima
>
>
>

Here is the problem:

I have registered my driver for disk drive’s Plug&Play Notification by calling IoRegisterPlugPlayNotification. Inside Notification Callback, I want to check if this disk already contain any mounted volume.

All I have with me now is SymbolicName from NotificationStructure.

Can we utilize IOCTL_MOUNTMGR_QUERY_POINTS over here?

Thanks,
Pratima

You are at the wrong level for getting volume information. Disks know nothing directly about volumes or volume mount points, those are abstractions at a higher level. You can map volumes to disks, and from that mapping and from querying the mountpoints of the volume derive ‘mountpoints on a disk’. This is readily done from user mode using standard Win32 apis.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-274233-
xxxxx@lists.osr.com] On Behalf Of xxxxx@hotmail.com
Sent: Thursday, December 28, 2006 4:16 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] How to find out mapping between Mount Points and
disk?

Here is the problem:

I have registered my driver for disk drive’s Plug&Play Notification by
calling IoRegisterPlugPlayNotification. Inside Notification Callback, I
want to check if this disk already contain any mounted volume.

All I have with me now is SymbolicName from NotificationStructure.

Can we utilize IOCTL_MOUNTMGR_QUERY_POINTS over here?

Thanks,
Pratima


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer