Microsoft DirectX 9.0

IDirectPlay8Peer::EnumGroupMembers Method

Retrieves a list of all players in a group.


HRESULT EnumGroupMembers(      

    const DPNID dpnid,     DPNID *const prgdpnid,     DWORD *const pcdpnid,     const DWORD dwFlags );


[in] Variable of type DPNID that specifies the group that contains the players to enumerate.
[out] Pointer to an array that will contain the identifiers of the group's players.
[in] Pointer to a variable of type DWORD that specifies the number of identifiers that can be contained in the buffer pointed to by dpnid. If the buffer is too small, this method returns DPNERR_BUFFERTOOSMALL and this parameter contains the number of entries that are required.
[in] Reserved. Must be 0.

Return Value

Returns S_OK if successful, or one of the following error values.

DPNERR_BUFFERTOOSMALLThe supplied buffer is not large enough to contain the requested data.
DPNERR_INVALIDFLAGSThe flags passed to this method are invalid.
DPNERR_INVALIDGROUPThe group ID is not recognized as a valid group ID for this game session.


Because player information changes frequently, the required buffer size returned may change between subsequent calls. Check and reallocate the buffer until the method succeeds.

© 2002 Microsoft Corporation. All rights reserved.