Export (0) Print
Expand All

FindNextVolume function

Continues a volume search started by a call to the FindFirstVolume function. FindNextVolume finds one volume per call.

Syntax


BOOL WINAPI FindNextVolume(
  _In_   HANDLE hFindVolume,
  _Out_  LPTSTR lpszVolumeName,
  _In_   DWORD cchBufferLength
);

Parameters

hFindVolume [in]

The volume search handle returned by a previous call to the FindFirstVolume function.

lpszVolumeName [out]

A pointer to a string that receives the volume GUID path that is found.

cchBufferLength [in]

The length of the buffer that receives the volume GUID path, in TCHARs.

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. If no matching files can be found, the GetLastError function returns the ERROR_NO_MORE_FILES error code. In that case, close the search with the FindVolumeClose function.

Remarks

After the search handle is established by calling FindFirstVolume, you can use the FindNextVolume function to search for other volumes.

You should not assume any correlation between the order of the volumes that are returned by these functions and the order of the volumes that are on the computer. In particular, do not assume any correlation between volume order and drive letters as assigned by the BIOS (if any) or the Disk Administrator.

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

TechnologySupported

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

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

FileAPI.h (include Windows.h);
WinBase.h on Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

Unicode and ANSI names

FindNextVolumeW (Unicode) and FindNextVolumeA (ANSI)

See also

FindFirstVolume
FindVolumeClose
Volume Management Functions
Mounted Folders

 

 

Community Additions

ADD
Show:
© 2014 Microsoft