DirectPlay Animated Header -- IDirectPlay3::SetPlayerName DirectPlay Animated Header -- IDirectPlay3::SetPlayerName* Microsoft DirectPlay SDK
*Index  *Topic Contents
*Previous Topic: IDirectPlay3::SetPlayerData
*Next Topic: IDirectPlay3::SetSessionDesc


IDirectPlay3::SetPlayerName


IDirectPlay3 Interface

Sets the name of a local player after it has been changed. Only the computer that created the player can change the name. A DPMSG_SETPLAYERORGROUPNAME system message will be sent to all the other players notifying them of the change unless DPSESSION_NODATAMESSAGES is set in the session description.

HRESULT SetPlayerName(
  DPID idPlayer,
  LPDPNAME lpPlayerName,
  DWORD dwFlags
  );

Parameters
idPlayer
ID of the local player for which data is being sent.
lpPlayerName
Pointer to a DPNAME structure containing the name information for the player. Set this parameter to NULL if the player has no name information.
dwFlags
Flags indicating how the name will be propagated. It can be one of the following values:
DPSET_GUARANTEED
Propagates the data by using guaranteed messaging (if available).
DPSET_LOCAL
Data is not propagated to other players.
DPSET_REMOTE
Propagates the data to all players in the session using nonguaranteed message passing. This is the default value.
Return Values

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

DPERR_INVALIDOBJECT
DPERR_INVALIDPLAYER
See Also

DPNAME, DPMSG_SETPLAYERORGROUPNAME, IDirectPlay3::GetPlayerName, IDirectPlay3::Send

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

*Top of Page