NPGetUniversalName

This function returns the name used to access a directory or file on a redirected local device from the network. Its primary use is to return the information for directories that are part of a distributed file store (DFS), which are redirected from a directory below the root of the associated local device. Providers that do not support this type of feature do not have to support this function, as MPR provides default behavior for this case.

DWORD NPGetUniversalName(
  LPTSTR  lpLocalPath,
  DWORD   dwInfoLevel,
  LPVOID  lpBuffer,
  LPDWORD lpBufferSize
  );
 
lpLocalPath
Contains the local path to an object on a network resource. This path is a drive-based path.
dwInfoLevel
The level of detail of information the caller is interested in as described above. This may have the value UNIVERSAL_NAME_INFO_LEVEL or REMOTE_NAME_INFO_LEVEL, depending upon the level of information required.
lpBuffer
Points to a buffer to receive the information the user has requested. The buffer contains a UNIVERSAL_NAME_INFO structure or a REMOTE_NAME_INFO structure (depending upon the value of dwInfoLevel), followed by the return data pointed to from within the structure. The structures returned are described below.
lpBufferSize
This is used to specify the size, in bytes, of the buffer passed in. If the call fails because the buffer is not big enough, this location will be used to return the required buffer size.
WN_BAD_LOCALNAME lpLocalPath does not start with a valid redirected local disk device name.
WN_BAD_LEVEL dwInfoLevel is not set to a valid value.
WN_NOT_CONNECTED lpLocalPath is not a connected network resource.
WN_MORE_DATA lpBuffer is not a large enough buffer to return the result. lpBufferSize is returned with the required buffer size.
WN_NO_NETWORK The network is not present.

The structures that can be returned have the following format: UNIVERSAL_NAME_INFO and REMOTE_NAME_INFO.