InternetCombineUrl
BOOL InternetCombineUrl(
IN LPCSTR lpszBaseUrl,
IN LPCSTR lpszRelativeUrl,
OUT LPSTR lpszBuffer,
IN OUT LPDWORD lpdwBufferLength,
IN DWORD dwFlags
);
Combines a base and relative URL into a single URL. The resultant URL will be canonicalized (see InternetCanonicalizeUrl).
- Returns TRUE if successful, or FALSE otherwise. To get extended error information, call
GetLastError. Possible errors include:
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. |
- lpszBaseUrl
- Address of the base URL to be combined.
- lpszRelativeUrl
- Address of the relative URL to be combined.
- lpszBuffer
- Address of a buffer that receives the resulting URL.
- lpdwBufferLength
- Size, in bytes, of the lpszBuffer buffer. If the function succeeds, this parameter receives the length, in characters, of the resultant combined URLthe length does not include the null terminator. If the function fails, this parameter receives the length, in bytes, of the required bufferthe length includes the null terminator.
- dwFlags
- Flags controlling the operation of the function. Can be one of the following values:
ICU_BROWSER_MODE | Does not encode or decode characters after "#" or "?", and does not remove trailing white space after "?". If this value is not specified, the entire URL is encoded and trailing white space is removed. |
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. |
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.