Handling Voice Host Messages

DirectPlay

 
Microsoft DirectX 9.0 SDK Update (Summer 2003)

Handling Voice Host Messages


Every Microsoft® DirectPlay® Voice session must have a host that is responsible for starting, managing, and terminating the session. A voice host must create a voice server object (CLSID_DirectPlayVoiceServer) and manage the voice session through that object's IDirectPlayVoiceServer interface. Like a voice client, a voice host must have a message handler and will receive messages during a session. A voice host message handler can receive any of the following three messages.

Unlike core DirectPlay messaging, none of these messages are unique to a voice session host. Depending on the type of session, these messages may also be received by voice client message handlers. This document gives a brief description of how a voice session host handles messaging. For specific details on how to handle these messages, see Handling Voice Client Messages. For a discussion of general messaging issues, see Handling DirectPlay Messaging.

Messaging During Normal Game Play

A client/server voice host will normally receive the following messages after the voice session starts.

  • DVMSGID_CREATEVOICEPLAYER

    You will receive a DVMSGID_CREATEVOICEPLAYER message every time a player joins your voice session.

  • DVMSGID_DELETEVOICEPLAYER

    You will receive a DVMSGID_DELETEVOICEPLAYER message every time a player leaves your voice session.

Session Termination Messages

A client/server voice host may receive one or more of the following messages when the voice session terminates.

  • DVMSGID_SESSIONLOST

    You will receive a DVMSGID_SESSIONLOST message if the underlying core session is disconnected. For example, the core session will be disconnected when the underlying DirectPlay peer or server transport object is closed, or when your host is disconnected from the network.

  • DVMSGID_DELETEVOICEPLAYER

    You will receive one DVMSGID_DELETEVOICEPLAYER message for each client remaining in the session when the voice session is terminated.


© 2003 Microsoft Corporation. All rights reserved.