DirectX SDK |
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)
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.
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.