IDirectPlay8AddressIP::GetAddress Method

DirectPlay

 
Microsoft DirectX 9.0 SDK Update (Summer 2003)

IDirectPlay8AddressIP::GetAddress Method


Retrieves the remote address information from a remote Microsoft® DirectPlay®   Internet Protocol (IP) address.

Syntax

HRESULT GetAddress(      
    WCHAR *wszAddress,     PDWORD pdwAddressLength,     USHORT *psPort );

Parameters

wszAddress
[out] Pointer to a buffer to receive the host name. This parameter can be NULL to retrieve the required size.
pdwAddressLength
[in, out] Size, in characters, of the buffer specified in wszAddress, including the terminating NULL character. On success, this parameter contains the number of characters, including the terminating NULL character, written to the specified buffer. On failure, this parameter contains the number of characters, including the terminating NULL character, required to retrieve the host name.
psPort
[out] Pointer to a USHORT to contain the port specified in this local address.

Return Value

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

DPNERR_BUFFERTOOSMALLThe supplied buffer is not large enough to contain the requested data.
DPNERR_INVALIDPARAMOne or more of the parameters passed to the method are invalid.
DPNERR_INVALIDPOINTERPointer specified as a parameter is invalid.

Remarks

To succeed, the contained address must have at least the following elements.

  • DPNA_KEY_PROVIDER
  • DPNA_KEY_HOSTNAME
  • DPNA_KEY_PORT = specified port



© 2003 Microsoft Corporation. All rights reserved.