IDirectPlay::AddPlayerToGroup

HRESULT AddPlayerToGroup(DPID pidGroup, DPID pidPlayer);

Adds an existing player to an existing group.

·Returns DP_OK if successful, or one of the following error values otherwise:

DPERR_GENERIC DPERR_INVALIDOBJECT
DPERR_INVALIDPLAYER  

pidGroup

ID of the group to be augmented.

pidPlayer

ID of the player to be added to the group.

A DPMSG_GROUPADD system message is automatically generated to inform other players that the specified player has been added. Groups cannot be added to other groups, but players can be members of multiple groups. The IDirectPlay::AddPlayerToGroup method will generate an error if the player is already a member of the group.