Is there a Windows API function to extract the drive letter from a Windows path such as
U:\path\to\file.txt
\\?\U:\path\to\file.txt
while correctly sorting out
relative\path\to\file.txt:alternate-stream
etc?
PathGetDriveNumber returns 0 through 25 (corresponding to 'A' through 'Z') if the path has a drive letter, or -1 otherwise.