Closed Thread
Results 1 to 5 of 5

Thread: How to get hard disk capacity?

  1. #1
    Jecci is offline Newbie
    Join Date
    Mar 2008
    Location
    china
    Posts
    8
    Rep Power
    0

    Wink How to get hard disk capacity?

    This Disk is not formatted,no initializtion.So can't use GetDiskFreeSpace function.

    I use DeviceIoControl function for send IOCTL_DISK_GET_DRIVE_GEOMETRY command to get Disk geometry,but why the returns Cylinders is 36474 ?

    I gets my disk geometry:
    Cylinders 36474 (LowPart 36474,HighPart 0)
    MediaType FixedMedia
    TracksPerCylinder 255
    SectorsPerTrack 63
    BytesPerSector 512

    Please help,Thanks in advance.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143

    Re: How to get hard disk capacity?

    It's just a guess, but wouldn't you just multiply the numeric results to get 300,008,862,720 bytes?
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  4. #3
    Jecci is offline Newbie
    Join Date
    Mar 2008
    Location
    china
    Posts
    8
    Rep Power
    0

    Re: How to get hard disk capacity?

    Hi,wingedPanther.Thank you for your reply.
    Yes,This Hard Drive capacity is 300GB,but I don't known why Per Cylinder is 255 Tracks?what's the definition?

  5. #4
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143

    Re: How to get hard disk capacity?

    I don't know why it would be 255 Tracks, though I notice it is 256-1 so perhaps a track is "not usable" for redundancy, check bits, or something else.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  6. #5
    Jecci is offline Newbie
    Join Date
    Mar 2008
    Location
    china
    Posts
    8
    Rep Power
    0

    Re: How to get hard disk capacity?

    Thanks,I see.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 05-24-2010, 08:33 AM
  2. Replies: 0
    Last Post: 04-12-2010, 06:09 AM
  3. reading hard disk number
    By veda87 in forum C and C++
    Replies: 11
    Last Post: 09-02-2009, 05:36 AM
  4. speed up your hard disk
    By pranky in forum Tutorials
    Replies: 4
    Last Post: 07-12-2007, 02:43 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts