InternetCombineUrl (Windows CE 5.0)

Send Feedback

This function combines a base and relative URL into a single URL. The resultant URL is canonicalized.

BOOL WINAPI InternetCombineUrl(LPCTSTR lpszBaseUrl, LPCTSTR lpszRelativeUrl, LPTSTR lpszBuffer, LPDWORD lpdwBufferLength, DWORD dwFlags);

Parameters

  • lpszBaseUrl
    [in] Long pointer to the null-terminated string that contains the base URL to be combined.
  • lpszRelativeUrl
    [in] Long pointer to the null-terminated string that contains the relative URL to be combined.
  • lpszBuffer
    [out] Long pointer to a buffer that receives the null-terminated string that contains the resulting URL.
  • lpdwBufferLength
    [in, out] Long pointer to the size, in bytes, of the lpszBuffer buffer. If the function succeeds, this parameter receives the length, in characters, of the resultant combined URL — the length does not include the terminating null character. If the function fails, this parameter receives the length, in bytes, of the required buffer — the length includes the terminating null character.
  • dwFlags
    [in] Specifies the operation of the function. The following table shows the possible values. This parameter is one of these values.
    Value Description
    ICU_DECODE Converts all %XX sequences to characters, including escape sequences, before the URL is parsed.
    ICU_ENCODE_SPACES_ONLY Encodes spaces only.
    ICU_NO_ENCODE Does not convert unsafe characters to escape sequences.
    ICU_NO_META Does not remove meta sequences (such as "." and "..") from the URL.

Return Values

TRUE indicates success. FALSE indicates failure. To get extended error information, call GetLastError. The following table lists the possible error values for GetLastError and their descriptions.

Value Description
ERROR_BAD_PATHNAME The URLs could not be combined.
ERROR_INSUFFICIENT_BUFFER The buffer supplied to the function was insufficient or NULL. The DWORD indicated by the lpdwBufferLength parameter will contain the number of bytes required to hold the resultant, combined URL.
ERROR_INTERNET_INVALID_URL The format of the URL is invalid.
ERROR_INVALID_PARAMETER Bad string, buffer, buffer size, or flags parameter.

Remarks

The lpdwBufferLength parameter refers to the count of characters.

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Wininet.h.
Link Library: Wininet.lib.

See Also

InternetCanonicalizeUrl | WinInet Functions

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.