04-04-2008 12:30 PM
04-06-2008 11:31 PM
Hi Steve.
From the help on SetDrive():
"The mapping between the drive number and the logical drive letter is 0 = A, 1 = B, and so on.
Values: 0—25."
So, for example, to make E: the current drive:
char driveLetter = 'E';
int driveNumber, status;
...
driveNumber = driveLetter - 'A';
status = SetDrive (driveNumber);
Alernatively, you could use the Windows SDK function SetCurrentDirectory(), which sets the drive and directory in one call.
Cheers,
Colin.
04-07-2008 08:42 AM
04-07-2008 10:25 AM