IUriBuilder::SetPath method

Sets the path component.

Syntax

HRESULT SetPath(
  [in] LPCWSTR pwzNewValue
);

Parameters

  • pwzNewValue [in]
    String variable that contains the new value, or NULL to remove the path component. Must specify an absolute path if not NULL.

Return value

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

Remarks

SetPath was introduced in Windows Internet Explorer 7.

The path component also includes the resource (filename and extension).

To specify a relative path, use CoInternetCombineIUri.

Setting the path component invalidates Uri_PROPERTY_ABSOLUTE_URI, Uri_PROPERTY_DISPLAY_URI, and Uri_PROPERTY_PATH_AND_QUERY.

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

Reference

SetFragment

SetQuery