GetVolumeNameForVolumeMountPoint

[DllImport("Kernel32.dll", SetLastError = true)][return: MarshalAs(UnmanagedType.Bool)]
public static extern bool GetVolumeNameForVolumeMountPoint(
   string lpszVolumeMountPoint,
   StringBuilder lpszVolumeName,
   uint cchBufferLength
);

Microsoft documentation: Link

Last updated