en:docs:fapi:dosrmdir

Differences

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

Link to this comparison view

Next revision
Previous revision
en:docs:fapi:dosrmdir [2018/08/29 12:42] – created prokusheven:docs:fapi:dosrmdir [2021/09/17 08:17] (current) prokushev
Line 1: Line 1:
 +{{page>en:templates:fapiint}}
  
 +====== DosRmDir ======
  
 This call removes a subdirectory from the specified disk. This call removes a subdirectory from the specified disk.
  
-==Syntax== +===== Syntax =====
- DosRmDir (DirName, Reserved)+
  
-==Parameters== +<code c> 
-;DirName (PSZ) - input : Address of the fully qualified path name of the subdirectory being removed. +DosRmDir (DirName, Reserved) 
-;Reserved (ULONG) - input : Reserved must be set to zero.+</code> 
 + 
 +===== Parameters ===== 
 + 
 +  *DirName ([[PSZ]]) - input : Address of the fully qualified path name of the subdirectory being removed. 
 +  *Reserved ([[ULONG]]) - input : Reserved must be set to zero. 
 + 
 +===== Return Code ===== 
 + 
 +rc ([[USHORT]]) - return
  
-==Return Code== 
- rc (USHORT) - return 
 Return code descriptions are: Return code descriptions are:
-* 0        NO_ERROR  
-* 2        ERROR_FILE_NOT_FOUND  
-* 3        ERROR_PATH_NOT_FOUND  
-* 5        ERROR_ACCESS_DENIED  
-* 16       ERROR_CURRENT_DIRECTORY  
-* 26       ERROR_NOT_DOS_DISK  
-* 87       ERROR_INVALID_PARAMETER  
-* 108      ERROR_DRIVE_LOCKED  
-* 206      ERROR_FILENAME_EXCED_RANGE 
  
-==Remarks== +  * 0        NO_ERROR  
-The subdirectory must be empty, which means it cannot contain hidden files or directory entries other than the "." and ".." entries. Files can be deleted with [[DosDelete]].+  * 2        ERROR_FILE_NOT_FOUND  
 +  * 3        ERROR_PATH_NOT_FOUND  
 +  * 5        ERROR_ACCESS_DENIED  
 +  * 16       ERROR_CURRENT_DIRECTORY  
 +  * 26       ERROR_NOT_DOS_DISK  
 +  * 87       ERROR_INVALID_PARAMETER  
 +  * 108      ERROR_DRIVE_LOCKED  
 +  * 206      ERROR_FILENAME_EXCED_RANGE
  
-The root directory and current directory cannot be removed. +===== Remarks =====
  
-==Example Code== 
-=== C Binding=== 
-<PRE> 
-#define INCL_DOSFILEMGR 
  
-USHORT  rc = DosRmDir(DirNameReserved);+The subdirectory must be emptywhich means it cannot contain hidden files or directory entries other than the "." and ".." entries. Files can be deleted with [[DosDelete]].
  
-PSZ              DirName;       /* Directory name string */ +The root directory and current directory cannot be removed. 
-ULONG            0;             /* Reserved (must be zero) */+
  
-USHORT           rc;            /* return code */ +===== Example Code =====
-</PRE>+
  
-===MASM Binding=== +==== C Binding ==== 
-<PRE> +<code c>
-EXTRN  DosRmDir:FAR +
-INCL_DOSFILEMGR     EQU 1+
  
-PUSH@  ASCIIZ  DirName       ;Directory name string +  #define INCL_DOSFILEMGR 
-PUSH   DWORD               ;Reserved (must be zero) +   
-CALL   DosRmDir+  USHORT  rc = DosRmDir(DirName, Reserved); 
 +   
 +  PSZ              DirName;       /Directory name string */ 
 +  ULONG            0;             /* Reserved (must be zero) */ 
 +   
 +  USHORT           rc;            /* return code */ 
 +</code>
  
-Returns WORD +==== MASM Binding ====
-</PRE>+
  
 +<code asm>
 +  EXTRN  DosRmDir:FAR
 +  INCL_DOSFILEMGR     EQU 1
 +  
 +  PUSH@  ASCIIZ  DirName       ;Directory name string
 +  PUSH   DWORD               ;Reserved (must be zero)
 +  CALL   DosRmDir
 +</code>
  
 +Returns WORD
  
-====== Note ======+===== Note =====
  
 Text based on http://www.edm2.com/index.php/DosRmDir Text based on http://www.edm2.com/index.php/DosRmDir