Click to Rate and Give Feedback
MSDN
MSDN Library
System Services
File Services
File Systems
File Management
 FindClose Function

  Switch on low bandwidth view
FindClose Function

Closes a file search handle opened by the FindFirstFile, FindFirstFileEx, or FindFirstStreamW function.

Syntax

C++
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 clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinBase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll

See Also

File Management Functions
FindFirstFile
FindFirstFileEx
FindFirstStreamW
FindNextFile
FindNextStreamW

Send comments about this topic to Microsoft

Build date: 7/9/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
vb.net syntax      dmex   |   Edit   |   Show History
<DllImport("kernel32.dll", CharSet:=CharSet.Unicode, SetLastError:=True)> _
Public Shared Function FindClose(<[In]> ByVal handle As Integer) As <MarshalAs(UnmanagedType.Bool)> Boolean
End Function
Flag as ContentBug
C# Syntax      dmex   |   Edit   |   Show History
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("kernel32.dll", CharSet=CharSet.Unicode, SetLastError=true)]
public static extern bool FindClose([In] Integer handle);
Tags What's this?: c# (x) syntax (x) Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker