<cVersion> FT_DOSVER() nSpaceAvail FT_DSKFREE( [ <cDrive> ] ) nMaxCapacity FT_DSKSIZE( [ <cDrive> ] ) nStatus FT_FLOPTST( <nDrive> ) nRetCode FT_ISSHARE() <lResult> FT_SETDATE( <dDate> ) <lResult> FT_SETTIME( <cTime> ) nMemSize FT_SYSMEM() cFileSpec FT_TEMPFIL( [ <cPath> ] [, <lHide> ] )
FT_DOSVER() --> <cVersion>
FT_DOSVER() invokes DOS interrupt 21h, service 30 in order to return the current DOS version. It does this by setting up an array corresponding to machine registers and then calling the toolkit function FT_INT86().
It returns a character string corresponding to the DOS version, as follows: The major version, a period ("."), then the minor version.
FT_DSKFREE( [ <cDrive> ] ) --> nSpaceAvail
Function to return the available space on the passed drive letter or the default drive if no drive is passed.
Uses FT_INT86() through the internal function _ftDiskInfo().
FT_DSKSIZE( [ <cDrive> ] ) --> nMaxCapacity
Function utilizing FT_INT86() to return Maximum Disk Size. Uses FT_INT86() through the internal function _ftDiskInfo().
FT_FLOPTST( <nDrive> ) --> nStatus
FT_FLOPTST() is designed as a full replacement for ISDRIVE(). Where ISDRIVE() returns just .T. or .F. depending if the diskette drive is ready or not, FT_FLOPTST() returns a numeric code designating the diskette drive's status.
FT_FLOPTST() is particularly useful in backup and restore programs that need to test the floppy drive before writing/reading from a floppy disk.
No testing has been performed on systems with more than 2 floppy drives. If the third drive is "C" and the fourth "D" then there should be no problems.
This function does not currently check subst'd drives. So if you have SUBST E: A:\ then FT_FLOPTST( ASC("E")-ASC("A") ) == 4 Any suggestions to fix this limitation are appreciated.
FT_ISSHARE() --> nRetCode
Uses DOS interrupt 2Fh (MultiPlex interrupt), service 10h to determine if DOS SHARE.COM is loaded.
Returns : | nRetcode will be set as follows on exit: 0 if SHARE not loaded but ok to load 1 if SHARE not loaded and not ok to load 255 if SHARE loaded |
See also : | FT_INT86() |
FT_SETDATE( <dDate> ) --> <lResult>
FT_SETDATE() uses NANFOR.LIB's FT_INT86() function to invoke the DOS Set Date service (Interrupt 33, service 43).
<dDate> | is a Clipper date variable that you want to set the current DOS system date to. It is up to you to send in a valid date. The year must be within the range 1980 through 2099. If DOS thinks the date is not valid, it won't change the date. |
Returns : | <lResult> is simply the result of FT_INT86(), passed back to your program. |
FT_SETTIME( <cTime> ) --> <lResult>
FT_SETTIME() uses NANFOR.LIB's FT_INT86() function to invoke the DOS Set Time service (Interrupt 33, service 45).
<cTime> | is a string in the form <hh:mm:ss> that you want to set the current DOS system time to. Use 24-hour time. It is up to you to send in a valid time. If DOS doesn't think it is valid, it won't reset the time anyway. |
Returns : | <lResult> is simply the result of FT_INT86(), passed back to your program. |
FT_SYSMEM() --> nMemSize
FT_SYSMEM() simply reports the amount of conventional memory (up to 640K) installed.
FT_SYSMEM() uses DOS interrupt 12h to get this information. For information, refer to Peter Norton's _Programmer's Guide to the IBM PC_ (Brady).
FT_TEMPFIL( [ <cPath> ] [, <lHide> ] ) --> cFileSpec
This function uses DOS Interrupt 21, service 5Ah (Create temporary file) to create a unique filename in a directory you specify. There will be no extension. After the file is created, you may then fopen() it and do any i/o you need (see the test driver in the source code).
This function requires FT_INT86().
<cPath> | is the directory where you want to create the temporary file. If you omit this argument, the root of the current drive is assumed ("\"). If <lHide> is .T., then the file will be created with the hidden attribute set. The default is .F. |
Returns : | <cFileSpec> should be your path, including the name of the newly created unique file. Use this with FOPEN(), etc. If a DOS error occurred when trying to create the file, a null string will be returned. |