Microsoft DirectX 8.0 (C++)

IDirectPlay8Server::GetLocalHostAddresses

Retrieves the local addresses being used to host the session.

HRESULT GetLocalHostAddresses(
IDirectPlay8Address **const prgpAddress,
DWORD *const pcAddress,
constDWORD dwFlags
);

Parameters

prgpAddress
Address of a pointer to an array of IDirectPlay8Address objects that specify the local host addresses. You must release these objects when you no longer need them or you will create memory leaks.
pcAddress
Maximum number of address objects that can be contained in the array pointed to by prgpAddress. If the buffer is too small, the method returns DPNERR_BUFFERTOOSMALL, and pcAddress will be set to the required value.
dwFlags
Reserved. Must be 0.

Return Values

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

DPNERR_INVALIDOBJECT
DPNERR_BUFFERTOOSMALL
DPNERR_INVALIDPARAM
DPNERR_INVALIDPOINTER
DPNERR_UNINITIALIZED

Remarks

The most robust way to use this method is to first call it with pcAddress set to 0. When the method returns, pcAddress will point to the required value. You can use that value when you call the method for a second time to retrieve the information.

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 Dplay8.h.