Override: Overriding DirectPlay Service Provider Dialogs

Click to open or copy the files for the Override sample.

Sample application to demonstrate how to override the DirectPlay service provider dialogs.

Visual C++ may include older versions of the DirectX header files and libraries. This sample requires DirectX 5. In order to avoid compile errors, make sure the path to the DirectX 5 header files and libraries is listed BEFORE the Visual C++ header files and libraries on the Directories menu, found under Options on the Tools menu.

Once the user has selected which service provider to use, the application displays a custom dialog to collect the information needed for that service provider.

If the user selected an unknown service provider, then the dialog (if any) cannot be overidden and the application must prepare for a dialog to be displayed.

Once the information has been collected from the user, it must be formatted into a DirectPlay Address which can be used to initialize the service provider.

EnumSessions must be called with the DPENUMSESSIONS_RETURNSTATUS flag and Open must be called with the DPOPEN_RETURNSTATUS flag to supress any status dialogs that may pop up to show to progress of the connection.

Building SDK Samples

This sample uses the following keywords:

cocreateinstance; coinitialize; couninitialize; createcompoundaddress; createserviceprovideraddress; define_guid; deleteserviceprovidercombo; deletesessioninstancelist; destroyoverridewindow; dialogboxparam; directplaycreate; directplayenumerate; directplayenumeratecallback; directplaylobbycreate; dlgitemischecked; dohostorjoin; enabledlgbutton; enablewindow; enddialog; enumaddress; enummodemaddress; enumsessions; enumsessionscallback; failed; fillmodemcombobox; getdlgitem; getdlgitemtext; getplayeraddress; getserviceproviderguid; getsessioninstanceguid; globalallocptr; globalfreeptr; initializeconnection; initializeoverridewindow; isequalguid; killtimer; lstrcpy; lstrlen; makeintresource; open; overridewndproc; queryinterface; release; selectsessioninstance; senddlgitemmessage; sessionswndproc; setdlgitemtext; settimer; showwindow; succeeded; switch; updateaddressinfo; winmain; zeromemory