I want to get the location of a directory/folder by its ID.
For example, the Downloads folder has the ID knownfolder:{374DE290-123F-4565-9164-39C4925E467B}, when I enter it into the address bar of windows explorer, it redirects my to the downloads folder.
There is a list of these IDs and the corresponding folders here, so I could hardcode the IDs and look them up like this, but I wouldnt want to do this unless its the only way.
Is there another way to properly get what I want?

Stolen from here. Looking at this further, the only way to do it is using a WinAPI/PInvoke
And you could then call something like this: