Platform SDK: DirectX

DirectPlay4.DestroyGroup

The DirectPlay4.DestroyGroup method deletes a group from the session.

object.DestroyGroup(GroupId As Long) 

Parameters

object
Object expression that resolves to a DirectPlay4 object.
GroupId
ID of the group being removed from the game.

Error Codes

If the method fails, an error is raised and Err.Number may be set to one of the following values:

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 DPSYS_DELETEPLAYERFROMGROUP system message for each player in the group, and then a DPSYS_DESTROYPLAYERORGROUP system message.

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

The ID belonging to this group will not be reused during the current session.

See Also

DirectPlay4.CreateGroup