Platform SDK: DirectX |
The DirectPlay4.CreateGroupInGroup method creates a group within an existing group. A group created within another group can be enumerated only by using the DirectPlay4.GetDPEnumGroupsInGroup method. A group created this way can be destroyed by calling the DirectPlay4.DestroyGroup method.
object.CreateGroupInGroup(parentid As Long, friendlyName As String, formalName As String, flags As CONST_DPGROUPFLAGS) As Long
Returns the created group's DirectPlay ID.
If the method fails, an error is raised and Err.Number may be set to one of the following values:
DPERR_CANTADDPLAYER |
DPERR_CONNECTIONLOST |
DPERR_INVALIDFLAGS |
DPERR_INVALIDGROUP |
DPERR_INVALIDPARAMS |
This method returns DPERR_CANTADDPLAYER if the group could not be created. It returns DPERR_INVALIDGROUP if the parent group ID is invalid.
If the group is created in a client/server session, no group notification messages are sent. Groups are only visible on the computer that created them, regardless of whether the computer is the client or the host.
If the group is created in a peer-to-peer session, CreateGroupInGroup will generate a DPSYS_CREATEPLAYERORGROUP system message generated to inform players of this change.
If you destroy a top-level group, any member groups it contains are destroyed as well, and the appropriate destruction messages are sent.