1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Find total size of the hard disk

Discussion in 'C' started by ajeshjohn, Jun 21, 2006.

  1. ajeshjohn

    ajeshjohn New Member

    Joined:
    Jun 20, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Bangalore
    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
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
  3. ajeshjohn

    ajeshjohn New Member

    Joined:
    Jun 20, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Bangalore
    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
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
    Try using _getdiskfree function defined in dos.h which populates the structure _diskfree_t
     

Share This Page