Поделиться через


IRTCProfilePortManagement::SetPortManager (Windows Embedded CE 6.0)

1/6/2010

This method allows an application to specify a callback interface that allows the RTC Client API to obtain NAT mappings when required. This method is for the Profile and is the same as the one used for Session objects that use IRTCSessionPortManagement.

Syntax

HRESULT SetPortManager(
  IRTCPortManager* pPortManager
);

Parameters

  • pPortManager
    [in] Pointer to the IRTCPortManager interface exposed by the application to allow the RTC Client API to obtain a port mapping.

Return Value

This method can return an RTC_E_ constant, as well as any of the standard COM and ADSI return values.

The following table shows additional return values and additional information about a specific return value.

Value Description

E_POINTER

The pointer is NULL.

E_FAIL

The interface has not been successfully set. Something unexpected happened or the profile has already been enabled.

S_OK

The interface has been successfully set.

Remarks

This method is required only when a NAT mapping is desired.

If this method is not called, the RTC Client API supports only those NATs that support UPnP functionality by default.

This method is called once by the application to set the Port Manager interface, at which point the Port Manager methods like GetMapping or GetMappingEx will be called by the RTC Client whenever that profile gets used, such as in registration or subscription.

Each successful call to SetPortManager overwrites the previous IRTCPortManager callback interface. The method returns an error if the pointer passed is NULL or if the profile has already been enabled. The application should be prepared to return the port mappings immediately after the application calls SetPortManager.

Ee499284.security(en-US,WinEmbedded.60).gifSecurity Note:
This method can send data over the network in unencrypted form. Therefore, someone eavesdropping on the network might be able to read the data. Before using this method in an unencrypted session, consider the security risk of sending the data in clear text. The application can encrypt an RTC session by specifying TLS in the profile used for the session.

Requirements

Header rtccore.h, rtccore.idl
Library uuid.lib
Windows Embedded CE Windows Embedded CE 6.0 and later

See Also

Reference

IRTCProfilePortManagement
IRTCPortManager3
IRTCPortManager

Concepts

IRTCPortManager2