win32wnet.WNetGetUniversalName
string/tuple = WNetGetUniversalName(localPath, infoLevel )
Takes a drive-based path for a network resource and returns an information structure that contains a more universal form of the name.
Parameters
For example, if drive H has been mapped to a network drive share, and the network resource of interest is a file named SAMPLE.DOC in the directory \\WIN32\\EXAMPLES on that share, the drive-based path is H:\\WIN32\\EXAMPLES\\SAMPLE.DOC.
Value | Meaning |
UNIVERSAL_NAME_INFO_LEVEL (=1) | The function returns a simple string with the UNC name. |
REMOTE_NAME_INFO_LEVEL (=2) | The function returns a tuple based in the Win32 REMOTE_NAME_INFO data structure. |
Return Value
If the infoLevel parameter is REMOTE_NAME_INFO_LEVEL, the result is a tuple of 3 strings: (UNCName, connectionName, remainingPath)