en:docs:fapi:dosselectdisk

Differences

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

Link to this comparison view

Next revision
Previous revision
en:docs:fapi:dosselectdisk [2018/08/29 13:27] – created prokusheven:docs:fapi:dosselectdisk [2021/09/17 08:19] (current) prokushev
Line 1: Line 1:
 +{{page>en:templates:fapiint}}
 +
 +====== DosSelectDisk ======
  
 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)+
  
-==Parameters== +<code c> 
-;DriveNumber (USHORT- input : New default drive number, where 1 = A and 2 = B and so on.+DosSelectDisk (DriveNumber) 
 +</code>
  
-==Return Code== +===== Parameters ===== 
- rc (USHORT) - return+ 
 +  *DriveNumber ([[USHORT]]) - input : New default drive number, where 1 = A and 2 = B and so on. 
 + 
 +===== Return Code ===== 
 + 
 +rc ([[USHORT]]) - return 
 +  
 Return code descriptions are: Return code descriptions are:
-* 0   NO_ERROR 
-* 15  ERROR_INVALID_DRIVE  
  
-==Example Code== +  * 0   NO_ERROR 
-===C Binding=== +  * 15  ERROR_INVALID_DRIVE 
-<PRE> +
-#define INCL_DOSFILEMGR+
  
-USHORT  rc DosSelectDisk(DriveNumber); +===== Example Code =====
-USHORT           DriveNumber;   /* Default drive number */ +
-USHORT           rc;            /* return code */ +
-</PRE>+
  
-===MASM Binding=== +==== C Binding ====
-<PRE> +
-EXTRN  DosSelectDisk:FAR +
-INCL_DOSFILEMGR     EQU 1+
  
-PUSH   WORD    DriveNumber   ;Default drive number +<code c> 
-CALL   DosSelectDisk+  #define INCL_DOSFILEMGR 
 +   
 +  USHORT  rc = DosSelectDisk(DriveNumber); 
 +  USHORT           DriveNumber;   /Default drive number */ 
 +  USHORT           rc;            /* return code */ 
 +</code>
  
-Returns WORD +==== MASM Binding ====
-</PRE>+
  
 +<code asm>
 +  EXTRN  DosSelectDisk:FAR
 +  INCL_DOSFILEMGR     EQU 1
 +  
 +  PUSH   WORD    DriveNumber   ;Default drive number
 +  CALL   DosSelectDisk
 +</code>
 +Returns WORD
  
-====== Note ======+===== Note =====
  
 Text based on http://www.edm2.com/index.php/DosSelectDisk Text based on http://www.edm2.com/index.php/DosSelectDisk