Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ Language Reference - dos_getdrive http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
                               dos_getdrive

   Usage
   #include <dos.h>
   void dos_getdrive(unsigned *driveptr);

   Description
   This  function obtains the identity of the currently logged drive  and
   stores it in the unsigned integer pointed to by driveptr. The drive is
   reported as a integer number where 0 = a, 1 = b, 2 = c and so on.

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

   main()
   {
   unsigned driveno;

        dos_getdrive(&driveno);
        printf("The current drive is %c:",driveno+'a');
   }


See Also: DOS_Package dos_setdrive

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