Sends a text message to another player, a group of players, or all players. This method supports both Unicode (the IDirectPlay3 interface) and ANSI strings (the IDirectPlay3A interface). The player receiving the chat message is informed through a DPMSG_CHAT system message in the player's receive queue. This method must be used in a lobby session.
HRESULT SendChatMessage(
DPID idFrom,
DPID idTo,
DWORD dwFlags,
LPDPCHAT lpChatMessage
);
Returns DP_OK if successful or one of the following error values:
This method returns DPERR_INVALIDPARAMS if the idTo ID is not a valid player or group. It returns DPERR_INVALIDPLAYER if the idFrom ID is not a valid player. It returns DPERR_ACCESSDENIED if the idFrom ID is not a local player.
This method facilitates player to player chatting within a lobby session where it is possible for different client applications to be connected. You must use this method in a lobby session. Use is optional in an application seession.
The receiving player will receive a system message (idFrom = DPID_SYSTEM). The DPCHAT structure will specify which player the chat message came from.
DPCHAT, DPMSG_CHAT, IDirectPlay3::Send
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.