Microsoft DirectX 8.1 (C++) |
Disconnects the Microsoft® DirectPlay® Voice client from the existing DirectPlay Voice session.
HRESULT Disconnect( DWORD dwFlags );
DVFLAGS_SYNC
Do not return until the operation is completed.
Returns DV_OK if successful, or one of the following error values.
DVERR_ALREADYPENDING |
DVERR_CONNECTABORTING |
DVERR_INVALIDFLAGS |
DVERR_INVALIDPARAM |
DVERR_NOTCONNECTED |
DVERR_NOTINITIALIZED |
DV_PENDING |
DVERR_SESSIONLOST |
DVERR_TIMEOUT |
On calling this method, all recording and playback is stopped. If a connection is being processed, it is canceled by this call.
Unless the DVFLAGS_SYNC is specified, calling this method immediately returns a DV_PENDING value and proceeds to process the disconnection request in the background. The status of the disconnection is not known until the DirectPlay Voice client generates a DVMSG_DISCONNECTRESULT message that contains the disconnection result. Only one disconnection can be pending at a time. If you call IDirectPlayVoiceClient::Disconnect while a disconnect is pending, DirectPlay will return a DVERR_ALREADYPENDING error value.
If this method is called synchronously by setting the DVFLAGS_SYNC flag, the method does not return until the Disconnect method completes. The result of the disconnection is the return value from this method. No DVMSGID_DISCONNECTRESULT message is generated.
Windows NT/2000/XP: Available as a redistributable for Windows 2000 and later.
Windows 98/Me: Available as a redistributable for Windows 98 and later.
Header: Declared in Dvoice.h.