Microsoft DirectX 8.1 (Visual Basic)

DirectPlay8Server.SetServerInfo

Sets the static settings of a client with an application. Call this method before connecting to relay basic player information with the application. After the client successfully connects with the application, other players can retrieve information obtained through this method by calling the DirectPlay8Client.GetServerInfo method.

SetServerInfo(PlayerInfo As DPN_PLAYER_INFO) As Long

Parts

PlayerInfo
DPN_PLAYER_INFO type that contains the player information to set.

Return Values

Returns the asynchronous handle for this operation. This is the handle that is used in lAsyncHandle parameter of the DirectPlay8Server.CancelAsyncOperation method to cancel the request, if the request is processed asynchronously.

Error Codes

If the method fails, Err.Number can be set to one of the following values.

DPNERR_NOCONNECTION
DPNERR_INVALIDFLAGS
DPNERR_INVALIDPARAM

Remarks

Transmission of nonstatic information should be handled with the DirectPlay8Server.SendTo method because of the high cost of using the DirectPlay8Server.SetClientInfo method.

You can modify the client information with this method after connecting to the application. If this method is called after a connection, DirectPlay will call each player's DirectPlay8Event.InfoNotify method to notify him or her that the data has been updated.