IDirectPlay::Open

HRESULT Open(LPDPSESSIONDESC lpSDesc);

Establishes the communication link between DirectPlay and a service provider.

·Returns DP_OK if successful, or one of the following error values otherwise:

DPERR_ACTIVEPLAYERS DPERR_GENERIC
DPERR_INVALIDOBJECT DPERR_INVALIDPARAMS
DPERR_UNAVAILABLE DPERR_UNSUPPORTED
DPERR_USERCANCEL  

lpSDesc

Address for the DPSESSIONDESC structure describing the session to be connected to or created.

In a modem environment, calling this method is equivalent to actually dialing the phone. This prompts the required user interface to configure the communications protocol that will be invoked with the DirectPlay object. In the case of the serial modem service provider supplied with DirectPlay, the user is prompted for dialing information. If the user cancels the dialing process, IDirectPlay::Open will return a DPERR_USERCANCEL error. This method will also return an error if any local players exist when it is called.