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..." |
(No difference)
|
Revision as of 17:59, 29 June 2012
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");
}