This call finds the first file object or group of file objects whose name(s) match the specification.
DosFindFirst
FileName (PSZ) - input
Value
The DosFindFirst handle is used with subsequent DosFindNext requests. Reuse of this handle in another DosFindFirst closes the association with the previous DosFindFirst and opens a new association.
Bit
filedate (FDATE)
Bit
Bit
DosFindFirst returns directory entries (up to the number requested in SearchCount) for as many files or subdirectories whose names and attributes match the specification and whose information fits in ResultBuf. On output, SearchCount contains the actual number of directory entries returned.
DosFindNext uses the directory handle associated with DosFindFirst to continue the search started by the DosFindFirst request.
Any non-zero return code indicates no handle has been allocated, including such non-error indicators as ERROR_NO_MORE_FILES.
DosQSysInfo is called by an application to determine the maximum path length allowed by OS/2.
For programs running without the NEWFILES bit set, only 8.3 filename format names are returned. These names are changed to uppercase.
Family API Considerations
Some options operate differently in the DOS mode than in OS/2 mode. Therefore, the following restrictions apply to DosFindFirst when coding for the DOS mode:
DirHandle must always equal hex 0001H or FFFFH on the initial call to DosFindFirst. Subsequent calls to DosFindFirst must have a DirHandle of hex 0001H unless a DosFindClose had been issued. In this case, 0001H or FFFFH is allowed.