IDirectPlay3::CreateGroupInGroup
Creates a group within an existing group. A group created within another group can only be enumerated using the IDirectPlay3::EnumGroupsInGroup method. A group created this way can be destroyed by calling the IDirectPlay3::DestroyGroup method.
HRESULT CreateGroupInGroup(
DPID idParentGroup,
LPDPID lpidGroup,
LPDPNAME lpGroupName,
LPVOID lpData,
DWORD dwDataSize,
DWORD dwFlags
);
Parameters
idParentGroup
The DPID of the group within which a group will be created. Must be an already existing group.
lpidGroup
Pointer to the DPID that will be filled in with the DirectPlay group ID of the created group.
lpGroupName
Pointer to a DPNAME structure that holds the name of the group to be created. NULL indicates that the group has no initial name.
lpData
Pointer to a block of application-defined remote data to associate initially with the group ID. NULL indicates that the group has no initial data. The data specified here is assumed to be remote data that will be propagated to all the other applications in the session as if the IDirectPlay3::SetGroupData method had been called.
dwDataSize
Size, in bytes, of the data block that the lpData parameter points to.
dwFlags
Flag indicating what type of group to create. Default (dwFlags = 0) is a normal group.
DPGROUP_STAGINGAREA - the group can be used to launch DirectPlay sessions using the IDirectPlay3::StartSession method.
Return Values
Returns DP_OK if successful, or one of the following error values otherwise:
This method returns DPERR_CANTADDPLAYER if the group could not be created. It returns DPERR_INVALIDGROUP if the parent group ID is invalid.
Remarks
A DPMSG_CREATEPLAYERORGROUP system message is generated to inform players of this change.
See Also
IDirectPlay3::DestroyGroup, IDirectPlay3::EnumGroupsInGroup, DPMSG_CREATEPLAYERORGROUP