Platform SDK: DirectX

IDirectPlay4::SetGroupConnectionSettings

The IDirectPlay4::SetGroupConnectionSettings method sets the connection settings for a session that will be launched from this group. This method can only be used in a lobby session.

HRESULT SetGroupConnectionSettings(
  DWORD dwFlags,
  DPID idGroup,
  LPDPLCONNECTION lpConnection
);

Parameters

dwFlags
Not used. Must be 0.
idGroup
ID of the group to set the connection settings on.
lpConnection
Pointer to a DPLCONNECTION structure describing the application to be launched, the service provider to use, and the session description of the session to be created.

Return Values

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

DPERR_ACCESSDENIED
DPERR_CONNECTIONLOST
DPERR_INVALIDGROUP
DPERR_INVALIDPARAMS
DPERR_UNSUPPORTED

Remarks

Call IDirectPlay4::GetGroupConnectionSettings before calling SetGroupConnectionSettings to see if any of the DPLCONNECTION structure members already have default values (non-NULL or nonzero). If so, you may get an error if you try to change these default values.

You do not have to set the lpAddress and dwAddressSize data members of the DPLCONNECTION structure with SetGroupConnectionSettings. In the DPSESSIONDESC2 structure within the DPLCONNECTION structure, you do not have to fill in the guidInstance member.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in dplay.h.
  Import Library: Use dplayx.lib.

See Also

DPLCONNECTION, IDirectPlayLobby3::RunApplication, IDirectPlay4::GetGroupConnectionSettings