https://bugs.winehq.org/show_bug.cgi?id=42446
--- Comment #49 from Stan markau0@lycos.com --- As far as I can tell, GetVolumePath does convert forward slash's to back slash's via collapse_path.
GetVolumePathNameW seems to be a separate case where forward slash's are getting through and not being covered by the current code.
The current GetVolumePathNameW gets a forward slash path name
"C:/Program Files/Native Instruments/Native Access/Native Access.exe"
and can't handle it and it returns
"C:\Program Files\Native Instruments\Native Access\Native Access.exe\"
whereas it should return
C:\
If GetVolumePathNameW gets a forward slash name
"C:\Program Files\Native Instruments\Native Access\Native Access.exe"
then it returns C:\ as expected.
So all that is needed in GetVolumePathNameW's case is to convert the forward slash's to back slash's at the start of GetVolumePathNameW and then GetVolumePathNameW can handle path names with back slash's and forward slash's.
Windows GetVolumePathNameW routine can handle forward slash's and back slash's and that means Wine's GetVolumePathNameW is not totally compatible with Windows GetVolumePathNameW.
If Windows GetVolumePathNameW gets a forward slash path name
"C:/Program Files/Native Instruments/Native Access/Native Access.exe"
then it returns C:\ whereas Wines current GetVolumePathNameW is returning "C:\Program Files\Native Instruments\Native Access\Native Access.exe\"
which causes GetVolumeInformation to return an error.