Welcome to
www.tdxlibrary.org
Home of the
the TDx_Library...
"RAD DirectX"
for
C++ Builder
...
|
TDx_Play_Library v2.00 Component Reference
|
|
[ TDx_Play::CreateGroup() ]
[ next: CreateGroupInGroup() ]
[ prev: Create() ]
public:
virtual bool __fastcall CreateGroup( DPID* pGroup, TDPName* pGroupName, void* pData, dword pDataSize, dword pFlags );
TDX_PLAY::CREATEGROUP()
[ component method ]
- Description
The
CreateGroup
method
will
create
a
group
within
the
session.
For
a
client
server
session,
no
group
notification
messages
are
sent
and
groups
are
only
visible
on
the
machine
that
created
them.
For
a
peer
to
peer
session,
CreateGroup
generates
a
DPMSG_CREATEPLAYERORGROUP
message
notifying
players
of
the
change.
TDx_Play::Send()
can
then
send
messages
to
all
group
members
by
sending
a
message
to
the
group
ID.
Groups
created
with
this
method
are
the
top
level
groups
within
the
session
and
can
be
enumerated
by
TDx_Play::EnumGroups().
To
create
subgroups
TDx_Play::CreateGroupInGroup()
must
be
used.
The
creating
player
is
the
owner
and
only
they
may
change
the
group
properties,
but
any
player
may
add
or
remove
members
or
delete
the
group.
If
the
creating
player
leaves
the
session,
ownership
is
migrated
to
the
host,
and
a
group
will
persist
within
the
session
until
it
is
explicitly
destroyed.
Error
values
that
can
be
generated
are:
DPERR_CANTADDPLAYER
DPERR_CONNECTIONLOST
DPERR_INVALIDFLAGS
DPERR_INVALIDPARAMS
- Parameters
Group
The Group parameter will reference the new groups ID if this method returns successfully.
GroupName
The GroupName parameter references a TDPName component holding the name for the new group.
The name is assigned and used by the application, it need not be unique and NULL can be set if no group name is required.
Data
The Data parameter references data to be propagated once the group is created as if TDx_Play::SetGroupData() had been called.
The data is application defined and this parameter may be set to NULL if no initial data is needed.
DataSize
The DataSize parameter defines the size, in bytes, of the data referenced by the Data parameter.
Flags
The Flags parameter defines flags indicating the group type to be created.
The described effect applies when the flag is set.
Setting zero (the default) will result in a group that migrates to the session host if its owner leaves the session and the group must be explicitly destroyed.
DPGROUP_HIDDEN
The group being created will only be enumerated when DPENUMGROUPS_HIDDEN is set in the TDx_Play::EnumGroups() Flags parameter.
For lobby sessions, the group will only be available via TDx_Play::AddGroupToGroup() links.
Basically this flag is very similar to the DPPLAYER_SPECTATOR flag for players.
DPGROUP_STAGINGAREA
The group being created is a staging area.
- See Also
- Top
If you would like to submit additions or improvements to this page, click: darren_john_dwyer@hotmail.com.
|
|