Find total size of the hard disk

ajeshjohn's Avatar, Join Date: Jun 2006
Newbie Member
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
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Try using GetDiskFreeSpaceEx
0
ajeshjohn's Avatar, Join Date: Jun 2006
Newbie Member
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
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Try using _getdiskfree function defined in dos.h which populates the structure _diskfree_t