NPGetUniversalName function

Retrieves the universal name of a network resource. The NPGetUniversalName function can retrieve this universal name in UNC format or in the older, remote-name format.

Syntax


DWORD NPGetUniversalName(
  _In_    LPCTSTR lpLocalPath,
  _In_    DWORD   dwInfoLevel,
  _Out_   LPVOID  lpBuffer,
  _Inout_ LPDWORD lpBufferSize
);

Parameters

lpLocalPath [in]

Pointer to the local path of an object on a network resource. This is a drive-based path.

dwInfoLevel [in]

The level of detail of information the caller is interested in. This can be one of the following values.

ValueMeaning
UNIVERSAL_NAME_INFO_LEVEL

Retrieves the UNC form of the name, for example: "file:\\server\share"

If this value is set, the data returned in lpBuffer is stored as a UNIVERSAL_NAME_INFO structure.

REMOTE_NAME_INFO_LEVEL

Retrieves the remote form of the name, for example: "\\server\share"

If this value is set, the data returned in lpBuffer is stored as a REMOTE_NAME_INFO structure.

 

lpBuffer [out]

Pointer to a buffer to receive the information the user has requested. The specific structure returned depends on the information level specified in dwInfoLevel.

lpBufferSize [in, out]

Pointer to the size, in bytes, of the lpBuffer buffer. If the call fails because the buffer is not big enough, this location will be used to return the required buffer size.

Return value

If the function succeeds, it should return WN_SUCCESS. Otherwise, it should return an error code, which may be one of the following.

Return codeDescription
WN_BAD_LOCALNAME

The value passed into lpLocalPath is not valid.

WN_NOT_CONNECTED

The value passed into lpLocalPath is not a redirected device.

WN_MORE_DATA

The buffer is too small.

WN_NO_NETWORK

The network is not present.

 

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Npapi.h

 

 

Show: