Differences
This shows you the differences between two versions of the page.
Next revisionBoth sides next revision | |||
en:docs:fapi:dosdelete [2018/08/26 14:34] – created prokushev | en:docs:fapi:dosdelete [2018/09/02 03:01] – prokushev | ||
---|---|---|---|
Line 5: | Line 5: | ||
==Syntax== | ==Syntax== | ||
- | | + | |
+ | | ||
==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. |
+ | | ||
==Return Code== | ==Return Code== | ||
- | rc (USHORT) - return | + | |
+ | rc (USHORT) - return | ||
Return code descriptions are: | Return code descriptions are: | ||
- | * 0 | + | |
- | * 2 | + | |
- | * 3 | + | * 2 |
- | * 5 | + | * 3 |
- | * 26 ERROR_NOT_DOS_DISK | + | * 5 |
- | * 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 | + | * 87 ERROR_INVALID_PARAMETER |
+ | * 206 | ||
==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 | + | #define INCL_DOSFILEMGR |
+ | |||
+ | | ||
+ | |||
+ | PSZ FileName; | ||
+ | ULONG 0; /* Reserved (must be zero) */ | ||
+ | |||
+ | USHORT | ||
- | PSZ FileName; | ||
- | ULONG 0; /* Reserved (must be zero) */ | ||
- | |||
- | USHORT | ||
- | </ | ||
This example deletes a file in the current directory named test.dat. | This example deletes a file in the current directory named test.dat. | ||
- | < | + | |
- | #define INCL_DOSFILEMGR | + | |
- | + | #define FILE_DELETE " | |
- | #define FILE_DELETE " | + | #define RESERVED 0L |
- | #define RESERVED 0L | + | |
- | + | USHORT rc; | |
- | USHORT rc; | + | |
rc = DosDelete(FILE_DELETE, | rc = DosDelete(FILE_DELETE, | ||
RESERVED); | RESERVED); | ||
- | </ | + | |
===MASM Binding=== | ===MASM Binding=== | ||
- | <PRE> | ||
- | EXTRN DosDelete: | ||
- | INCL_DOSFILEMGR | ||
- | PUSH@ ASCIIZ | + | EXTRN DosDelete: |
- | PUSH | + | INCL_DOSFILEMGR |
- | CALL | + | |
+ | | ||
+ | PUSH | ||
+ | CALL | ||
Returns WORD | Returns WORD | ||
- | </ | ||
====== Note ====== | ====== Note ====== |