##

IDirectPlayLobby2::GetConnectionSettings

IDirectPlayLobby2 Interface

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 IDirectPlayLobby2::RunApplication method by the lobby client, or set by calling the IDirectPlayLobby2::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 zero. This ID number is obtained from IDirectPlayLobby2::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 function returns to read the data from it.

##### See Also

DPLCONNECTION, IDirectPlayLobby2::RunApplication, IDirectPlayLobby2::SetConnectionSettings

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.