[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Return a count of the floppy drives on a system.
------------------------------------------------------------------------------
Syntax
GT_FlopCnt() --> nNumberOfDrives
Arguments:
None.
Returns:
The number of physical floppy drives fitted to a machine.
Description:
GT_FlopCnt() can be used to check if a system has more than one
floppy drive.
Some systems have just one floppy drive that can ``act'' as either
drive A: or B:. If your system attempts to access either of these
drives while it is ``acting'' as the other, DOS will display a
message in screen asking the user to place the disk in the drive
and press any key.
Use GT_FlopCnt() to see if this could be a problem. If the machine
has only one floppy drive, use GT_FlopNam() to see if the floppy
drive is acting as A: or B:.
Examples:
// This example function will copy a file to the floppy drive.
// Before doing so it checks that the name of the drive is ok.
function CopyToFloppy(cFileName)
local cFloppy := "A:"
if GT_FlopCnt() == 1
cFloppy := GT_FlopNam()+":"
endif
copy (cFileName) to (cFloppy+cFileName)
return(NIL)
Source: FDRVCNT.C
Author: Dave Pearson
See Also: GT_FLOPNAM()
Online resources provided by: http://www.ClipX.Net --- NG 2 HTML conversion by Dave Pearson