home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / dos / compat / d_setdrv.txh < prev    next >
Encoding:
Text File  |  1995-10-09  |  682 b   |  32 lines

  1. @node _dos_setdrive, dos
  2. @heading @code{_dos_setdrive}
  3. @subheading Syntax
  4.  
  5. @example
  6. #include <dos.h>
  7.  
  8. void _dos_setdrive(unsigned int drive, unsigned int *p_drives);
  9. @end example
  10.  
  11. @subheading Description
  12.  
  13. This function set the current default drive based on @var{drive}
  14. (1=A:, 2=B:, etc.) and determines the number of available logical
  15. drives and fills @var{p_drives} with it.
  16.  
  17. @xref{_dos_getdrive}.
  18.  
  19. @subheading Return Value
  20.  
  21. None.
  22.  
  23. @subheading Example
  24.  
  25. @example
  26. unsigned int available_drives;
  27.  
  28. /* The current drive will be A: */
  29. _dos_setdrive(1, &available_drives);
  30. printf("Number of available logical drives %u.\n", available_drives);
  31. @end example
  32.