www.delorie.com/djgpp/doc/libc/libc_170.html   search  
libc.a reference

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

_dos_getdrive

Syntax

 
#include <dos.h>

void _dos_getdrive(unsigned int *p_drive);

Description

This function determine the current default drive and writes this value into p_drive (1=A:, 2=B:, etc.).

See section _dos_setdrive.

Return Value

None.

Portability

ANSI/ISO C No
POSIX No

Example

 
unsigned int drive;

_dos_getdrive(&drive);
printf("The current drive is %c:.\n", 'A' - 1 + drive);

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2004   by DJ Delorie     Updated Apr 2004