Platform SDK: DirectX

IDirectPlay4::DestroyGroup

The IDirectPlay4::DestroyGroup method deletes a group from the session. The ID belonging to this group will not be reused during the current session.

HRESULT DestroyGroup(
  DPID idGroup
);

Parameters

idGroup
The ID of the group being removed from the game.

Return Values

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

DPERR_CONNECTIONLOST
DPERR_INVALIDGROUP
DPERR_INVALIDOBJECT
DPERR_INVALIDPARAMS
DPERR_INVALIDPLAYER

Remarks

It is not necessary to empty a group before deleting it. The individual players belonging to the group are not destroyed. This method will generate a DPMSG_DELETEPLAYERFROMGROUP system message for each player in the group, and then a DPMSG_DESTROYPLAYERORGROUP system message. For a list of system messages, see Using System Messages.

Any application can destroy any group even if the group was not created locally.

Requirements

  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.

See Also

IDirectPlay4::CreateGroup, DPMSG_DESTROYPLAYERORGROUP