delorie.com/djgpp/doc/libc/libc_179.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

_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

ANSI/ISO C No
POSIX No

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

  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004