IDirectPlayLobby3::WaitForConnectionSettings

IDirectPlayLobby3 Interface

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.

Syntax

HRESULT WaitForConnectionSettings(
  DWORD dwFlags);

Parameters

dwFlags
Flag that puts the application into wait mode or takes it out of wait mode. By default (dwFlags = 0), the method puts the application into wait mode. Setting dwFlags 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.

Return Value

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.

Remarks

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.


Top of Page Top of Page
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.