Retrieves the name of a volume on a computer. FindFirstVolume is used to begin scanning the volumes of a computer.
HANDLE FindFirstVolumeW( LPWSTR lpszVolumeName, DWORD cchBufferLength );
A pointer to a buffer that receives a null-terminated string that specifies a volume GUID path for the first volume that is found.
The length of the buffer to receive the volume GUID path, in TCHARs.
If the function fails to find any volumes, the return value is the INVALID_HANDLE_VALUE error code. To get extended error information, call GetLastError.
The FindFirstVolume function opens a volume search handle and returns information about the first volume found on a computer. After the search handle is established, you can use the FindNextVolume function to search for other volumes. When the search handle is no longer needed, close it by using the FindVolumeClose function.
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)|