FindVolumeClose function (fileapi.h)

Closes the specified volume search handle. The FindFirstVolume and FindNextVolume functions use this search handle to locate volumes.

Syntax

BOOL FindVolumeClose(
  [in] HANDLE hFindVolume
);

Parameters

[in] hFindVolume

The volume search handle to be closed. This handle must have been previously opened by the FindFirstVolume function.

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 FindVolumeClose function is called, the handle hFindVolume cannot be used in subsequent calls to either FindNextVolume or FindVolumeClose.

In Windows 8 and Windows Server 2012, this function is supported by the following technologies.

Technology Supported
Server Message Block (SMB) 3.0 protocol No
SMB 3.0 Transparent Failover (TFO) No
SMB 3.0 with Scale-out File Shares (SO) No
Cluster Shared Volume File System (CsvFS) Yes
Resilient File System (ReFS) Yes
 

SMB does not support volume management functions.

Examples

For an example, see Displaying Volume Paths.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header fileapi.h (include Windows.h)
Library Kernel32.lib
DLL Kernel32.dll

See also

FindFirstVolume

FindNextVolume

Mounted Folders

Volume Management Functions