PeerCollabEnumApplicationRegistrationInfo function (p2p.h)

The PeerCollabEnumApplicationRegistrationInfo function obtains the enumeration handle used to retrieve peer application information.


NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerCollabEnumApplicationRegistrationInfo(
  [out] HPEERENUM                          *phPeerEnum


[in] registrationType

A PEER_APPLICATION_REGISTRATION_TYPE value that specifies whether the peer's application is registered to the current user or all users of the peer's machine.

[out] phPeerEnum

Pointer to a peer enumeration handle for the peer application registration information. This data is obtained by passing this handle to PeerGetNextItem.

Return value

Returns S_OK if the function succeeds. Otherwise, the function returns one of the following values.

Return code Description
There is not enough memory to support this operation.
One of the arguments is invalid.
The Windows Peer infrastructure is not initialized. Calling the relevant initialization function is required.


To obtain the individual peer applications, pass the returned handle to PeerGetNextItem. An array of PEER_APPLICATION_REGISTRATION_INFO structures will be returned. To close the enumeration and release the resources associated with it, pass this handle to PeerEndEnumeration. Individual items returned by the enumeration must be released with PeerFreeData.

An application is a set of software or software features available on the peer's endpoint. Commonly, this refers to software packages that support peer networking activities, like games or other collaborative applications.

A peer's application has a GUID representing a single specific application. When an application is registered for a peer, this GUID and the corresponding application can be made available to all trusted contacts of the peer, indicating the activities the peer can participate in. To unregister a peer's application, call PeerCollabUnregisterApplication with this GUID.

Peer application registration information items are returned as individual PEER_APPLICATION_REGISTRATION_INFO structures.


Minimum supported client Windows Vista [desktop apps only]
Minimum supported server None supported
Target Platform Windows
Header p2p.h
Library P2P.lib
DLL P2P.dll

See also



Peer Collaboration API Functions