Group: File System - Library: kernel32
Enumerating Volumes and Volume Mounting Points (NTFS)
BOOL GetVolumeNameForVolumeMountPoint(
LPCTSTR lpszVolumeMountPoint,
LPTSTR lpszVolumeName,
DWORD cchBufferLength
); DECLARE INTEGER GetVolumeNameForVolumeMountPoint IN kernel32;
STRING lpszVolumeMountPoint,;
STRING @lpszVolumeName,;
LONG cchBufferLength lpszVolumeMountPoint [in] Pointer to a string that contains either the path of a volume mount point with a trailing backslash () or a drive letter indicating a root directory in the form "D:".
lpszVolumeName [out] Pointer to a string that receives the volume name. This name is a unique volume name of the form "\?\Volume{GUID}" where GUID is the GUID that identifies the volume.
cchBufferLength [in] Length of the output buffer, in TCHARs. A reasonable size for the buffer to accommodate the largest possible volume name is 50 characters.
If the function succeeds, the return value is nonzero.
The lpszVolumeMountPoint parameter may be a drive letter with appended backslash (), such as "D:". Alternatively, it may be a path to a volume mount point, again with appended backslash (), such as "c:\mnt\edrive".
Home