home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Tool Box
/
SIMS_2.iso
/
vb_code2
/
spc_time
/
dskfree.c
next >
Wrap
C/C++ Source or Header
|
1992-03-24
|
485b
|
28 lines
#include <windows.h>
#include <dos.h>
int FAR PASCAL LibMain(HANDLE hModule, WORD wDataSeg, WORD cbHeapSize, LPSTR lpszCmdLine)
{
return TRUE;
}
long FAR PASCAL DSKFRE(int drv)
{
struct diskfree_t drive;
union longs {
unsigned long screw;
long screw2;
} it;
_dos_getdiskfree( drv,&drive );
it.screw=(unsigned long) drive.bytes_per_sector*drive.sectors_per_cluster*drive.avail_clusters/1024;
return(it.screw2 );
}