|Microsoft DirectX 9.0|
Returns the current public address mappings for the specified registered port group.
const DPNHANDLE hRegisteredPorts, SOCKADDR *const paPublicAddresses, DWORD *const pdwPublicAddressSize, DWORD *const pdwAddressTypeFlags, DWORD *const pdwLeaseTimeRemaining, const DWORD dwFlags );
- [in] Handle to a specific binding returned by IDirectPlayNATHelp::RegisterPorts.
- [out] Buffer to receive assigned public realm addresses. Set to NULL if not desired.
- [in, out] Pointer to a size of paPublicAddresses buffer on input. On output, receives the size written to paPublicAddresses or the size required if the buffer is too small. Can be NULL only if paPublicAddresses is NULL.
- [out] Receives flags describing the address types returned. Set to NULL if not desired. The following values can be returned.
- The mappings are for TCP ports instead of User Datagram Protocol (UDP) ports.
- The mappings are for ports which are the same on the Internet gateway.
- The mappings are for shared UDP fixed ports.
- The addresses are opened on a local firewall.
- The addresses are registered with an Internet gateway.
- The Internet gateway is local.
- [out] Receives time remaining in the port lease in milliseconds. Set to NULL if not desired. Call IDirectPlayNATHelp::GetCaps to automatically extend leases.
- [in] Can be the following value.
- Retrieve the public address for the local firewall only, even if mapped on remote Internet gateway.
Returns DPNH_OK if successful, or one of the following error values.
DPNHERR_GENERIC An error occurred while closing. DPNHERR_BUFFERTOOSMALL The supplied buffer is not large enough to contain the requested data. DPNHERR_INVALIDFLAGS Invalid flags were specified. DPNHERR_INVALIDOBJECT The interface object is invalid. DPNHERR_INVALIDPARAM An invalid parameter was specified. DPNHERR_NOMAPPING The server does not have valid public interfaces. 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.