Microsoft DirectX 8.1 (Visual Basic)

SimpleServer

The SimpleServer sample is a simple server application that can connect and route client messages.

Path

Source: (SDK root)\Samples\Multimedia\VBSamples\DirectPlay\SimpleServer

Executable: (SDK root)\Samples\Multimedia\VBSamples\DirectPlay\Bin

User's Guide

Double-click the SimpleServer icon to start the application. Choose a service provider, enter a session name, and choose the maximum number of players, then click Start Server.

Programming Notes

When the SimpleServer sample receives the DPNMSG_RECEIVE message, the DirectPlay8Event_Recieve function checks to see if more than one player is in the session. If so, SimpleServer notifies everyone that a funny face was made. Otherwise, SimpleServer notifies the client that it is the only player in the session. See the DirectPlay8Event interfaces in the source code for more messages that the SimpleServer sample handles.