Windows 3.1 Device Drivers (ddag31qh.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
LFNFindFirst
◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
WORD LFNFindFirst(lpFileSpec, wAttr, lpnEntries, lphDir, cbBuffer,
lpFindBuf)
LPSTR lpFileSpec;
WORD wAttr;
LPINT lpnEntries;
LPINT lphDir;
WORD cbBuffer;
PFINDFILEBUF2 lpFindBuf;
The LFNFindFirst function searches for the first occurrence of a file
matching the specification in the lpFileSpec parameter.
Parameter Description
────────────────────────────────────────────────────────────────────────────
lpFileSpec Points to a null-terminated string specifying the name of a file
or files to search for.
wAttr Specifies what types of files (directories, hidden files, and so
on) should be included in the file enumeration. It is defined
the same way as the corresponding parameter to the MS-DOS Find
First File (Interrupt 21h, Function 4Eh) function.
lpnEntries Points to a 16-bit variable containing the maximum number of
files to return. Upon successful return, this 16-bit variable is
updated with the number of files actually returned in the
buffer.
lphDir Points to a 16-bit variable that receives a handle. The handle
is used on subsequent calls to the LFNFindNext function. This
handle can be freed using the LFNFindClose function.
cbBuffer Specifies the size (in bytes) of the structure pointed to by the
lpFindBuf parameter.
lpFindBuf Points to a FILEFINDBUF2 structure that receives information
about files.
Return Value
The return value is one of the following values.
Value Meaning
────────────────────────────────────────────────────────────────────────────
0 Success.
2 File not found.
3 Path not found.
18 No more files to be found.
Comments
The export ordinal for this function is 100.
See Also
LFNFindClose, LFNFindNext, FILEFINDBUF2
♦