1. Variables and constants
2. Procedures and functions
There are two types of consants: dtXXXX constants and uvXXXX consants. The dtXXXX constants are returned by the GetDriveType function. The uvXXXX constants just tell you which version of the unit do you use. The constants are declared as follows:
const
dtError = $00; { Invalid drive,
letter not assigned }
dtFixed = $01; { Fixed drive
}
dtRemovable = $02; { Removable (floppy, etc.) drive
}
dtPhantom = $03; { Phantom of another
drive }
dtRemote = $04; { Remote (network)
drive }
dtCDROM = $05; { MSCDEX V2.00+
driven CD-ROM drive }
dtDblSpace = $06; { DoubleSpace compressed drive
}
dtSUBST = $07; { SUBST'ed
drive }
dtRAM = $08; {
RAM drive }
uvRelease = 0; { release number
}
uvRevision = 8; { revision number
(also means the number of drive
types which can be detected }
uvPatch = 3; {
patch number }
uvComment = 'b'; { 'a'=alpha version,
'b'=beta version,... nothing
means: it should work correctly }
Function GetDriveType
Declaration:
function GetDriveType (Drive: byte): byte;
Description:
Returns one of the dtXXXX constants for drive defined by parameter
Drive (values: 0=current, 1=A, 2=B, 3=C, and so on...).
Function GetNumOfDrives
Declaration:
function GetNumOfDrives : byte;
Description:
Returns the number of valid drives (max. 26).
Function PhantomOfDrive
Declaration:
function PhantomOfDrive (Drive: byte): byte;
Description:
If Drive (values: 0=current, 1=A, 2=B, 3=C, and so on...) is a phantom
drive (check it before with GetDriveType for sure) then it returns the
number of drive which is it assigned to (1=A, 2=B, and so on...) else it
returns zero.
Function GetCurrentDrive
Declaration:
function GetCurrentDrive: byte;
Description:
Returns the currently set drive (1=A, 2=B, and so on...).
Procedure SetCurrentDrive
Declaration:
procedure SetCurrentDrive (Drive: byte);
Description:
If Drive is a valid drive then it sets it as the current drive else
it does nothing.