Condividi tramite


CoInternetCombineUrl function

Combines a base URL and a relative URL into a full URL.

Syntax

HRESULT CoInternetCombineUrl(
             LPCWSTR pwzBaseUrl,
             LPCWSTR pwzRelativeUrl,
             DWORD   dwCombineFlags,
             LPWSTR  pwzResult,
             DWORD   cchResult,
             DWORD   *pcchResult,
  _Reserved_ DWORD   dwReserved
);

Parameters

  • pwzBaseUrl
    A pointer to a string value containing the base URL.

  • pwzRelativeUrl
    A pointer to a string value containing the relative URL.

  • dwCombineFlags
    Unsigned long integer value that combines one or more of the following flags. (See CreateUri for more information.)

    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.

     

  • pwzResult
    A pointer to a string variable where the full URL will be stored.

  • cchResult
    An unsigned long integer value that contains the size of the buffer.

  • pcchResult
    A pointer to an unsigned long integer value that receives the number of characters returned in pwzResult. Count does not include the terminating NULL character.

  • dwReserved
    Reserved. Must be set to 0.

Return value

Returns one of the following values.

Return code Description
S_OK

Success.

S_FALSE

The buffer is too small to contain the resulting URL.

E_POINTER

pwzResult is NULL, or the buffer is too small.

 

Remarks

The return value of this function differs depending on the protocol handler implementation used to perform the combine operation. If the function fails because the output buffer is too small, the number returned in pcchResult is the length in bytes required to hold the result, including the terminating NULL character.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Product

Internet Explorer 4.0

Header

Urlmon.h

Library

Urlmon.lib

DLL

Urlmon.dll