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 the total sectors of physical disk

How to get the total sectors of physical disk

Scheduled Pinned Locked Moved C / C++ / MFC
adobetutorialquestion
4 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.
  • A Offline
    A Offline
    Anonymous
    wrote on last edited by
    #1

    The USB flash disk have no CHS parameters (the system use virtual parameters),I only need to get teh total sectors,how to do it? Thanks.

    J 1 Reply Last reply
    0
    • A Anonymous

      The USB flash disk have no CHS parameters (the system use virtual parameters),I only need to get teh total sectors,how to do it? Thanks.

      J Offline
      J Offline
      Jose Lamas Rios
      wrote on last edited by
      #2

      Anonymous wrote: The USB flash disk have no CHS parameters (the system use virtual parameters),I only need to get teh total sectors,how to do it? Thanks. Would calling GetDiskFreeSpace[^] and then computing TotalNumberOfClusters * SectorsPerCluster do the trick? -- jlr http://jlamas.blogspot.com/[^]

      T B 2 Replies Last reply
      0
      • J Jose Lamas Rios

        Anonymous wrote: The USB flash disk have no CHS parameters (the system use virtual parameters),I only need to get teh total sectors,how to do it? Thanks. Would calling GetDiskFreeSpace[^] and then computing TotalNumberOfClusters * SectorsPerCluster do the trick? -- jlr http://jlamas.blogspot.com/[^]

        T Offline
        T Offline
        TeraCoder
        wrote on last edited by
        #3

        Does that include the boot sector?


        Me, wrong!?! Nah, you just need to change your thinking to make me right.

        1 Reply Last reply
        0
        • J Jose Lamas Rios

          Anonymous wrote: The USB flash disk have no CHS parameters (the system use virtual parameters),I only need to get teh total sectors,how to do it? Thanks. Would calling GetDiskFreeSpace[^] and then computing TotalNumberOfClusters * SectorsPerCluster do the trick? -- jlr http://jlamas.blogspot.com/[^]

          B Offline
          B Offline
          bghuang
          wrote on last edited by
          #4

          I want to get the total sectors for physical drive. The MBR and BOOT may be failure. so your function is invalid. Could tell me the other function? Thanks.:)

          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