?/TD>
Microsoft DirectX 9.0

IDirectPlay8AddressIP::BuildFromSockAddr Method


Builds a remote Microsoft?DirectPlay??Internet Protocol (IP) address from a valid SOCKADDR structure.

Syntax

HRESULT BuildFromSockAddr(      

    const SOCKADDR *const pSockAddr );

Parameters

pSockAddr
[in] Valid User Datagram Protocol (UDP) address specified in SOCKADDR form.

Return Value

Returns S_OK if successful, or one of the following error values.

DPNERR_INVALIDPARAMOne or more of the parameters passed to the method are invalid.
DPNERR_INVALIDPOINTERPointer specified as a parameter is invalid.
DPNERR_NOTALLOWEDThis function is not allowed on this object.


Remarks

The SOCKADDR structure must specify an IP address. If the address is not in the correct format, DPNERR_INVALIDPARAM is returned.

The result of a successful call is a valid remote address with the following elements.

All addressing information contained in the object before the call is erased.



© 2002 Microsoft Corporation. All rights reserved.