GetDrive

int GetDrive (int *currentDriveNumber, int *numberOfDrives);

Purpose

Gets the current default drive number and the total number of logical drives in the system.

Parameters

Output
Name Type Description
currentDriveNumber integer The drive number of the new default drive.

The mapping between the drive number and the logical drive letter is 0 = A, 1 = B, and so on.
numberOfDrives integer The total number of drives in the system.

The number of drives includes floppy disk drives, hard disk drives, RAM disks, and networked drives.

Return Value

Name Type Description
result integer The result of the call.
Code Description
0 Success.
-1 Current directory is on a network drive that is not mapped to a local drive. currentDriveNumber is set correctly, but numberOfDrives is set to -1.
-3 General I/O error occurred.
-4 Insufficient memory to complete the operation.
-6 Access denied.