en:docs:fapi:dosdelete

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:dosdelete [2018/09/02 03:01] prokusheven:docs:fapi:dosdelete [2021/12/05 09:53] (current) prokushev
Line 1: Line 1:
-{{logos:os2.gif?35x35}} {{logos:dos.gif?35x35}}+{{page>en:templates:fapiint}} 
 ====== DosDelete ====== ====== DosDelete ======
  
 This call removes a directory entry associated with a file name. This call removes a directory entry associated with a file name.
  
-==Syntax==+===== Syntax =====
  
-  DosDelete (FileName, Reserved)+<code c> 
 +DosDelete (FileName, Reserved) 
 +</code>
  
-==Parameters==+===== Parameters =====
  
-  *FileName (PSZ) - input : Address of the name of the file to be deleted. +  *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. 
-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. 
-  * Reserved (ULONG) - input : Reserved and must be set to zero.+ 
 +===== Return Code =====
  
-==Return Code== 
  
   rc (USHORT) - return   rc (USHORT) - return
Line 30: Line 33:
   * 206       ERROR_FILENAME_EXCED_RANGE   * 206       ERROR_FILENAME_EXCED_RANGE
  
-==Remarks==+===== Remarks =====
  
 Global file name characters are not permitted. Global file name characters are not permitted.
  
-A file whose read-only attribute is set cannot be deleted. To change the setting of the read-only bit, call DosSetFileMode. +A file whose read-only attribute is set cannot be deleted. To change the setting of the read-only bit, call [[DosSetFileMode]]
  
-==Example Code== +===== Bindings =====
-===C Binding===+
  
 +==== C Binding ====
 +
 +<code c>
   #define INCL_DOSFILEMGR   #define INCL_DOSFILEMGR
      
Line 47: Line 52:
      
   USHORT           rc;            /* return code */   USHORT           rc;            /* return code */
 +</code>
  
-This example deletes a file in the current directory named test.dat. +==== Example ====
  
 +This example deletes a file in the current directory named test.dat. 
 +<code c>
   #define INCL_DOSFILEMGR   #define INCL_DOSFILEMGR
      
Line 59: Line 67:
    rc = DosDelete(FILE_DELETE,    /* File path name */    rc = DosDelete(FILE_DELETE,    /* File path name */
                   RESERVED);      /* Reserved (must be zero) */                   RESERVED);      /* Reserved (must be zero) */
 +</code>
  
-===MASM Binding===+==== MASM Binding ====
  
 +<code asm>
   EXTRN  DosDelete:FAR   EXTRN  DosDelete:FAR
   INCL_DOSFILEMGR     EQU 1   INCL_DOSFILEMGR     EQU 1
Line 68: Line 78:
   PUSH   DWORD               ;Reserved (must be zero)   PUSH   DWORD               ;Reserved (must be zero)
   CALL   DosDelete   CALL   DosDelete
 +</code>
 Returns WORD Returns WORD
  
-====== Note ======+===== Note ===== 
  
 Text based on [[http://www.edm2.com/index.php/DosDelete_(FAPI)]] Text based on [[http://www.edm2.com/index.php/DosDelete_(FAPI)]]