PeerIdentitySetFriendlyName function (p2p.h)
The PeerIdentitySetFriendlyName function modifies the friendly name for a specified peer identity. The friendly name is the human-readable name.
Syntax
NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerIdentitySetFriendlyName(
[in] PCWSTR pwzIdentity,
[in] PCWSTR pwzFriendlyName
);
Parameters
[in] pwzIdentity
Specifies a peer identity to modify.
[in] pwzFriendlyName
Specifies a new friendly name. Specify NULL or an empty string to reset a friendly name to the default value, which is the Unicode version of the peer name.
Return value
If the function call succeeds, the return value is S_OK. Otherwise, it returns one of the following values.
Return code | Description |
---|---|
|
One of the parameters is not valid. |
|
There is not enough memory to perform the specified operation. |
|
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. |
|
A peer identity that matches a 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 |