Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Find total size of the hard disk (http://www.go4expert.com/forums/total-size-hard-disk-t917/)

ajeshjohn 21Jun2006 11:52

Find total size of the hard disk
 
Hi,
Can anyone please tell me how to find the total hard disk size using C in DOS environment. The hard disk might not be formatted.

Thanks for the help...
Aju

shabbir 21Jun2006 15:45

Re: Find total size of the hard disk
 
Try using GetDiskFreeSpaceEx

ajeshjohn 22Jun2006 09:53

Re: Find total size of the hard disk
 
Thanks for the reply Shabbir,

But the function that you have told is a win32 API, right?
That will not work in DOS mode. I mean in DOS OS.
I was looking for something that will work under DOS mode, some solution in C or even in assembly language.

Thanks

shabbir 23Jun2006 13:16

Re: Find total size of the hard disk
 
Try using _getdiskfree function defined in dos.h which populates the structure _diskfree_t


All times are GMT +5.5. The time now is 01:38.