IDirectPlay2::GetPlayerAddress

HRESULT GetPlayerAddress(DPID idPlayer,

LPVOID lpAddress, LPDWORD lpdwAddressSize);

Retrieves the DirectPlay Address for a player. The DirectPlay Address is a network address for a player using a specific service provider.

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

DPERR_BUFFERTOOSMALL

DPERR_INVALIDOBJECT

DPERR_INVALIDPARAMS

DPERR_INVALIDPLAYER

idPlayer

Player ID that the address is being requested for.

lpAddress

Address of a buffer where the DirectPlay Address is to be written. Set this parameter to NULL to request only the size of data. The lpdwAddressSize parameter will be set to the size required to hold the data.

lpdwAddressSize

Address of 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 group data. If the buffer was too small (DPERR_BUFFERTOOSMALL), then this parameter will be set to the buffer size that is required.