DirectX SDK

DirectPlayLobby3.WaitForConnectionSettings

The DirectPlayLobby3.WaitForConnectionSettings method puts the application into wait mode, where the application waits for the connection settings. When the application is in wait mode, a lobby client that uses the DirectPlayLobby3.RunApplication method will not launch a new instance of the application, but will send the connection settings directly to the application already running in wait mode.

The application can use the DirectPlayLobby3.Connect method to connect to a session.

object.WaitForConnectionSettings(flags As CONST_DPLWAIT)

Parameters

object
Object expression that resolves to a DirectPlayLobby3 object.
flags
Flag from the CONST_DPLWAIT enumeration that puts the application into wait mode or takes it out of wait mode. By default (flags = DPLWAIT_DEFAULT, or 0), the method puts the application into wait mode. Setting flags to DPLWAIT_CANCEL takes the application out of wait mode. As soon as the connection settings are sent by the lobby client, the application will automatically be taken out of wait mode.

Error Codes

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

DPERR_INVALIDFLAGS
DPERR_UNAVAILABLE

The method returns DPERR_UNAVAILABLE if you set the flag to cancel wait mode and the application is not in wait mode.

When the lobby client uses RunApplication, DirectPlay will look for any instances of the application that are waiting for connection settings. If none are found, then a new instance of the application is launched. If a waiting application is found, it can then read the connection settings with the DirectPlayLobby3.GetConnectionSettings method and join a session using Connect.