Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Retrieving drive letter using drive device path

Retrieving drive letter using drive device path

Scheduled Pinned Locked Moved C / C++ / MFC
csharpvisual-studiohelptutorialquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tufkap
    wrote on last edited by
    #1

    Hi, I am looking for information on how to retrieve a drive's drive letter given the drive's device path (eg: \\?\ide#diskibm-dtla-307030_________________________tx4oa50c#5&230d196c&0&0.0.0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}. I get the device path by registering for device notifications for the GUID_DEVINTERFACE_DISK class and processing the DEV_BROADCAST_DEVICEINTERFACE structure received as part of the notifications. I tried to do this by matching the device type and device number retrieved by sending IOCTL_STORAGE_GET_DEVICE_NUMBER to all drives on the system, but this method seems to fail if there is a RAM drive on the system. I get multiple drives with the same device type and number. Is this expected behaviour? Is there a more reliable and simpler way to do this? Any help is greatly appreciated. Thanks, Priya

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups