home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Tool Box
/
SIMS_2.iso
/
tool
/
disktool
/
spaced
/
readme.txt
next >
Wrap
Text File
|
1994-10-02
|
852b
|
41 lines
SPACE.DLL
This .DLL contains two functions that returns total space on a disk
and free space on disk.
The declaration syntax is:
Declare Function FreeSpaceOnDisk LIB "SPACE.DLL" (ByVal Drive as long) as long
Declare Function TotalSpaceOnDisk LIB "SPACE.DLL" (ByVal Drive as long) as long
The drive paramater:
0 = default drive
1 = A:
2 = B:
3 = C:
etc....
If the returnvalue is -1 then there is either no disk in the drive or the
drive is invalid.
Visual basic example:
Form_Load()
Dim Free, Total as long
Free = FreeSpaceOnDisk(0)
Total = TotalSpaceOnDisk(0)
If free = -1 then
Print("Disk not inserted in drive or drive failure!")
Else If
Print("Total Disk Space Is:",Total)
Print("Free Disk Space:",Free)
End If
End