Obtaining GUID for a volume

Hi,
I have a volume filter driver (upper filter) which layers on all the available volumes on a system (Windows 2003/XP). As part of the driver functionality, the driver traps the Read/Write requests for some specific volumes (input by a user mode application) for processing. In this context, I was looking for a mechanism which provides me the GUID for the volume (to be verified against the application provided GUID). Can you please let me know if there is an API for the same? Would issuing IOCTL_MOUNTDEV_QUERY_UNIQUE_ID to the PDO created by the FTDisk driver return the volume GUID?

Regards,
Girish.

  1. query_unique_id (to get binary unique id) after the volume has
    started(stack below you has successfully processed pnp_start_device). If
    you try it in add_device, you will see success from LDM volumes but not
    from FtDIsk owned volumes. That is why it is safe to do this after
    pnp_start_device.
  2. Use the binary unique id as a key to query mount manager for guid.

Harish

-----Original Message-----
From: xxxxx@hotmail.com [mailto:xxxxx@hotmail.com]
Sent: Thursday, August 27, 2009 2:01 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Obtaining GUID for a volume

Hi,
I have a volume filter driver (upper filter) which layers on all the
available volumes on a system (Windows 2003/XP). As part of the driver
functionality, the driver traps the Read/Write requests for some
specific volumes (input by a user mode application) for processing. In
this context, I was looking for a mechanism which provides me the GUID
for the volume (to be verified against the application provided GUID).
Can you please let me know if there is an API for the same? Would
issuing IOCTL_MOUNTDEV_QUERY_UNIQUE_ID to the PDO created by the FTDisk
driver return the volume GUID?

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