Platform SDK: DirectX |
The IDirectPlay4::AddPlayerToGroup method adds 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 IDirectPlay4::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 );
Returns DP_OK if successful, or one of the following error values otherwise:
DPERR_CANTADDPLAYER |
DPERR_CONNECTIONLOST |
DPERR_INVALIDGROUP |
DPERR_INVALIDPLAYER |
DPERR_NOSESSIONS |
This method returns DPERR_INVALIDPLAYER if idPlayer is not a player ID or if the ID is not for a local player.
A DPMSG_ADDPLAYERTOGROUP system message will be generated and sent to all the other players.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in dplay.h.
Import Library: Use dplayx.lib.
IDirectPlay4::CreateGroup, IDirectPlay4::DeletePlayerFromGroup, DPMSG_ADDPLAYERTOGROUP