Platform SDK: DirectX

IDirectPlayLobby3::GetConnectionSettings

The IDirectPlayLobby3::GetConnectionSettings method retrieves the DPLCONNECTION structure that contains all the information needed to start and connect an application. The data returned is the same data that was passed to the IDirectPlayLobby3::RunApplication method by the lobby client, or set by calling the IDirectPlayLobby3::SetConnectionSettings method.

HRESULT GetConnectionSettings(
  DWORD dwAppID,
  LPVOID lpData,
  LPDWORD lpdwDataSize
);

Parameters

dwAppID
Identifies which application's connection settings to retrieve when called from a lobby client (that communicates with several applications). When called from an application (that only communicates with one lobby client), this parameter must be 0. This ID number is obtained from IDirectPlayLobby3::RunApplication.
lpData
Pointer to a buffer in which the connection settings are to be written. 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_BUFFERTOOSMALL
DPERR_GENERIC
DPERR_INVALIDINTERFACE
DPERR_INVALIDOBJECT
DPERR_INVALIDPARAMS
DPERR_NOTLOBBIED
DPERR_OUTOFMEMORY

Remarks

The lpData member should be cast to the DPLCONNECTION structure when the method returns to read the data from it.

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 dplobby.h.
  Import Library: Use dplayx.lib.

See Also

DPLCONNECTION, IDirectPlayLobby3::RunApplication, IDirectPlayLobby3::SetConnectionSettings, IDirectPlayLobby3::WaitForConnectionSettings