DirectPlay Animated Header -- IDirectPlay3::AddPlayerToGroup DirectPlay Animated Header -- IDirectPlay3::AddPlayerToGroup* Microsoft DirectPlay SDK
*Index  *Topic Contents
*Previous Topic: IDirectPlay3::AddGroupToGroup
*Next Topic: IDirectPlay3::Close


IDirectPlay3::AddPlayerToGroup


IDirectPlay3 Interface

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:

DPERR_CANTADDPLAYER
DPERR_INVALIDGROUP
DPERR_INVALIDPLAYER
DPERR_NOSESSIONS

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

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.

*Top of Page