|Microsoft DirectX 9.0|
Determine a private alias for a given public address.
const SOCKADDR *const pSourceAddress, const SOCKADDR *const pQueryAddress, SOCKADDR *const pResponseAddress, const int iAddressSize, const DWORD dwFlags );
- [in] Address for the network interface that is using the desired address. This can be set to INADDR_ANY in which case the best server will be used.
- [in] Address to look up. Do not set this value to INADDR_ANY or INADDR_BROADCAST.
- [out] Receives the private alias to the public address specified.
- [in] Size of the SOCKADDR structure used for the pSourceAddress, pQueryAddress, and pResponseAddress buffers.
- [in] Set to 0 to query for a User Datagram Protocol (UDP) port. Otherwise, set to one of the following values.
- Query for a TCP port.
- Cache the address if a mapping is found.
- Cache the address if a mapping is not found.
- Determine if an address is private when no specific mapping is found.
Returns DPNH_OK if successful, or one of the following error values.
DPNHERR_GENERIC An error occurred while closing. DPNHERR_INVALIDFLAGS Invalid flags were specified. DPNHERR_INVALIDOBJECT The interface object is invalid. DPNHERR_INVALIDPARAM An invalid parameter was specified. DPNHERR_INVALIDPOINTER An invalid pointer was specified. DPNHERR_NOMAPPING The server does not have valid public interfaces. DPNHERR_NOMAPPINGBUTPRIVATE The server indicated that no mapping was found, but it is a private address. DPNHERR_NOTINITIALIZED The object has not been initialized. DPNHERR_OUTOFMEMORY There is not enough memory to perform this operation. DPNHERR_REENTRANT The interface has been re-entered on the same thread. DPNHERR_SERVERUNAVAILABLE No servers are currently present. DPNHERR_UPDATESERVERSTATUS IDirectPlayNATHelp::GetCaps has not been called with the DPNHGETCAPS_UPDATESERVERSTATUS flag set.