home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / crt / src / drivemap.c < prev    next >
C/C++ Source or Header  |  1998-06-17  |  757b  |  37 lines

  1. /***
  2. *drivemap.c - _getdrives
  3. *
  4. *       Copyright (c) 1991-1997, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. *       defines _getdrives()
  8. *
  9. *******************************************************************************/
  10.  
  11. #include <cruntime.h>
  12. #include <oscalls.h>
  13. #include <direct.h>
  14.  
  15. #if !defined (_WIN32)
  16. #error ERROR - ONLY WIN32 TARGET SUPPORTED!
  17. #endif  /* !defined (_WIN32) */
  18.  
  19. /***
  20. *void _getdrivemap(void) - Get bit map of all available drives
  21. *
  22. *Purpose:
  23. *
  24. *Entry:
  25. *
  26. *Exit:
  27. *       drive map with drive A in bit 0, B in 1, etc.
  28. *
  29. *Exceptions:
  30. *
  31. *******************************************************************************/
  32.  
  33. unsigned long __cdecl _getdrives()
  34. {
  35.     return (GetLogicalDrives());
  36. }
  37.