IRTCClientPortManagement::GetPortRange

The GetPortRange method returns the minimum and maximum values of the port range configured for the specified port type. The port range is configured by the system administrator.

HRESULT GetPortRange(RTC_PORT_TYPEenPortType,
long*pdwMinValue,
long*pdwMaxValue);

Parameters

  • enPortType
    [in] RTC_PORT_TYPE enumeration containing the port type for the returned range.
  • pdwMinValue
    [out] Pointer to a long containing the minimum port range value for the port type specified in enPortType from the registry.
  • pdwMaxValue
    [out] Pointer to a long containing the maximum port range value for the port type specified in enPortType from the registry.

Return Values

RTC methods may return an RTC_E_ constant.

Value Meaning
RTC_E_CLIENT_NOT_INITIALIZED The client object is not initialized.
E_INVALIDARG Invalid enumeration value.
E_POINTER The pdwMaxValue or pdwMinValue parameter is not a valid pointer.

Remarks

The GetPortRange method returns the minimum and maximum values of the port range configured for the specified port type. This range is used while creating listening ports for media and SIP signaling traffic. The port range is configured by the system administrator. The values for the port ranges can be set in the registry under the registry key HKLM\Software\\Policies\\Microsoft\\Windows\\RTC\\PortRange. The ‘MinSipDynamicPort’ and ‘MaxSipDynamicPort’ values are used for setting the port range for SIP signaling traffic. The ‘MinMediaPort’ and ‘MaxMediaPort’ values under the above registry keys are used for setting the port range for Audio/Video RTP and RTCP traffic.

Requirements

Redistributable: Requires Rtcdll.dll on Windows 2000, Windows XP, and Windows Server 2003.
Header: Declared in Rtccore.h.
Library: Included as a resource in Rtcdll.dll.
GUID: IID_IRTCClientPortManagement is defined as d5df3f03-4bde-4417-aefe-71177bdaea66.

See Also

IRTCClientPortManagement, IRTCPortManager, IRTCSessionPortManagement