Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| en:docs:fapi:dosfindnext [2021/08/20 05:54] – prokushev | en:docs:fapi:dosfindnext [2021/09/18 09:01] (current) – prokushev | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| This call locates the next set of directory entries that match the name specified in the previous DosFindFirst, | This call locates the next set of directory entries that match the name specified in the previous DosFindFirst, | ||
| - | ==Syntax== | + | ===== Syntax ===== |
| + | <code c> | ||
| | | ||
| + | </ | ||
| - | ==Parameters== | + | ===== Parameters ===== |
| - | ;DirHandle (HDIR) - input : Handle associated with a previous DosFindFirst or DosFindNext function call. | + | |
| - | ;ResultBuf (PFILEFINDBUF) - output : Address of the directory search information structure. The information reflects the last DosClose or DosBufReset call. | + | |
| - | :It is possible, if the EA information for a file is 64K, that the system can never be able to return the full EA information for a file. | + | |
| - | :For the continuation of an FileInfoLevel 3 search, this buffer should contain input in the same format as a DosFindFirst2 FileInfoLevel 3 search. | + | |
| - | ;filedate (FDATE) : Structure containing the date of file creation. | + | |
| - | ''' | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | ;filetime (FTIME) : Structure containing the time of file creation. | + | |
| - | ''' | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | ; | + | |
| - | ; | + | |
| - | ; | + | |
| - | ; | + | |
| - | ;filesize (ULONG) : File size. | + | |
| - | ;filealloc (ULONG) : Allocated file size. | + | |
| - | ;fileattrib (USHORT) : Attributes of the file, defined in DosSetFileMode. | + | |
| - | ;length (UCHAR) : Length of the ASCIIZ name string. | + | |
| - | ; | + | |
| - | ; | + | * DirHandle |
| + | * ResultBuf | ||
| - | ; SearchCount (PUSHORT) - input/ | + | It is possible, if the EA information for a file is 64K, that the system can never be able to return the full EA information for a file. |
| + | |||
| + | For the continuation of an FileInfoLevel 3 search, this buffer should contain input in the same format as a DosFindFirst2 FileInfoLevel 3 search. | ||
| + | |||
| + | * filedate (FDATE) : Structure containing the date of file creation. | ||
| + | |||
| + | ^ Bit ^ Description ^ | ||
| + | | 15-9 | Year, in binary, of file creation | | ||
| + | | 8-5 | Month, in binary, of file creation | | ||
| + | | 4-0 | Day, in binary, of file creation | | ||
| + | |||
| + | * filetime (FTIME) : Structure containing the time of file creation. | ||
| + | |||
| + | ^ Bit ^ Description ^ | ||
| + | | 15-11 | Hours, in binary, of file creation | | ||
| + | | 10-5 | Minutes, in binary, of file creation | | ||
| + | | 4-0 | Seconds, in binary number of two-second increments, of file creation | | ||
| + | |||
| + | * fileaccessdate (FDATE) : Structure containing the date of last access. See FDATE in filedate. | ||
| + | * fileaccesstime (FTIME) : Structure containing the time of last access. See FTIME in filetime. | ||
| + | * writeaccessdate (FDATE) : Structure containing the date of last write. See FDATE in filedate. | ||
| + | * writeaccesstime (FTIME) : Structure containing the time of last write. See FTIME in filetime. | ||
| + | * filesize (ULONG) : File size. | ||
| + | * filealloc (ULONG) : Allocated file size. | ||
| + | * fileattrib (USHORT) : Attributes of the file, defined in DosSetFileMode. | ||
| + | * length (UCHAR) : Length of the ASCIIZ name string. | ||
| + | * matchfilename (CHAR) : ASCIIZ name string for the first occurrence of FileName. | ||
| + | |||
| + | * ResultBufLen (USHORT) - input : Length of ResultBuf | ||
| + | |||
| + | * SearchCount (PUSHORT) - input/ | ||
| + | |||
| + | ===== Return Code ===== | ||
| + | |||
| + | rc (USHORT) - return | ||
| - | ==Return Code== | ||
| - | rc (USHORT) - return | ||
| Return code descriptions are: | Return code descriptions are: | ||
| - | * 0 NO_ERROR | ||
| - | * 6 ERROR_INVALID_HANDLE | ||
| - | * 18 | ||
| - | * 26 | ||
| - | * 87 | ||
| - | * 111 ERROR_BUFFER_OVERFLOW | ||
| - | * 275 ERROR_EAS_DIDNT_FIT | ||
| - | ==Remarks== | + | * 0 NO_ERROR |
| + | * 6 ERROR_INVALID_HANDLE | ||
| + | * 18 | ||
| + | * 26 | ||
| + | * 87 | ||
| + | * 111 ERROR_BUFFER_OVERFLOW | ||
| + | * 275 ERROR_EAS_DIDNT_FIT | ||
| + | |||
| + | ===== Remarks ===== | ||
| The file name in FileName can contain global file name characters. If no more matching files are found, an error code is returned. | The file name in FileName can contain global file name characters. If no more matching files are found, an error code is returned. | ||
| Line 57: | Line 71: | ||
| In the case of ERROR_EAS_DIDNT_FIT, | In the case of ERROR_EAS_DIDNT_FIT, | ||
| - | ===Family API Considerations=== | + | ==== Family API Considerations ==== |
| Some options operate differently in the DOS mode than in OS/2 mode. Therefore, the following restriction applies to DosFindNext when coding for the DOS mode: | Some options operate differently in the DOS mode than in OS/2 mode. Therefore, the following restriction applies to DosFindNext when coding for the DOS mode: | ||
| | | ||
| - | ==Example Code== | + | ===== Example Code ===== |
| - | ===C Binding=== | + | |
| - | <PRE> | + | ==== C Binding ==== |
| + | |||
| + | <code c> | ||
| typedef struct _FDATE { /* fdate */ | typedef struct _FDATE { /* fdate */ | ||
| Line 106: | Line 123: | ||
| USHORT | USHORT | ||
| - | </PRE> | + | </code> |
| This example gets the 1st file in the current directory, and then gets the next file. | This example gets the 1st file in the current directory, and then gets the next file. | ||
| - | <PRE> | + | |
| + | <code c> | ||
| #define INCL_DOSFILEMGR | #define INCL_DOSFILEMGR | ||
| Line 136: | Line 154: | ||
| | | ||
| & | & | ||
| - | </PRE> | + | </code> |
| + | |||
| + | ==== MASM Binding ==== | ||
| - | ===MASM Binding=== | + | <code asm> |
| - | <PRE> | + | |
| FDATE struc | FDATE struc | ||
| Line 182: | Line 201: | ||
| Returns WORD | Returns WORD | ||
| - | </PRE> | + | </code> |
| - | ====== Note ====== | + | ===== Note ===== |
| Text based on [[http:// | Text based on [[http:// | ||




