How to transfer path '\Device\BootDevice' to drive format

When I retrieve system root path from ‘\SystemRoot’ by using function ZwQuerySymbolicLinkObject,
I got '\Device\BootDevice\Windows' in Windows 10.
Can anyone tell me how to change ‘\Device\BootDevice\Windows’ to drive letter, such as ‘C:\Windows’
Thanks~

Not exactly what you asked, but are you aware of IoQueryFileDosDeviceName ?

@rod_widdowson said:
Not exactly what you asked, but are you aware of IoQueryFileDosDeviceName ?

Thanks for your advice, rod_widdowson, I will try that~

I found that if I query it one more time I can get volume format, and then use IoVolumeDeviceToDosName could get drive letter.
That is,
‘\SystemRoot’ ====(ZwQuerySymbolicLinkObject)===> ‘\Device\BootDevice’ ====(ZwQuerySymbolicLinkObject)===>
‘\Device\HarddiskVolume3’ ====(IoVolumeDeviceToDosName)===> 'C:'

Thanks all!