FindNextVolumeW function (fileapi.h)
Continues a volume search started by a call to the FindFirstVolume function. FindNextVolume finds one volume per call.
BOOL FindNextVolumeW( [in] HANDLE hFindVolume, [out] LPWSTR lpszVolumeName, [in] DWORD cchBufferLength );
The volume search handle returned by a previous call to the FindFirstVolume function.
A pointer to a string that receives the volume GUID path that is found.
The length of the buffer that receives the volume GUID path, in TCHARs.
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.
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.
|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.
For an example, see Displaying Volume Paths.
|Minimum supported client||Windows XP [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|
|Header||fileapi.h (include Windows.h)|