en:docs:fapi:dosselectdisk

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revisionBoth sides next revision
en:docs:fapi:dosselectdisk [2018/08/29 13:27] – created prokusheven:docs:fapi:dosselectdisk [2018/09/02 05:22] prokushev
Line 1: Line 1:
 +{{logos:os2.gif?35x35}} {{logos:dos.gif?35x35}}
 +
 +====== FDosSelectDisk ======
  
 This call selects the drive specified as the default drive for the calling process. This call selects the drive specified as the default drive for the calling process.
  
 ==Syntax== ==Syntax==
 +
  DosSelectDisk (DriveNumber)  DosSelectDisk (DriveNumber)
  
 ==Parameters== ==Parameters==
-;DriveNumber (USHORT) - input : New default drive number, where 1 = A and 2 = B and so on.+ 
 +  *DriveNumber (USHORT) - input : New default drive number, where 1 = A and 2 = B and so on.
  
 ==Return Code== ==Return Code==
- rc (USHORT) - return+ 
 +  rc (USHORT) - return 
 +  
 Return code descriptions are: Return code descriptions are:
-* 0   NO_ERROR + 
-* 15  ERROR_INVALID_DRIVE +  * 0   NO_ERROR 
 +  * 15  ERROR_INVALID_DRIVE 
  
 ==Example Code== ==Example Code==
 ===C Binding=== ===C Binding===
-<PRE> 
-#define INCL_DOSFILEMGR 
  
-USHORT  rc = DosSelectDisk(DriveNumber); +  #define INCL_DOSFILEMGR 
-USHORT           DriveNumber;   /* Default drive number */ +   
-USHORT           rc;            /* return code */ +  USHORT  rc = DosSelectDisk(DriveNumber); 
-</PRE>+  USHORT           DriveNumber;   /* Default drive number */ 
 +  USHORT           rc;            /* return code */ 
  
 ===MASM Binding=== ===MASM Binding===
-<PRE> 
-EXTRN  DosSelectDisk:FAR 
-INCL_DOSFILEMGR     EQU 1 
  
-PUSH   WORD    DriveNumber   ;Default drive number +  EXTRN  DosSelectDisk:FAR 
-CALL   DosSelectDisk+  INCL_DOSFILEMGR     EQU 1 
 +   
 +  PUSH   WORD    DriveNumber   ;Default drive number 
 +  CALL   DosSelectDisk
  
 Returns WORD Returns WORD
-</PRE> 
- 
  
 ====== Note ====== ====== Note ======