| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
#include <dos.h> void _dos_setdrive(unsigned int drive, unsigned int *p_drives); |
This function set the current default drive based on drive (1=A:, 2=B:, etc.) and determines the number of available logical drives and fills p_drives with it.
See section _dos_getdrive.
None.
| ANSI/ISO C | No |
| POSIX | No |
unsigned int available_drives;
/* The current drive will be A: */
_dos_setdrive(1, &available_drives);
printf("Number of available logical drives %u.\n", available_drives);
|