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. get hard drive size.

get hard drive size.

Scheduled Pinned Locked Moved C / C++ / MFC
jsonquestion
3 Posts 3 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.
  • M Offline
    M Offline
    Madan Chauhan
    wrote on last edited by
    #1

    Hi, In my application I need to get the complete Hard Drive size. I am using Windows 2000. Is there any API to get the size of hard drive in win2000? I don't want to use WMI class (win32_DiskDrive). Thanks in advance.

    _ D 2 Replies Last reply
    0
    • M Madan Chauhan

      Hi, In my application I need to get the complete Hard Drive size. I am using Windows 2000. Is there any API to get the size of hard drive in win2000? I don't want to use WMI class (win32_DiskDrive). Thanks in advance.

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      IOCTL_DISK_GET_DRIVE_GEOMETRY is another way to do it. The API to use here is DeviceIoControl. From Windows XP onwards you can use IOCTL_DISK_GET_DRIVE_GEOMETRY_EX to directly get the disk size.

      «_Superman_»

      1 Reply Last reply
      0
      • M Madan Chauhan

        Hi, In my application I need to get the complete Hard Drive size. I am using Windows 2000. Is there any API to get the size of hard drive in win2000? I don't want to use WMI class (win32_DiskDrive). Thanks in advance.

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

        Madan Chauhan wrote:

        Is there any API to get the size of hard drive in win2000?

        Such as this?

        "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

        "The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch

        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