Microsoft DirectX 8.0 (C++)

IDirectPlay8AddressIP::BuildFromSockAddr

Builds a remote DirectPlay 8 IP address from a valid SOCKADDR structure. 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.

HRESULT BuildFromSockAddr(
const SOCKADDR *const pSockAddr
);

Parameters

pSockAddr
Valid UDP address specified in SOCKADDR form.

Return Values

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

DPNERR_INVALIDPARAM
DPNERR_INVALIDPOINTER
DPNERR_NOTALLOWED

Requirements

  Windows NT/2000: Available as a redistributable for Windows 2000 and later.
  Windows 95/98: Available as a redistributable for Windows 95 and later.
  Header: Declared in Dpaddr.h.