DosFindNext
Bindings: C, MASM
This call locates the next set of directory entries that match the name
specified in the previous DosFindFirst, DosFindFirst2, or DosFindNext
call.
DosFindNext (DirHandle, ResultBuf, ResultBufLen, SearchCount)
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.
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/output
Address of the number of matching entries requested in ResultBuf. On
return, this field contains the number of entries placed into
ResultBuf.
rc (USHORT) - return
Return code descriptions are:
0 NO_ERROR
6 ERROR_INVALID_HANDLE
18 ERROR_NO_MORE_FILES
26 ERROR_NOT_DOS_DISK
87 ERROR_INVALID_PARAMETER
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.
If an ERROR_BUFFER_OVERFLOW error is returned, further calls to
DosFindNext will start the search from the same entry.
If an ERROR_EAS_DIDNT_FIT error is returned, then the buffer was too
small to hold the EAs for the first matching entry being returned. A
subsequent call to DosFindNext will get the next matching entry. This
enables the search to continue if the EAs being returned are too big to
fit in the buffer. You may use DosQPathInfo to retrieve the EAs for the
matching entry by using the EA arguments that were used for the
DosFindFirst2 call and the name that was returned by DosFindFirst2.
In the case of ERROR_EAS_DIDNT_FIT, only information for the first
matching entry is returned. This entry is the one whose EAs did not fit
in the buffer. The information returned is in the format of that returned
for InfoLevel 2. No further entries are returned in the buffer even if
they could fit in the remaining space.
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:
o DirHandle must always equal 1.
Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs