IDirectPlay3::AddPlayerToGroup
Add a player to an existing group. A player can be a member of multiple groups. Groups cannot be added to other groups using this API (see IDirectPlay3::AddGroupToGroup). An application can add any player to any group (including players and groups that weren't created locally).
HRESULT AddPlayerToGroup(
DPID idGroup,
DPID idPlayer
);
Parameters
idGroup
Group ID of the group to be augmented.
idPlayer
Player ID of the player to be added to the group.
Return Values
Returns DP_OK if successful, or one of the following error values otherwise:
This method returns DPERR_INVALIDPLAYER if the player DPID is not a player id or if the id is not for a local player.
Remarks
A DPMSG_ADDPLAYERTOGROUP system message will be generated and sent to all the other players.
See Also
IDirectPlay3::CreateGroup, IDirectPlay3::DeletePlayerFromGroup, DPMSG_ADDPLAYERTOGROUP