PeerEnumIdentities function (p2p.h)
The PeerEnumIdentities function creates and returns a peer enumeration handle used to enumerate all the peer identities that belong to a specific user.
Syntax
NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerEnumIdentities(
[out] HPEERENUM *phPeerEnum
);
Parameters
[out] phPeerEnum
Receives a handle to the peer enumeration that contains the list of peer identities, with each item represented as a pointer to a PEER_NAME_PAIR structure. Pass this handle to PeerGetNextItem to retrieve the items; when finished, call PeerEndEnumeration to release the memory.
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. |
Remarks
Once the application has obtained the peer enumeration handle, use PeerGetNextItem and PeerGetItemCount to enumerate the peer identities.
When enumerating peer identities, PeerGetNextItem returns an array of pointers to PEER_NAME_PAIR structures.
Call PeerEndEnumeration to free the enumeration handle when it is no longer required.
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 |