www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/03/16/17:32:04

From: "Richard Ellingworth" <ricell AT globalnet DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Getting disk free space on FAT32 partition
Date: Fri, 16 Mar 2001 22:28:35 -0000
Organization: Posted via Supernews, http://www.supernews.com
Message-ID: <tb54neenrt5p27@xo.supernews.co.uk>
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
X-Complaints-To: abuse AT xo DOT supernews DOT co DOT uk
Lines: 28
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi folks. Bit of a problem here.

I wrote a program (for an MSDOS PC) that (amongst other things) calculated
the amount of free space on a disk drive. It did this using the getdfree
function. Fine and dandy. However, I am now rewriting the program to run on
a machine with a much bigger hard disk drive (30 Gb). I used fdisk and
formatted the drive using the Windows 95 format program and ended up with
one nice big partition. But now.. (you know whats coming) ... the getdfree
function doesn't work anymore because it cannot cope with the large disk
drive.

After a long struggle I dug up some information on the new int 0x13
functions (I think there's an int 0x21 function or too as well) that can get
this information but I cannot get any of them to work. I have found the
entry in the FAQ list describing how to pass pointers to software
interrupts, but so far I have failed to make any of the methods described
work with these functions. The buffer I pass to the function always comes
back unmodified so I suspect the pointer is not being passed properly.

Has anyone succeeded in writing a function to get the disk free space from a
FAT32 drive? If so a snippet of code showing how todo it would be jolly
useful and much appreciated. If I can't get this to work I shall just have
to resort to passing a command line like "dir c:\ >temp.txt" to the system
function and then reading back the contents of temp.txt to find the disk
free space (yuck).



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019