Makes a case-sensitive comparison of two URL strings.
Syntax
int UrlCompare(
LPCTSTR pszURL1,
LPCTSTR pszURL2,
BOOL fIgnoreSlash
);
Parameters
- pszURL1
-
[in] A null-terminated string of maximum length INTERNET_MAX_URL_LENGTH that contains the first URL.
- pszURL2
-
[in] A null-terminated string of maximum length INTERNET_MAX_URL_LENGTH that contains the second URL.
- fIgnoreSlash
-
[in] A value that is set to TRUE to have UrlCompare ignore a trailing '/' character on either or both URLs.
Return Value
Returns zero if the two strings are equal. The function will also return zero if fIgnoreSlash is set to TRUE and one of the strings has a trailing '\' character. The function returns a negative integer if the string pointed to by pszURL1 is less than the string pointed to by pszURL2. Otherwise, it returns a positive integer.
Remarks
For best results, you should first canonicalize the URLs with UrlCanonicalize. Then, compare the canonicalized URLs with UrlCompare.
Function Information
| Minimum DLL Version | shlwapi.dll version 5.0 or later |
|---|
| Custom Implementation | No |
|---|
| Header | shlwapi.h |
|---|
| Import library | shlwapi.lib |
|---|
| Minimum operating systems |
Windows 2000, Windows NT 4.0 with Internet Explorer 5, Windows 98, Windows 95 with Internet Explorer 5 |
|---|
| Unicode | Implemented as
ANSI and Unicode versions. |
|---|
See Also
StrCmp