UrlCompare function
Makes a case-sensitive comparison of two URL strings.
Syntax
int UrlCompare(
_In_ PCTSTR psz1,
_In_ PCTSTR psz2,
BOOL fIgnoreSlash
);
Parameters
- psz1 [in]
-
Type: PCTSTR
A null-terminated string of maximum length INTERNET_MAX_URL_LENGTH that contains the first URL.
- psz2 [in]
-
Type: PCTSTR
A null-terminated string of maximum length INTERNET_MAX_URL_LENGTH that contains the second URL.
- fIgnoreSlash
-
Type: BOOL
A value that is set to TRUE to have UrlCompare ignore a trailing '/' character on either or both URLs.
Return value
Type: int
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 psz1 is less than the string pointed to by psz2. 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.
Requirements
|
Minimum supported client |
Windows 2000 Professional, Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names |
UrlCompareW (Unicode) and UrlCompareA (ANSI) |
See also