[ Home |
Alpha index |
Topic index |
Tutorials |
Download |
Feedback ]
The OS/2 API Project
DosQueryCurrentDisk
[ Syntax |
Params |
Returns |
Include |
Usage |
Structs |
Gotchas |
Code |
Also ]
Syntax
rc = DosQueryCurrentDisk( pulDrive,
pulLogical );
Parameters
-
PULONG pulDrive (output)
-
Pointer to the current drive number. (1=A, 2=B etc.)
-
PULONG pulLogical (output)
-
Pointer to a 32-bit bit area where each of the 26 lowest bits represents a drive
(0=A, 1=B etc.) If bit n is set(=1) then the drive corresponding to n exists.
Returns
-
APIRET rc
-
0 NO_ERROR
Include Info
#define INCL_DOSFILEMGR
#include <os2.h>
Usage Explanation
DosQueryCurrentDisk is used to query which drive is the current default drive
for the process and to get the drives available.
Relevant Structures
Gotchas
Sample Code
#define INCL_DOSFILEMGR
#include
#include /* For printf */
ULONG ulDrive;
ULONG ulLogical;
APIRET rc;
rc=DosQueryCurrentDisk(&ulDrive, &ulLogical); /* Get current drive */
printf("Current Drive is %c.\n",(char)ulDrive+'A'-1); /* Print current drive */
See Also
DosSetDefaultDisk
Author
Oscar Gustafsson -
oscar@lysator.liu.se
Additions
Last modified September 21/1996
Please send all errors, comments, and suggestions to:
timur@vnet.ibm.com
The OS/2 API Project |
DosQueryCurrentDisk |