I am working on a application in VC++ where network drives are used to access files. The drives are assigned manually by the users and then select the drive in the application. This results in drives not always being mapped to the same servers.
How would I go about obtaining the UNC path to such a file? This is mostly for identification purposes.
Suggest you use WNetGetConnection.
API description is here: http://msdn.microsoft.com/en-us/library/windows/desktop/aa385453(v=vs.85).aspx
here's the function I use to convert a normal path to an UNC path: