Changes the current working drive.
int _chdrive( int drive );
- Number of new working drive.
_chdrive returns a value of 0 if the working drive is successfully changed. A return value of –1 indicates an error.
The _chdrive function changes the current working drive to the drive specified by drive. The drive parameter uses an integer to specify the new working drive (1=A, 2=B, and so forth). This function changes only the working drive; _chdir changes the working directory.
|_chdrive||<direct.h>||Win 98, Win Me, Win NT, Win 2000, Win XP|
For additional compatibility information, see Compatibility in the Introduction.
All versions of the C run-time libraries.
See the example for _getdrive.