Skip to content

Latest commit

 

History

History
56 lines (36 loc) · 1.38 KB

FindFirstVolume.md

File metadata and controls

56 lines (36 loc) · 1.38 KB

Home

Function name : FindFirstVolume

Group: File System - Library: kernel32


Returns the name of a volume on a computer. This call is used to begin scanning the volumes of a computer.


Code examples:

Enumerating Volumes and Volume Mounting Points (NTFS)

Declaration:

HANDLE FindFirstVolume(
	LPTSTR lpszVolumeName,
	DWORD cchBufferLength
);
  

FoxPro declaration:

DECLARE INTEGER FindFirstVolume IN kernel32;
	STRING lpszVolumeName,;
	LONG cchBufferLength
  

Parameters:

lpszVolumeName [out] Pointer to a buffer that receives a null-terminated string that specifies the unique volume name of the first volume found.

cchBufferLength [in] Length of the buffer to receive the name, in TCHARs.


Return value:

If the function fails to find any volumes, the return value is the INVALID_HANDLE_VALUE error code.


Comments:

If the function succeeds, the return value is a search handle used in a subsequent call to the FindNextVolume and FindVolumeClose functions.

See also: FindFirstVolumeMountPoint, GetVolumeInformation.