Compartilhar via


IRTCClient::NetworkAddresses (Windows CE 5.0)

Send Feedback

This method gets the IP addresses and ports that the client is listening on. These addresses can be for the following:

  • Local machines
  • The external edges of the Network Address Translator (NAT) boxes

This method supports clients that have out-of-band channels for communicating the local IP addresses and ports to remote callers.

HRESULT get_NetworkAddresses(VARIANT_BOOLfTCP,VARIANT_BOOL fExternal,VARIANT* pvAddresses);

Parameters

  • fTCP
    [in] VARIANT_TRUE if the method gets the IP port addresses used by TCP.

    VARIANT_FALSE if the method gets the UDP addresses.

  • fExternal
    [in] VARIANT_TRUE if the method gets the addresses of the external edges of the NAT boxes.

    VARIANT_FALSE if the method gets the local addresses.

  • pvAddresses
    [out] Pointer to a variant containing a safe array of BSTRs.

    Each BSTR is in the format xxx.xxx.xxx.xxx:nnnnn.

    The caller is responsible for freeing the variant.

Return Values

This method can return an RTC_E_ constant.

Remarks

To call the NetworkAddresses method, use the following algorithm:

  1. Call get_NetworkAddresses with fExternal set to VARIANT_TRUE.

    If this gets an address, communicate this address and port out of band to the called party.

    If more than one address is retrieved, the user must choose the correct address based on the destination.

  2. If step 1 does not retrieve any addresses, call get_NetworkAddresses with fExternal set to VARIANT_FALSE and repeat step 1.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Rtccore.h, Rtccore.idl.
Link Library: Uuid.lib.

See Also

IRTCClient

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.