Microsoft DirectX 8.1 (Visual Basic)

DirectPlay8Client.SetClientInfo

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, information obtained through this method can be retrieved by the server by calling the DirectPlay8Server.GetClientInfo method.

SetClientInfo(PlayerInfo As DPN_PLAYER_INFO, _
    [lFlags As CONST_DPNOPERATIONS]) As Long

Parts

PlayerInfo
DPN_PLAYER_INFO type that contains the peer information to set.
lFlags
Set the DPNSETCLIENTINFO_SYNC flag from the CONST_DPNOPERATIONS enumeration to have the method process synchronously.

Return Values

Returns the asynchronous handle for this operation. This is the handle that is used in lAsyncHandle parameter of the DirectPlay8Client.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 DirectPlay8Client.Send method because of the high cost of using the DirectPlay8Client.SetClientInfo method.

You can modify the client information with this method after connecting to the application. Calling this method after connection will call the DirectPlay8Event.InfoNotify method in the server's message handler.