Microsoft DirectX 9.0

Launching a Lobbied Application

When the user has selected an application and your lobby client has verified that it has been registered on the user's system, you can launch the application. To do so, call IDirectPlay8LobbyClient::ConnectApplication. The first parameter is a DPL_CONNECT_INFO structure that contains a variety of information needed to launch the application, including the following:

When you call IDirectPlay8LobbyClient::ConnectApplication, you can set a connection context value in the pvUserApplicationContext parameter. If you do not set the connection context value when you call IDirectPlay8LobbyClient::ConnectApplication, you can set the pvConnectionContext parameter when you handle the DPL_MSGID_CONNECT message. After this value has been set, the connection context value will be passed along in the pvConnectionContext parameter with any message you receive from that connection. This is a useful parameter to set if you are receiving messages from multiple connections and using a common lobby client message handler.

The IDirectPlay8LobbyClient::ConnectApplication method returns an application handle that is used to identify the application in all further communication. When the application has launched and the connection is successfully established, your message handler receives a DPL_MSGID_CONNECT message.

Note  Your message handler may receive the DPL_MSGID_CONNECT before the IDirectPlay8LobbyClient::ConnectApplication method has confirmed the connection by returning a success code. Your message handler should be prepared to handle the message even if the method has not yet returned.

© 2002 Microsoft Corporation. All rights reserved.