Microsoft DirectX 8.1 (Visual Basic)

DirectPlayVoiceClient8.Connect

Connects the client to a Microsoft® DirectPlay® Voice session.

Connect( _
    SoundDeviceConfig As DVSOUNDDEVICECONFIG, _
    ClientConfig As DVCLIENTCONFIG, _
    lFlags As Long)

Parts

SoundDeviceConfig
DVSOUNDDEVICECONFIG type that describes the sound device configuration.
ClientConfig
DVCLIENTCONFIG type that describes the general configuration of the client.
lFlags
You can specify the following flag.
DVFLAGS_SYNC
The method does not return until the operation is completed.

Error Codes

If the method fails, Err.Number can be set to one of the following values.

DVERR_ALREADYPENDING
DVERR_INVALIDPARAM
DVERR_INVALIDPOINTER
DVERR_INVALIDOBJECT
DVERR_SOUNDINITFAILURE
DVERR_INVALIDFLAGS
DVERR_OUTOFMEMORY
DVERR_NOTINITIALIZED
DVERR_COMPRESSIONNOTSUPPORTED
DVERR_TIMEOUT
DVERR_INVALIDDEVICE
DVERR_SENDERROR
DVERR_INCOMPATIBLEVERSION
DVERR_TRANSPORTNOPLAYER
DVERR_TRANSPORTNOSESSION
DVERR_RUNSETUP

Remarks

You must test the sound devices selected for playback and capture by invoking the Setup Wizard before connecting the client to the DirectPlay Voice session. On application startup, check the audio configuration by using DirectPlayVoiceTest8.CheckAudioSetup. If this method returns DVERR_RUNSETUP, the sound configuration specified has not been tested. The Setup Wizard needs to be run only once for any configuration.

Any calls to DirectPlayVoiceClient8.Connect while a connection is pending return DVERR_ALREADYPENDING. Additionally, only one connection can be pending at a time.

A transport session must be started on the specified DirectPlay object before calling this method. A successful call to DirectPlayVoiceClient8.Initialize must be made before calling the Connect method.