Board index » delphi » Turbo Pascal 5.5 Large Drive Function/Procedure

Turbo Pascal 5.5 Large Drive Function/Procedure

Does anyone know how to get the true size of a drive larger than 2 gig?

I have a utility called DISKSTAT which displays the drive size, free space
and used space and it
does not work on drives larger than 2 gig.

Anyone?

 

Re:Turbo Pascal 5.5 Large Drive Function/Procedure


The utility you are using probably uses the diskfree and disksize functions
out of the DOS unit.  The problem with them is they only return a longint
which ranges from -2,147,483,648 to 2,147,483,647 (2 gig).  If it is over
that, it defaults to 2 gig.  The easiest way I can think of to get these
values is to execute a chkdsk command and put it into a file.  You can then
read the file and get the results.

Rick

Quote
mjgr...@mindspring.com wrote in message

<6r4ski$bp...@camel19.mindspring.com>...
Quote
>Does anyone know how to get the true size of a drive larger than 2 gig?

>I have a utility called DISKSTAT which displays the drive size, free space
>and used space and it
>does not work on drives larger than 2 gig.

>Anyone?

Other Threads