Microsoft SDK for Java

connect

This method of the DirectPlayLobby Class connects an application to a session by using the connection data supplied by the lobby client in the runApplication method or by calling the setConnectionSettings method.

Syntax

public DirectPlay2 connect();

Return Value

Returns a Microsoft® DirectPlay® object with the correct service provider and opens the correct session without prompting the user to complete any dialog boxes.

Remarks

If this method fails with the DPERR_NOTLOBBIED error value, the application should perform the normal steps of calling enumServiceProviders, create, enumSessions and open. If it fails on any other error value, there is a problem connecting to the session.

Before calling this method, the application can examine the connection settings that will be used to start the application by using the getConnectionSettings method. The application can then modify these settings and set them by using the setConnectionSettings method.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.