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.
DosFindClose (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_DOSFILEMGR
USHORT DosFindClose(hdir)
HDIR hdir; /* handle of search directory */
The DosFindClose function closes the specified search-directory handle. The
DosFindFirst and DosFindNext functions use the search-directory handle to
locate files with names that match a given name.
The DosFindClose function is a family API function.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hdir Identifies the search directory. This handle must have been
previously opened by using the DosFindFirst function.
Return Value
The return value is zero if the function is successful. Otherwise, it is an
error value, which may be the following:
ERROR_INVALID_HANDLE
Example
This example calls the DosFindFirst function to find all files that match
"*.*". When DosFindFirst is finished, the handle is closed by calling the
DosFindClose function.
HDIR hdir = 0xFFFF;
USHORT usSearchCount = 1;
FILEFINDBUF findbuf;
DosFindFirst("*.*", &hdir, FILE_NORMAL, &findbuf,
sizeof(findbuf), &usSearchCount, 0L);
.
.
.
DosFindClose(hdir); /* closes the search directory */
See Also
DosFindFirst, DosFindNext, DosSearchPath
♦