en:docs:fapi:dosdelete

Differences

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

Link to this comparison view

en:docs:fapi:dosdelete [2018/08/26 16:34]
prokushev created
en:docs:fapi:dosdelete [2018/09/02 05:01] (current)
prokushev
Line 5: Line 5:
  
 ==Syntax== ==Syntax==
- ​DosDelete (FileName, Reserved)+ 
 +  ​DosDelete (FileName, Reserved)
  
 ==Parameters== ==Parameters==
-;FileName (PSZ) - input : Address of the name of the file to be deleted. + 
-:DosQSysInfo is called by an application during initialization to determine the maximum path length allowed by OS/2. +  *FileName (PSZ) - input : Address of the name of the file to be deleted. 
-Reserved (ULONG) - input : Reserved and must be set to zero.+DosQSysInfo is called by an application during initialization to determine the maximum path length allowed by OS/2. 
 +  ​* ​Reserved (ULONG) - input : Reserved and must be set to zero.
  
 ==Return Code== ==Return Code==
- rc (USHORT) - return+ 
 +  rc (USHORT) - return 
 Return code descriptions are: Return code descriptions are:
-* 0         ​NO_ERROR  + 
-* 2         ​ERROR_FILE_NOT_FOUND  +  ​* 0         ​NO_ERROR  
-* 3         ​ERROR_PATH_NOT_FOUND  +  * 2         ​ERROR_FILE_NOT_FOUND  
-* 5         ​ERROR_ACCESS_DENIED  +  * 3         ​ERROR_PATH_NOT_FOUND  
-* 26        ERROR_NOT_DOS_DISK  +  * 5         ​ERROR_ACCESS_DENIED  
-* 32        ERROR_SHARING_VIOLATION  +  * 26        ERROR_NOT_DOS_DISK  
-* 36        ERROR_SHARING_BUFFER_EXCEEDED  +  * 32        ERROR_SHARING_VIOLATION  
-* 87        ERROR_INVALID_PARAMETER  +  * 36        ERROR_SHARING_BUFFER_EXCEEDED  
-* 206       ​ERROR_FILENAME_EXCED_RANGE+  * 87        ERROR_INVALID_PARAMETER  
 +  * 206       ​ERROR_FILENAME_EXCED_RANGE
  
 ==Remarks== ==Remarks==
 +
 Global file name characters are not permitted. Global file name characters are not permitted.
  
Line 32: Line 38:
 ==Example Code== ==Example Code==
 ===C Binding=== ===C Binding===
-<PRE> 
-#define INCL_DOSFILEMGR 
  
-USHORT ​ rc = DosDelete(FileName,​ Reserved);+  #define INCL_DOSFILEMGR 
 +   
 +  ​USHORT ​ rc = DosDelete(FileName,​ Reserved); 
 +   
 +  PSZ              FileName; ​     /* File name path */ 
 +  ULONG            0;             /* Reserved (must be zero) */ 
 +   
 +  USHORT ​          ​rc; ​           /* return code */
  
-PSZ              FileName; ​     /* File name path */ 
-ULONG            0;             /* Reserved (must be zero) */ 
- 
-USHORT ​          ​rc; ​           /* return code */ 
-</​PRE>​ 
 This example deletes a file in the current directory named test.dat. ​ This example deletes a file in the current directory named test.dat. ​
  
-<​PRE>​ +  ​#define INCL_DOSFILEMGR 
-#define INCL_DOSFILEMGR +   
- +  #define FILE_DELETE "​test.dat"​ 
-#define FILE_DELETE "​test.dat"​ +  #define RESERVED 0L 
-#define RESERVED 0L +   
- +  USHORT rc; 
-USHORT rc; +  
    rc = DosDelete(FILE_DELETE, ​   /* File path name */    rc = DosDelete(FILE_DELETE, ​   /* File path name */
                   RESERVED); ​     /* Reserved (must be zero) */                   RESERVED); ​     /* Reserved (must be zero) */
-</​PRE>​+
 ===MASM Binding=== ===MASM Binding===
-<PRE> 
-EXTRN  DosDelete:​FAR 
-INCL_DOSFILEMGR ​    EQU 1 
  
-PUSH@  ASCIIZ ​ FileName ​     ;Filename path name string +  EXTRN  DosDelete:​FAR 
-PUSH   ​DWORD ​  ​0 ​            ;​Reserved (must be zero) +  INCL_DOSFILEMGR ​    EQU 1 
-CALL   ​DosDelete+   
 +  ​PUSH@  ASCIIZ ​ FileName ​     ;Filename path name string 
 +  PUSH   ​DWORD ​  ​0 ​            ;​Reserved (must be zero) 
 +  CALL   ​DosDelete
  
 Returns WORD Returns WORD
-</​PRE>​ 
  
 ====== Note ====== ====== Note ======

en/docs/fapi/dosdelete.txt · Last modified: 2018/09/02 05:01 by prokushev