Lost Password?

Go Back   CodeCall Programming Forum > Software Development > C and C++

C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-27-2008, 09:22 PM
Jecci Jecci is offline
Newbie
 
Join Date: Mar 2008
Location: china
Posts: 7
Rep Power: 0
Jecci is on a distinguished road
Send a message via MSN to Jecci
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 03-28-2008, 11:21 AM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Moderator
 
Join Date: Jul 2006
Age: 35
Posts: 2,035
Last Blog:
NaNoWriMo Day 23 The...
Rep Power: 24
WingedPanther is a jewel in the roughWingedPanther is a jewel in the roughWingedPanther is a jewel in the roughWingedPanther is a jewel in the rough
Default 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?
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-28-2008, 08:49 PM
Jecci Jecci is offline
Newbie
 
Join Date: Mar 2008
Location: china
Posts: 7
Rep Power: 0
Jecci is on a distinguished road
Send a message via MSN to Jecci
Default 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?
__________________
One World,One Dream.
Welcome to china.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-01-2008, 12:05 PM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Moderator
 
Join Date: Jul 2006
Age: 35
Posts: 2,035
Last Blog:
NaNoWriMo Day 23 The...
Rep Power: 24
WingedPanther is a jewel in the roughWingedPanther is a jewel in the roughWingedPanther is a jewel in the roughWingedPanther is a jewel in the rough
Default 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.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-01-2008, 07:55 PM
Jecci Jecci is offline
Newbie
 
Join Date: Mar 2008
Location: china
Posts: 7
Rep Power: 0
Jecci is on a distinguished road
Send a message via MSN to Jecci
Default Re: How to get hard disk capacity?

Thanks,I see.
__________________
One World,One Dream.
Welcome to china.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl: Disk Space Jordan Tutorials 15 07-16-2008 06:17 PM
How to get floppy disk information ?!! Master C and C++ 7 11-24-2007 01:19 AM
speed up your hard disk pranky Tutorials 4 07-12-2007 04:43 PM
Password Reset Disk PC101 Technology Ramble 0 09-12-2006 08:42 PM


All times are GMT -5. The time now is 10:59 AM.

Contest Stats

John ........ 223.00000
dargueta ........ 168.00000
Xav ........ 164.00000
gaylo565 ........ 18.00000
WingedPanther ........ 15.00000
|pH| ........ 15.00000
Johnnyboy ........ 3.00000
navghost ........ 1.00000

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 66%

Ads