Platform SDK: DirectX

Chat Sample

[C++]

This topic pertains only to application development in Visual Basic. See DirectPlay C++ Samples.

[Visual Basic]

Description

The Chat sample is a simple chat client that can either be launched by a lobby client or join a lobbied session after being launched by the user.

Path

Source: (SDK root)\Samples\Multimedia\VBSamples\DPlay\Src\Chat

Executable: (SDK root)\Samples\Multimedia\VBSamples\DPlay\Bin\DXVBChat.exe

User's Guide

To start the chat:

1.    Run the Lobby Server on one machine. Start a normal session.

2.    Run the Bellhop Sample on each client machine, and join the lobby session created by the lobby server.

3.    Create a staging area for DXVBChat in Bellhop on one client. (Right-click on the Chat door and choose CreateGroupInGroup.)

4.    Enter the staging area on each client by double-clicking on the triangle. Start the session on one client by right-clicking on the triangle and choosing StartSession. This runs DXVBChat on all clients in the staging area, or takes it out of wait mode.

Note that new players can join after the session has started by entering the staging area and "starting" it again.

You can run DXVBChat before starting the session, but you can't run it from the Visual Basic environment; you must execute DXVBChat.exe.

You can test multiple instances of the application on a single machine by using TCP/IP. Choose different player names in each instance of Bellhop in order to see more clearly what is going on.

Programming Notes

The InitDPlay function shows how to determine whether the application was launched by the user (and needs to wait for connection settings) or by a lobby.