Compartir a través de


CoInternetCombineIUri function

Combines a base Uniform Resource Identifier (URI) and a relative URI into a full URI.

Syntax

HRESULT CoInternetCombineIUri(
             IUri      *pBaseUri,
             IUri      *pRelativeUri,
             DWORD     dwCombineFlags,
             IUri      **ppCombinedUri,
  _Reserved_ DWORD_PTR dwReserved
);

Parameters

pBaseUri

A pointer to the IUri interface of the base URI.

pRelativeUri

A pointer to the IUri interface of the relative URI.

dwCombineFlags

An unsigned long integer value that combines one or more of the following flags.

URL_DONT_SIMPLIFY

Equivalent to Uri_CREATE_NO_CANONICALIZE.

URL_DONT_UNESCAPE_EXTRA_INFO

Equivalent to Uri_CREATE_NO_DECODE_EXTRA_INFO.

URL_FILE_USE_PATHURL

Equivalent to Uri_CREATE_FILE_USE_DOS_PATH.

ppCombinedUri

A pointer to an IUri interface that receives the newly created combined URI. The client must call Release on the returned pointer.

dwReserved

Reserved. Must be set to 0.

Return value

Returns one of the following values.

Return code Description
S_OK

Success.

E_OUTOFMEMORY

There is insufficient memory to create the new IUri.

 

Remarks

The following examples demonstrate the effect of combining a base URI and a relative URI. Note that the first example ends in a resource, and the second example ends in a path segment.

BASE:      http://www.adatum.com/abc/def
RELATIVE:  xyz
COMBINED:  http://www.adatum.com/abc/xyz

BASE:      https://www.contoso.com/abc/def/
RELATIVE:  ../../default.htm
COMBINED:  https://www.contoso.com/default.htm

For more information on the algorithm used to combine a base URI and a relative URI, refer to RFC-3986 Section 5.2, "Relative Resolution."

Requirements

Minimum supported client

Windows XP with SP2

Minimum supported server

Windows Server 2003 with SP1

Product

Internet Explorer 7

Header

Urlmon.h

Library

Urlmon.lib

DLL

Urlmon.dll