Platform SDK: DirectX |
The DirectPlay4.SetPlayerName method changes the formal and friendly names of a local player. Only the computer that created the player can change the name.
object.SetPlayerName(playerId As Long, _ friendlyName As String, _ formalName As String, _ flags As CONST_DPSETFLAGS)
If the method fails, an error is raised and Err.Number may be set to one of the following values:
DPERR_ACCESSDENIED |
DPERR_CONNECTIONLOST |
DPERR_INVALIDOBJECT |
DPERR_INVALIDPLAYER |
A DPSYS_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.
DirectPlay4.GetPlayerFriendlyName, DirectPlay4.GetPlayerFormalName