Microsoft DirectX 8.1 (Visual Basic)

DXVB Messenger

The DXVBMessenger sample is a simple client/server instant messaging application.

DXVB Messenger Server is the server portion of a client/server instant messaging application. This sample requires the use of XML to maintain the data needed. You must have at least Internet Explorer 4 installed on your machine to compile or run this sample.

Path

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

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

User's Guide

Log on to a server, add friends, and send instant messages.

Programming Notes

The DXVBMessenger handles DirectPlay system messages. See implemented DirectPlay8Event objects in the source code for details.

DXVBMessenger client handles the DPNMSG_RECEIVE message and upon receipt will process the following message types.

Msg_LoginSuccess Logged in successfully, update the UI
Msg_InvalidPassword The password for this account is invalid
Msg_InvalidUser This user doesn't exist
Msg_UserAlreadyExists This user already exists
Msg_FriendAdded A user was added to my list of friends
Msg_FriendDoesNotExist Tried to add a friend that doesn't exist
Msg_BlockUserDoesNotExist Tried to block a user that doesn't exist
Msg_FriendBlocked A user was added to my list of blocked users
Msg_SendClientFriends Get the list of my friends from the server
Msg_UserBlocked Can't send a message to this person; they've blocked you
Msg_ReceiveMessage Received a message; show the message UI and display the message
Msg_FriendLogon A friend has just logged on, update UI
Msg_FriendLogoff A friend has just logged off, update UI

DXVBMessenger server handles the DPNMSG_RECEIVE message and upon receipt will process the following message types.

Msg_Login Get log on information, verify against the database
Msg_CreateNewAccount A new account needs to be created; try to create in database
Msg_AddFriend Add a friend to this users list
Msg_BlockFriend Block someone in this users list
Msg_SendMessage User is sending a message to someone, pass it on