Platform SDK: Windows Networking

REMOTE_NAME_INFO

The REMOTE_NAME_INFO structure contains path and name information for a network resource. The structure contains a member that points to a Universal Naming Convention (UNC) name string for the resource, and two members that point to additional network connection information strings.

typedef struct _REMOTE_NAME_INFO { 
    LPTSTR  lpUniversalName; 
    LPTSTR  lpConnectionName; 
    LPTSTR  lpRemainingPath; 
} REMOTE_NAME_INFO; 

Members

lpUniversalName
Pointer to the null-terminated UNC name string that identifies a network resource.
lpConnectionName
Pointer to a null-terminated string that is the name of a network connection. For more information, see the following Remarks section.
lpRemainingPath
Pointer to a null-terminated name string. For more information, see the following Remarks section.

Remarks

The REMOTE_NAME_INFO structure contains a pointer to a Universal Naming Convention (UNC) name string. A UNC path identifies a network resource in an unambiguous, computer-independent manner. You can pass the path to processes on other computers, allowing those processes to obtain access to the network resource.

UNC names look like this:

\\servername\sharename\path\file 
 

In addition, if you pass the value of the lpConnectionName member to the WNetAddConnection2 function, it enables you to connect a local device to a network resource. You can do this by passing the value of lpConnectionName in the lpRemoteName member of the NETRESOURCE structure pointed to by the function's lpNetResource parameter.

If you append the string pointed to by the lpRemainingPath member of REMOTE_NAME_INFO to the local device string, you can pass the resulting string to Win32 functions that require a drive-based path.

Requirements

  Windows NT/2000: Requires Windows NT 3.51 or later.
  Header: Declared in Npapi.h.

See Also

Windows Networking (WNet) Overview, Windows Networking Structures, WNetAddConnection2, NETRESOURCE, UNIVERSAL_NAME_INFO