DosSetDefaultDisk: Difference between revisions
Appearance
Created page with "==DosSetDefaultDisk== ===Syntax=== rc = DosSetDefaultDisk( ''ulDrive'' ); ===Parameters=== ; ULONG ''ulDrive'' (input) : The number of the drive to set as default drive. (A=1..." |
m Martini moved page OS2 API:DosSetDefaultDisk to OS2 API:CPI:DosSetDefaultDisk |
(No difference)
| |
Revision as of 14:24, 16 May 2016
DosSetDefaultDisk
Syntax
rc = DosSetDefaultDisk( ulDrive );
Parameters
- ULONG ulDrive (input)
- The number of the drive to set as default drive. (A=1, B=2 etc.)
Returns
APIRET rc 0 NO_ERROR 15 ERROR_INVALID_DRIVE
Include Info
#define INCL_DOSFILEMGR #include <os2.h>
Usage Explanation
DosSetDefaultDisk sets the specified drive as the default drive for the process.
Relevant Structures
Gotchas
Sample Code
#define INCL_DOSFILEMGR
#include <os2.h>
#include <stdio.h> /* For printf */
if(DosSetDefaultDisk(4)) /* Set default drive to D: */
{
printf("Can not change default drive to D:\n");
}