PeerGroupGetEventData function (p2p.h)

The PeerGroupGetEventData function allows an application to retrieve the data returned by a grouping event.

Syntax

NOT_BUILD_WINDOWS_DEPRECATE HRESULT PeerGroupGetEventData(
  [in]  HPEEREVENT             hPeerEvent,
  [out] PPEER_GROUP_EVENT_DATA *ppEventData
);

Parameters

[in] hPeerEvent

Handle obtained from a previous call to PeerGroupRegisterEvent. This parameter is required.

[out] ppEventData

Pointer to a PEER_GROUP_EVENT_DATA structure that contains data about the peer event. This data structure must be freed after use with PeerFreeData. This parameter is required.

Return value

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

Return code Description
E_INVALIDARG
One of the parameters is not valid.
PEER_S_NO_EVENT_DATA
The call is successful, but there is no event data available.
 

Cryptography-specific errors can be returned from the Microsoft RSA Base Provider. These errors are prefixed with CRYPT_* and defined in Winerror.h.

Remarks

When an event occurs for which a peer has requested notification, the corresponding peer event handle is signaled. The peer calls this method until PEER_GROUP_EVENT_DATA structures are retrieved. Each data structure contains the following two key pieces of data:

  • The registration associated with a peer event.
  • The actual data for a peer event.

Requirements

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

See also

PEER_GROUP_EVENT_DATA

PeerFreeData

PeerGroupRegisterEvent