GetVolumePathName function kernel32
Retrieves the volume mount point where the specified path is mounted.
To learn more, see learn.microsoft.com/windows/win32/api/fileapi/nf-fileapi-getvolumepathnamew.
Implementation
Win32Result<bool> GetVolumePathName(
PCWSTR lpszFileName,
PWSTR lpszVolumePathName,
int cchBufferLength,
) {
resolveGetLastError();
final result_ = _GetVolumePathName(
lpszFileName,
lpszVolumePathName,
cchBufferLength,
);
return .new(value: result_ != FALSE, error: GetLastError());
}