IUriBuilder::SetPort method

Sets the port component.

Syntax

HRESULT SetPort(
  [in] BOOL  fHasPort,
  [in] DWORD dwNewValue
);

Parameters

  • fHasPort [in]
    BOOL that contains TRUE if a new port number is specified, or FALSE to use the default port for the protocol scheme.

  • dwNewValue [in]
    DWORD that contains the new port value.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

SetPort was introduced in Windows Internet Explorer 7.

Setting the port number invalidates Uri_PROPERTY_ABSOLUTE_URI, Uri_PROPERTY_DISPLAY_URI, and Uri_PROPERTY_AUTHORITY.

Requirements

Minimum supported client

Windows XP with SP2

Minimum supported server

Windows Server 2003

Product

Internet Explorer 7

Header

Urlmon.h

IDL

Urlmon.idl

DLL

Urlmon.dll

See also

IUriBuilder

SetHost