The UpdateRemoteAddress method informs the application that the remote address has been updated. Some NATs associate each port mapping with a particular remote address and will reject traffic from remote addresses other than the associated one. This method allows the application to update the remote address associated with a particular mapping on the NAT.

HRESULT UpdateRemoteAddress(BSTRbstrRemoteAddress,


  • bstrRemoteAddress
    [in] Contains the IP address of the remote endpoint for which the NAT mapping might be associated. Currently this parameter will contain an IPv4 dotted address. However, in the future an IPv6 address may also be entered in this parameter. The application must not, therefore, assume this will be an IPv4 address.
  • bstrInternalLocalAddress
    [in] Contains the client's internal IP address.
  • lInternalLocalPort
    [in] Contains the client's internal port.
  • bstrExternalLocalAddress
    [in] Contains the NAT's external IP address.
  • lExternalLocalPort
    [in] Contains the NAT's external port.

Return Values

RTC methods may return any of the standard COM and ADSI return values.


Client: Requires Windows XP SP1.
Server: Requires Windows Server 2003.
Redistributable: Requires Rtcdll.dll on Windows 2000, Windows XP, and Windows Me/98.
Header: Declared in Rtccore.h.
Library: Included as a resource in Rtcdll.dll.
GUID: IID_IRTCPortManager is defined as DA77C14B-6208-43ca-8DDF-5B60A0A69FAC.

See Also

IRTCSessionPortManagement, IRTCPortManager