| FT_DOSVER | Return the current DOS major and minor version as a string |
| FT_DSKFREE() | Return the amount of available disk space |
| FT_DSKSIZE() | Return the maximum capacity of a fixed disk |
| FT_FLOPTST() | Test diskette drive status |
| FT_ISSHARE() | Determine if DOS "Share" is installed |
| FT_SETDATE() | Set the DOS system date |
| FT_SETTIME() | Set the DOS system time |
| FT_SYSMEM() | Determine the amount of conventional memory installed |
| FT_TEMPFIL() | Create a file with a unique name |
FT_DOSVER() -> <cVersion>
No arguments
A character string with the major version number first, a period ("."), then the minor version number (e.g., "3.30")
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
Integer representing the available disk space in bytes.
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
An integer representing the maximum disk capacity in bytes.
Function utilizing FT_INT86() to return Maximum Disk Size. Uses FT_INT86() through the internal function _ftDiskInfo().
FT_FLOPTST( <nDrive> ) -> nStatus
-1 - Wrong Parameters 0 - Drive Loaded and ready to read or write 1 - Drive Door Open or Diskette inserted upside down 2 - Diskette is unformatted 3 - Write protected 4 - Undetermined
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
No arguments
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
Uses DOS interrupt 2Fh (MultiPlex interrupt), service 10h to determine if DOS SHARE.COM is loaded.
FT_SETDATE( <dDate> ) -> <lResult>
<lResult> is simply the result of FT_INT86(), passed back to your program.
FT_SETDATE() uses NANFOR.LIB's FT_INT86() function to invoke the DOS Set Date service (Interrupt 33, service 43).
FT_SETTIME( <cTime> ) -> <lResult>
<lResult> is simply the result of FT_INT86(), passed back to your program.
FT_SETTIME() uses NANFOR.LIB's FT_INT86() function to invoke the DOS Set Time service (Interrupt 33, service 45).
FT_SYSMEM() -> nMemSize
No arguments
A numeric corresponding to the number of K memory.
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
<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.
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().
| Пред. | Начало | След. |
| FILE I/O | Уровень выше | MENUS/PROMPTS |