|Microsoft DirectX 9.0|
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.
A client/server voice host will normally receive the following messages after the voice session starts.
You will receive a DVMSGID_CREATEVOICEPLAYER message every time a player joins your voice session.
You will receive a DVMSGID_DELETEVOICEPLAYER message every time a player leaves your voice session.
A client/server voice host may receive one or more of the following messages when the voice session terminates.
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.
You will receive one DVMSGID_DELETEVOICEPLAYER message for each client remaining in the session when the voice session is terminated.