Go to the first, previous, next, last section, table of contents.


_dos_setdrive

Syntax

#include <dos.h>

void _dos_setdrive(unsigned int drive, unsigned int *p_drives);

Description

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.

Return Value

None.

Portability

not ANSI, not POSIX

Example

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);


Go to the first, previous, next, last section, table of contents.