DirectX SDK |
This tutorial pertains only to applications written in C++. See DirectPlay Visual Basic Tutorials.
Before any methods can be called, the application must obtain an interface to a DirectPlay object.
The following example shows how to obtain the IDirectPlay4 interface:
if ( FAILED( hr = CoCreateInstance( CLSID_DirectPlay, NULL, CLSCTX_ALL, IID_IDirectPlay4A, (VOID**)&g_pDP ) ) ) return hr;
Next: Step 2: Enumerate and Initialize the Service Providers