The GetDriveType function determines whether a disk drive is a removable, fixed, CD-ROM, RAM disk, or network drive.
Declare Function GetDriveType Lib "kernel32" Alias "GetDriveTypeA" (ByVal nDrive As String) As Long
|Operating Systems Supported|
|Requires Windows NT 3.1 or later; Requires Windows 95 or later|
Points to a null-terminated string that specifies the root directory of the disk to return information about. If lpRootPathName is NULL, the function uses the root of the current directory.
|The return value specifies the type of drive. It can be one of the following values:|
The drive type cannot be determined.
The root directory does not exist.
The disk can be removed from the drive.
The disk cannot be removed from the drive.
The drive is a remote (network) drive.
The drive is a CD-ROM drive.
The drive is a RAM disk.