Microsoft DirectX 8.1 (Visual Basic)

DirectPlay8Server.AddPlayerToGroup

Adds a client to a group.

AddPlayerToGroup(idGroup As Long, _
    idClient As Long, 
    lFlags As Long) As Long

Parts

idGroup
Long value that specifies the identifier of the group to add the client to.
idClient
Long value that specifies the identifier of the client that is added to the group.
lFlags
Flag that controls how this method is processed. The following flag can be set for this method.
DPNOP_SYNC
Causes the method to process synchronously.

Return Values

Returns the asynchronous handle for this operation. This is the handle that is used in lAsyncHandle parameter of the DirectPlay8Server.CancelAsyncOperation method to cancel the request, if the request is processed asynchronously.

Error Codes

If the method fails, Err.Number can be set to one of the following values.

DPNERR_INVALIDGROUP
DPNERR_INVALIDFLAGS

Remarks

Any client can add itself or another client to an existing group. After the client is successfully added to the group, all messages sent to the group are also sent to the client.

For a client to add itself to the group, pass DPNID_ME in the idClient parameter.