IUriBuilder::SetHost method

Sets the host (fully qualify domain) component.

Syntax

HRESULT SetHost(
  [in] LPCWSTR pwzNewValue
);

Parameters

  • pwzNewValue [in]
    String variable that contains the new value. Must be neither empty nor NULL.

Return value

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

Remarks

SetHost was introduced in Windows Internet Explorer 7.

Setting the host component invalidates Uri_PROPERTY_ABSOLUTE_URI, Uri_PROPERTY_AUTHORITY, and Uri_PROPERTY_DOMAIN.

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

SetPort