home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
VRML Tools for 3D Cyberspace
/
VRML_Tools_For_3D_Cyberspace.iso
/
virtus
/
vsupport.in_
/
vsupport.bin
Wrap
Text File
|
1996-07-01
|
2KB
|
71 lines
'----------------------------------------------------------------
'- more specialized little functions to make our lives easier.
'- John Alspaugh 27FEB94
'- Copyright 1993-1994 Virtus Corporation. All Rights Reserved.
'-
'- Note that this must be included after MSDETECT.INC and SETUPAPI.INC
'-
'----------------------------------------------------------------
DECLARE FUNCTION VSetDriveStatus(pDest$, pControl$) AS INTEGER
'----------------------------------------------------------------
'- Purpose:
'- Sets drive status info according to latest disk space calcs.
'- Arguments:
'- none.
'- Returns:
'- none.
'----------------------------------------------------------------
FUNCTION VSetDriveStatus(pDest$, pControl$) STATIC AS INTEGER
'$ifdef DEBUG
if pDest$ = "" then
BadArgErr 1, "SetDriveStatus", pFName$
end if
if pControl$ = "" then
BadArgErr 2, "SetDriveStatus", pFName$
end if
'$endif ''DEBUG
drive$ = ucase$(MID$(pDest$, 1, 1))
cost& = VL_CalcDiskCost(drive$)
free& = GetFreeSpaceForDrive(drive$)
ReplaceListItem pControl$, 1, drive$ + ":"
ReplaceListItem pControl$, 2, STR$(cost& / 1024) + " K"
ReplaceListItem pControl$, 3, STR$(free& / 1024) + " K"
'' check that the amount of disk space we need is less than the amount available,
'' and set a flag.
IF cost& > free& THEN
state% = 1
ELSE
state% = 0
ENDIF
lWinDrive$ = ucase$(MID$(GetWindowsDir, 1, 1))
IF drive$ = lWinDrive$ THEN
ReplaceListItem pControl$, 4, ""
ReplaceListItem pControl$, 5, ""
ReplaceListItem pControl$, 6, ""
ELSE
cost& = VL_CalcDiskCost(lWinDrive$)
IF cost& = 0 THEN
ReplaceListItem pControl$, 4, ""
ReplaceListItem pControl$, 5, ""
ReplaceListItem pControl$, 6, ""
ELSE
free& = GetFreeSpaceForDrive(lWinDrive$)
ReplaceListItem pControl$, 4, lWinDrive$ + ":"
ReplaceListItem pControl$, 5, STR$(cost& / 1024) + " K"
ReplaceListItem pControl$, 6, STR$(free& / 1024) + " K"
END IF
END IF
VSetDriveStatus = state%
END FUNCTION