DirectX SDK

Step 3: Configure the Session Description

[Visual Basic]

This tutorial pertains only to applications written in C++. See DirectPlay Visual Basic Tutorials.

[C++]

You should examine the DPSESSIONDESC2 structure to ensure that all the flags and properties that your application needs are set properly. If modifications are necessary, store the modified connection settings by using the IDirectPlayLobby3::SetConnectionSettings method.

The following example shows how to configure the session description and set the connection settings:

// Set our session flags
g_pDPLConnection->lpSessionDesc->dwFlags = 
        DPSESSION_KEEPALIVE | DPSESSION_MIGRATEHOST;
 
// Let lobby know our connection flags
if ( FAILED( hr = g_pDPLobby->SetConnectionSettings( 
        0, 0, g_pDPLConnection ) ) )
    return hr;

Next: Step 4: Connect to a Session