IDirectPlayVoiceServer::StartSession Method

DirectPlay

 
Microsoft DirectX 9.0 SDK Update (Summer 2003)

IDirectPlayVoiceServer::StartSession Method


Starts an initialized Microsoft® DirectPlay® Voice session within a running DirectPlay transport session. This method must be successfully called before the clients can complete a connection to the voice session.

Syntax

HRESULT StartSession(      
    PDVSESSIONDESC pSessionDesc,     DWORD dwFlags );

Parameters

pSessionDesc
[in] Pointer to a DVSESSIONDESC structure that contains the session description.
dwFlags
[in] Reserved. Must be 0.

Return Value

Returns DV_OK if successful, or one of the following error values.

DVERR_ALREADYPENDINGAn asynchronous call of this type is already pending.
DVERR_HOSTINGThe object is the host of the session.
DVERR_INVALIDFLAGSThe flags passed to this method are invalid.
DVERR_INVALIDOBJECTThe DirectPlay object pointer is invalid.
DVERR_INVALIDPARAMOne or more of the parameters passed to the method are invalid.
DVERR_INVALIDPOINTERThe pointer specified is invalid.
DVERR_NOTINITIALIZEDThe IDirectPlayVoiceClient::Initialize or IDirectPlayVoiceServer::Initialize method must be called before calling this method.
DVERR_COMPRESSIONNOTSUPPORTEDThe specified compression type is not supported on the local computer.

Remarks

The IDirectPlayVoiceServer::Initialize method must be called before this method is called. The voice session can be hosted on any client in the session if the voice session is peer-to-peer. If the voice session is not peer-to-peer, it must be hosted on the transport client, which is the host of a active transport session.

The DVSESSIONDESC structure contains the type of voice session to start. The type of voice session can have a dramatic effect on the CPU and bandwidth usage for both the client and the server. To use the default compression type, set the DVSESSIONDESC structure's guidCT member to DPVCTGUID_DEFAULT.



© 2003 Microsoft Corporation. All rights reserved.