Microsoft DirectX 8.1 (Visual Basic)

DirectPlay8Peer.SetPeerInfo

Sets the static settings of a peer with an application. Call this method before connecting to relay basic player information with the application. After the peer successfully connects with the application, information obtained through this method can be retrieved by other players by calling the DirectPlay8Peer.GetPeerInfo method.

SetPeerInfo(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 the lAsyncHandle parameter of the DirectPlay8Peer.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 DirectPlay8Peer.SendTo method because of the high cost of using the DirectPlay8Peer.SetPeerInfo method.

You can modify the peer 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.