Platform SDK: DirectX

DirectPlay4.GetPlayerAddress

The DirectPlay4.GetPlayerAddress method retrieves the DirectPlay address for a player.

If this method is called on a local player, it returns the network address of the computer if it is available. In some cases, more than one address can be returned (for example, with TCP/IP where the computer has both a network card and a dial-up Internet connection).

object.GetPlayerAddress(playerId As Long) _
    As DirectPlayAddress

Parameters

object
Object expression that resolves to a DirectPlay4 object.
playerId
Player ID that the address is being requested for. Pass in 0 to obtain a list of valid address options for a service provider

Return Values

If it succeeds, the method returns a DirectPlayAddress object.

Error Codes

If the method fails, an error is raised and Err.Number may be set to DPERR_UNAVAILABLE if the address for the requested player ID is not available.