Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ v10.0 : C library - <b>synopsis:</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <dos.h>
    void _dos_getdrive( unsigned *drive );

Description:
    The _dos_getdrive function uses system call 0x19 to get the current disk
    drive number.  The current disk drive number is returned in the word
    pointed to by drive.  A value of 1 is drive A, 2 is drive B, 3 is drive
    C, etc.

Returns:
    The _dos_getdrive function has no return value.

See Also:
    _dos_getdiskfree, _dos_setdrive

Example:
    #include <stdio.h>
    #include <dos.h>

    void main()
      {
        unsigned drive;

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

    produces the following:

    The current drive is C

Classification:
    DOS

Systems:
    DOS, Win, OS/2 1.x(all), OS/2 2.x, NT, DOS/PM

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson