DirectX SDK

IDirectPlay4::GetGroupConnectionSettings

The IDirectPlay4::GetGroupConnectionSettings method retrieves the connection settings for a group from the DPLCONNECTION structure. Any sessions launched from this group will use these settings. This method can only be used in a lobby session.

HRESULT GetGroupConnectionSettings(
  DWORD dwFlags,
  DPID idGroup,
  LPVOID lpData,
  LPDWORD lpdwDataSize
);

Parameters

dwFlags
Not used. Must be 0.
idGroup
ID of the group to get the connection settings for.
lpData
Pointer to a buffer into which the DPLCONNECTION structure and all its data will be copied. Set this parameter to NULL to request only the size of data. The lpdwDataSize parameter will be set to the minimum size required to hold the data.
lpdwDataSize
Pointer to a variable that is initialized to the size of the buffer before calling this method. After the method returns, this parameter will be set to the size, in bytes, of the data. If the buffer was too small (DPERR_BUFFERTOOSMALL), then this parameter will be set to the minimum buffer size required.

Return Values

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

DPERR_ACCESSDENIED
DPERR_BUFFERTOOSMALL
DPERR_INVALIDGROUP
DPERR_INVALIDFLAGS
DPERR_INVALIDPARAMS
DPERR_UNSUPPORTED

Remarks

Group connection settings are only relevant for staging area groups.

You can see if a game has been launched by looking at the guidInstance data member of the DPSESSIONDESC2 structure, whose pointer is contained in the lpSessionDesc data member of the DPLCONNECTION structure returned by this method. The guidInstance will be GUID_NULL until a game has been launched.

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::SetGroupConnectionSettings