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. how to get drive list without using COM?

how to get drive list without using COM?

Scheduled Pinned Locked Moved C / C++ / MFC
comhelptutorialquestion
6 Posts 4 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.
  • L Offline
    L Offline
    Le rner
    wrote on last edited by
    #1

    hi all, can anybody help me to get physical drive list and details without using the COM. thanks.

    S L D 4 Replies Last reply
    0
    • L Le rner

      hi all, can anybody help me to get physical drive list and details without using the COM. thanks.

      S Offline
      S Offline
      Santhosh G_
      wrote on last edited by
      #2

      Please use GetLogicalDriveStrings() or GetLogicalDrives().

      1 Reply Last reply
      0
      • L Le rner

        hi all, can anybody help me to get physical drive list and details without using the COM. thanks.

        S Offline
        S Offline
        Santhosh G_
        wrote on last edited by
        #3

        Please use GetLogicalDriveStrings() or GetLogicalDrives(). GetDriveType() can be used to get details of the drive. GetDiskFreeSpace() can be used to retreive information about the specified disk, including the amount of free space on the disk.

        L 1 Reply Last reply
        0
        • S Santhosh G_

          Please use GetLogicalDriveStrings() or GetLogicalDrives(). GetDriveType() can be used to get details of the drive. GetDiskFreeSpace() can be used to retreive information about the specified disk, including the amount of free space on the disk.

          L Offline
          L Offline
          Le rner
          wrote on last edited by
          #4

          i want to get list of physical drives not the Logical Drives...

          1 Reply Last reply
          0
          • L Le rner

            hi all, can anybody help me to get physical drive list and details without using the COM. thanks.

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            GetLogicalDrives() enumerates all mounted disk partitions, not physical drives. You can enumerate the drive letters with (or without) GetLogicalDrives, then call QueryDosDevice() to find out which physical drive the letter is mapped to. Alternatively, you can decode the information in the registry at HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices stackoverflow answer.

            1 Reply Last reply
            0
            • L Le rner

              hi all, can anybody help me to get physical drive list and details without using the COM. thanks.

              D Offline
              D Offline
              David Crow
              wrote on last edited by
              #6

              Have you considered DeviceIoControl(IOCTL_DISK_GET_PARTITION_INFO)?

              "One man's wage rise is another man's price increase." - Harold Wilson

              "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

              "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

              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