Group: Internet Functions (WinInet) - Library: wininet
URL: converting unsafe characters and spaces into escape sequences
BOOL InternetCanonicalizeUrl(
LPCTSTR lpszUrl,
LPTSTR lpszBuffer,
LPDWORD lpdwBufferLength,
DWORD dwFlags
);
DECLARE INTEGER InternetCanonicalizeUrl IN wininet;
STRING lpszUrl,;
STRING @ lpszBuffer,;
INTEGER @ lpdwBufferLength,;
INTEGER dwFlags
lpszUrl [in] Pointer to the string that contains the URL to canonicalize.
lpszBuffer [out] Pointer to the buffer that receives the resulting canonicalized URL.
lpdwBufferLength [in, out] Pointer to an unsigned long integer value that contains the length, in bytes, of the lpszBuffer buffer.
dwFlags [in] Unsigned long integer value that contains the flags that control canonicalization.
Returns TRUE if successful, or FALSE otherwise.
If no flags are specified (dwFlags = 0), the function converts all unsafe characters and meta sequences (such as .,\ .., and ...) to escape sequences.
See UrlEscape and UrlUnescape functions.