DirectX SDK |
The IDirectPlayLobby3::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 RunApplication will not launch a new instance of the application, but will send the connection settings directly to the application already running in wait mode.
When in wait mode, the application should poll for DPLSYS_NEWCONNECTIONSETTINGS system message. After that message is received, the application is automatically taken out of wait mode. The application can use ConnectEx to connect to a session.
HRESULT WaitForConnectionSettings( DWORD dwFlags );
Returns DP_OK if successful, or one of the following error values otherwise:
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, DirectPlay will send a DPLSYS_NEWCONNECTIONSETTINGS system message. The application can then read the connection settings with GetConnectionSettings and join a session using ConnectEx.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in dplobby.h.
Import Library: Use dplayx.lib.