Platform SDK: DirectX

DirectPlay4.StartSession

The DirectPlay4.StartSession method launches a DirectPlay session from a staging area. Call SetGroupConnectionSettings first to specify what application to launch, which service provider to use, and what session description to use.

object.StartSession(id As Long) 

Parameters

object
Object expression that resolves to a DirectPlay4 object.
id
ID of the group to send start session commands to. The group must be a staging area.

Error Codes

If the method fails, an error is raised and Err.Number may be set to one of the following values:

DPERR_ACCESSDENIED
DPERR_CONNECTIONLOST
DPERR_INVALIDFLAGS
DPERR_INVALIDGROUP
DPERR_INVALIDPARAMS

This method returns DPERR_INVALIDGROUP if the given group ID is not a valid staging area.

Remarks

When StartSession is called, each player in the group receives a DPSYS_STARTSESSION system message instructing the player to launch the session.

A player joining a staging area group for which the session has already started can call this method to join the session. The player will receive a DPSYS_STARTSESSION message with information on how to join the session.

See Also

Synchronized Launching