Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The PeerCollabEnumApplications function returns the handle to an enumeration that contains the applications registered to a specific peer's endpoint(s).
NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerCollabEnumApplications(
[in, optional] PCPEER_ENDPOINT pcEndpoint,
[in, optional] const GUID *pApplicationId,
[out] HPEERENUM *phPeerEnum
);
[in, optional] pcEndpoint
Pointer to a PEER_ENDPOINT structure that contains the endpoint information for a peer whose applications will be enumerated.
If this parameter is set to NULL, the published application information for the local peer's endpoint is enumerated.
[in, optional] pApplicationId
Pointer to the GUID value that uniquely identifies a particular application of the supplied peer. If this parameter is supplied, the only peer application returned is the one that matches this GUID.
[out] phPeerEnum
Pointer to the handle for the enumerated set of registered applications that correspond to the GUID returned in pObjectId. Pass this handle to PeerGetNextItem to obtain each item in the enumerated set.
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. |
In order to enumerate the applications for the specified endpoint successfully, application data must be available on the endpoint. For application data to be available, one of the following must occur:
To obtain the individual peer applications, pass the returned handle to PeerGetNextItem. 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.
Peer application data items are returned as individual PEER_APPLICATION structures.
The PeerCollabEnumApplications function returns an empty array for endpoints on the subnet that are not trusted contacts.
Requirement | Value |
---|---|
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 |
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today