DPchat: DirectPlay API Chat Sample

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

This is a simple chat program to demonstrate usage of the DirectPlay APIs.

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.

The Dplaunch or Bellhop sample that is part of the DirectX 5 SDK can be used to exercise the lobby functionality of DPchat.

This sample includes the following files:

File Description
Dpchat.mak Visual C++ workspace to compile DPchat.
Lobby.cpp Sample code for enabling a DirectPlay application to be launched and connected to a session by a lobby.
Dialog.cpp Sample code for establishing a session connection by asking the user to supply information and make choices.
Dpchat.cpp The core chat application.
Dpchat.reg Adds entries to the registry to make DPchat visible to lobby applications.

Building SDK Samples

This sample uses the following keywords:

chatwndproc; closehandle; cocreateinstance; coinitialize; connect; connectusingdialog; connectusinglobby; connectwndproc; couninitialize; createdirectplayinterface; createevent; createplayer; createthread; define_guid; deleteconnectionlist; deletesessioninstancelist; destroydirectplayinterface; destroyplayer; dialogboxparam; directplayenumconnectionscallback; directplaylobbycreate; enabledlgbutton; enablewindow; enddialog; enumconnections; enumsessions; enumsessionscallback; errorbox; exitthread; failed; getchatplayername; getcomputername; getconnection; getconnectionsettings; getdlgitem; getdlgitemtext; getplayername; getsessioninstanceguid; getusername; globalallocptr; globalfreeptr; handleapplicationmessage; handlesystemmessage; hostsession; initializeconnection; isequalguid; joinsession; killtimer; lstrcpy; lstrlen; makeintresource; memcpy; messagebox; newchatstring; open; postmessage; queryinterface; receive; receivemessage; receivethread; release; selectsessioninstance; send; sendchatmessage; senddlgitemmessage; setconnectionsettings; setdlgitemtext; setevent; settimer; setupconnection; shutdownconnection; succeeded; switch; waitformultipleobjects; waitforsingleobject; winmain; wsprintf; zeromemory