>I have a function to get UNC (drive letter changed to) using
>an Win32API function WNetGetConnection. This time, I want to do
>the reverse, meaning get drive letter from UNC. Which API to use?
You can't, since no drive letter is automatically associated with a UNC. You can spin through each drive and determine the UNC for that drive, and decide whether your UNC is derivable based on the present mapping of the drive, or can map a UNC to a specific drive using WNetAddConnection() or the WSH Wscript.Network's MapNetworkDrive method, or any of about a dozen other options.