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++ 3.0r4 - <b>dos_getdrive</b> 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 1 = A:, 2 = B:, 3 = C: and so on.

Example 

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

   int main()
   {
       unsigned driveno;


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

See Also

   DOS package, dos_setdrive



See Also: dos_setdrive

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