IDirectPlay2::AddPlayerToGroup

HRESULT AddPlayerToGroup(DPID idGroup, DPID idPlayer);

Adds an existing player to an existing group.

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

DPERR_CANTADDPLAYER

DPERR_INVALIDOBJECT

DPERR_INVALIDPLAYER

idGroup

Group ID of the group to be augmented.

idPlayer

Player ID of the player to be added to the group.

Groups cannot be added to other groups, but players can be members of multiple groups. DPSYS_ADDPLAYERTOGROUP system message will be generated and sent to all the other players. For a list of system messages, see Using System Messages.