Index Topic Contents | |||
Previous Topic: IDirectPlay3::CreateGroup Next Topic: IDirectPlay3::CreatePlayer |
IDirectPlay3::CreateGroupInGroup
IDirectPlay3 InterfaceCreates 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:
- DPERR_CANTADDPLAYER
- 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.
Remarks
A DPMSG_CREATEPLAYERORGROUP system message is 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.
See Also
IDirectPlay3::DestroyGroup, IDirectPlay3::EnumGroupsInGroup, DPMSG_CREATEPLAYERORGROUP
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.