en:docs:fapi:dosselectdisk

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:docs:fapi:dosselectdisk [2018/09/02 05:22] prokusheven:docs:fapi:dosselectdisk [2021/09/17 08:19] (current) prokushev
Line 1: Line 1:
-{{logos:os2.gif?35x35}} {{logos:dos.gif?35x35}}+{{page>en:templates:fapiint}}
  
 ====== DosSelectDisk ====== ====== DosSelectDisk ======
Line 5: Line 5:
 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)+<code c> 
 +DosSelectDisk (DriveNumber) 
 +</code>
  
-==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:
Line 22: Line 24:
   * 15  ERROR_INVALID_DRIVE    * 15  ERROR_INVALID_DRIVE 
  
-==Example Code== +===== Example Code =====
-===C Binding===+
  
 +==== C Binding ====
 +
 +<code c>
   #define INCL_DOSFILEMGR   #define INCL_DOSFILEMGR
      
Line 30: Line 34:
   USHORT           DriveNumber;   /* Default drive number */   USHORT           DriveNumber;   /* Default drive number */
   USHORT           rc;            /* return code */   USHORT           rc;            /* return code */
 +</code>
  
 +==== MASM Binding ====
  
-===MASM Binding=== +<code asm>
   EXTRN  DosSelectDisk:FAR   EXTRN  DosSelectDisk:FAR
   INCL_DOSFILEMGR     EQU 1   INCL_DOSFILEMGR     EQU 1
Line 39: Line 44:
   PUSH   WORD    DriveNumber   ;Default drive number   PUSH   WORD    DriveNumber   ;Default drive number
   CALL   DosSelectDisk   CALL   DosSelectDisk
 +</code>
 Returns WORD Returns WORD
  
-====== Note ======+===== Note =====
  
 Text based on http://www.edm2.com/index.php/DosSelectDisk Text based on http://www.edm2.com/index.php/DosSelectDisk