DirectPlay Animated Header -- IDirectPlay3::GetPlayerName DirectPlay Animated Header -- IDirectPlay3::GetPlayerName* Microsoft DirectPlay SDK
*Index  *Topic Contents
*Previous Topic: IDirectPlay3::GetPlayerFlags
*Next Topic: IDirectPlay3::GetSessionDesc


IDirectPlay3::GetPlayerName


IDirectPlay3 Interface

Retrieves the name associated with a player.

HRESULT GetPlayerName(
  DPID idPlayer,
  LPVOID lpData,
  LPDWORD lpdwDataSize
  );

Parameters
idPlayer
ID of the player whose name is requested.
lpData
Pointer to a buffer where the name data is to be written. Set this parameter to NULL to request only the size of data. The lpdwDataSize parameter will be set to the 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 name data. If the buffer was too small (DPERR_BUFFERTOOSMALL), then this parameter will be set to the buffer size required.
Return Values

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

DPERR_BUFFERTOOSMALL
DPERR_INVALIDOBJECT
DPERR_INVALIDPLAYER
Remarks

After this method returns, the pointer lpData should be cast to the DPNAME structure to read the group name data.

See Also

DPNAME, IDirectPlay3::SetPlayerName

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

*Top of Page