PeerIdentityGetFriendlyName function (p2p.h)

The PeerIdentityGetFriendlyName function returns the friendly name of the peer identity.

Syntax

NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerIdentityGetFriendlyName(
  [in]  PCWSTR pwzIdentity,
  [out] PWSTR  *ppwzFriendlyName
);

Parameters

[in] pwzIdentity

Specifies the peer identity to obtain a friendly name.

[out] ppwzFriendlyName

Receives a pointer to the friendly name. When ppwzFriendlyName is not required anymore, the application is responsible for freeing this string by calling PeerFreeData.

Return value

If the function call succeeds, the return value is S_OK. Otherwise, it returns one of the following values.

Return code Description
E_INVALIDARG
One of the parameters is not valid.
E_OUTOFMEMORY
There is not enough memory to perform the specified operation.
PEER_E_NO_KEY_ACCESS
Access to the peer identity or peer group keys is denied. Typically, this is caused by an incorrect access control list (ACL) for the folder that contains the user or computer keys. This can happen when the ACL has been reset manually.
PEER_E_NOT_FOUND
A peer identity that matches the specified name cannot be found.

Requirements

Requirement Value
Minimum supported client Windows XP with SP2 [desktop apps only],Windows XP with SP1 with the Advanced Networking Pack for Windows XP
Minimum supported server None supported
Target Platform Windows
Header p2p.h
Library P2P.lib
DLL P2P.dll

See also

PeerFreeData

PeerIdentitySetFriendlyName