none
How Get U disk capacity ? RRS feed

  • Question

  • When connected to the usb system based on the registry DiskDrive from the bottom up, set up the device stack each loading disk filter driver, and my disk filter equipment is located on the Pdo, Fdo, namely LowerFilters set in.
    When entering my device DriverObject - > DriverExtension - > AddDevice at DiskPerfAddDevice; Function, I think to get  U disk capacity at this moment in the function , Please tell me how to go to get, send which type of IRP to the capacity of query? thank you
    Tuesday, February 11, 2014 1:38 AM

Answers

  • Use IoGetPartitionTable or IoGetPartitionTableEx then total up the used and unused space.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Tuesday, February 11, 2014 2:11 AM

All replies

  • Use IoGetPartitionTable or IoGetPartitionTableEx then total up the used and unused space.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Tuesday, February 11, 2014 2:11 AM
  • The problem I am such a solution yesterday, because each access a USB device will build a stack, ordinary Udisk I skip the SRC device, and the special one I will not to skip the SRC equipment, I was passed by windbg manual testing, is now a process of automatic identification, I want to through the capacity to identify common U disk or special USB flash drive. Thank you for give me advice before ~
    Tuesday, February 11, 2014 2:29 AM
  • I didn't find IoGetPartitionTable or IoGetPartitionTableEx, only found the IoReadPartitionTableEx, but it always fail or BlueScreenofDeath after I used 
    Tuesday, February 11, 2014 3:11 AM