Microsoft DirectX 9.0 SDK Update (Summer 2003)

IDirectPlayVoiceServer::StopSession Method


Stops the Microsoft® DirectPlay® Voice session.

Syntax

HRESULT StopSession(      

    DWORD dwFlags );

Parameters

dwFlags
[in] Flag. The following flag can be set.
DVFLAGS_NOHOSTMIGRATE
The host will not migrate regardless of session and transport settings. Use this flag when you want to shut down the voice session completely.

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_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_NOTHOSTINGThe object is not the host of the session.
DVERR_NOTINITIALIZEDThe IDirectPlayVoiceClient::Initialize or IDirectPlayVoiceServer::Initialize method must be called before calling this method.
DVERR_SESSIONLOSTThe transport has lost the connection to the session.


Remarks

This method returns DVERR_ALREADYPENDING if it is called while another thread is processing a IDirectPlayVoiceServer::StopSession request.



© 2003 Microsoft Corporation. All rights reserved.