Platform SDK: DirectX |
This tutorial pertains only to applications written in C++. See DirectPlay Visual Basic Tutorials.
To use a DirectPlay lobby, you first create an instance of a DirectPlayLobby object by calling CoCreateInstance. The following example shows one way to create a DirectPlayLobby object:
// Create an IDirectPlayLobby3A interface.
if ( FAILED( hr = CoCreateInstance( CLSID_DirectPlayLobby, NULL, CLSCTX_INPROC_SERVER, IID_IDirectPlayLobby3A, (VOID**)&g_pDPLobby ) ) ) return hr;