Platform SDK: DirectX

DirectPlay4.GetPlayerData

The DirectPlay4.GetPlayerData method retrieves an application-specific data block that was associated with a player ID by using DirectPlay4.SetPlayerData.

object.GetPlayerData(playerId As Long, _
    flags As CONST_DPGETFLAGS) As String

Parameters

object
Object expression that resolves to a DirectPlay4 object.
playerId
ID of the player for which data is being requested.
flags
Value from the CONST_DPGETFLAGS enumeration indicating the type of player data to retrieve: local or remote. If this parameter is set to 0, remote data will be retrieved.

Return Values

The method returns a string containing application-defined data.

Error Codes

If the method fails, an error is raised and Err.Number may be set to one of the following values:

DPERR_BUFFERTOOSMALL
DPERR_INVALIDFLAGS
DPERR_INVALIDOBJECT
DPERR_INVALIDPLAYER

Remarks

Local data was set by the current DirectPlay object by using the DPSET_LOCAL flag in DirectPlay4.SetPlayerData. Remote data might have been set by any application in the session by using the DPSET_REMOTE flag.