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