Closes a file search handle opened by the FindFirstFile, FindFirstFileEx,
or
FindFirstStreamW function.
Syntax
BOOL WINAPI FindClose(
__inout HANDLE hFindFile
);
Parameters
- hFindFile [in, out]
-
The file search handle.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call
GetLastError.
Remarks
After the
FindClose function is called, the handle specified by the hFindFile parameter cannot be used in subsequent calls to the FindNextFile, FindNextStreamW, or
FindClose function.
Examples
For an example, see
Listing the Files in a Directory.
Requirements
| Minimum supported client | Windows 2000 Professional |
| Minimum supported server | Windows 2000 Server |
| Header | WinBase.h (include Windows.h) |
| Library | Kernel32.lib |
| DLL | Kernel32.dll |
See Also
- File Management Functions
- FindFirstFile
- FindFirstFileEx
- FindFirstStreamW
- FindNextFile
- FindNextStreamW
Send comments about this topic to Microsoft
Build date: 7/9/2009