Skip to content

Latest commit

 

History

History
98 lines (72 loc) · 3.1 KB

nf-shlwapi-urlcomparew.md

File metadata and controls

98 lines (72 loc) · 3.1 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:shlwapi.UrlCompareW
UrlCompareW function (shlwapi.h)
Makes a case-sensitive comparison of two URL strings. (Unicode)
UrlCompare
UrlCompare function [Windows Shell]
UrlCompareW
_win32_UrlCompare
shell.UrlCompare
shlwapi/UrlCompare
shlwapi/UrlCompareW
shell\UrlCompare.htm
shell
d5c9e003-b85b-4f9f-b231-e3e4b71d4ce6
12/05/2018
UrlCompare, UrlCompare function [Windows Shell], UrlCompareA, UrlCompareW, _win32_UrlCompare, shell.UrlCompare, shlwapi/UrlCompare, shlwapi/UrlCompareA, shlwapi/UrlCompareW
shlwapi.h
Windows
Windows 2000 Professional, Windows XP [desktop apps only]
Windows 2000 Server [desktop apps only]
UrlCompareW (Unicode) and UrlCompareA (ANSI)
Shlwapi.lib
Shlwapi.dll (version 5.0 or later)
Windows
19H1
UrlCompareW
shlwapi/UrlCompareW
c++
APIRef
kbSyntax
DllExport
Shlwapi.dll
API-MS-Win-Core-url-l1-1-0.dll
KernelBase.dll
UrlCompare
UrlCompareA
UrlCompareW

UrlCompareW function

-description

Makes a case-sensitive comparison of two URL strings.

-parameters

-param psz1 [in]

Type: PCTSTR

A null-terminated string of maximum length INTERNET_MAX_URL_LENGTH that contains the first URL.

-param psz2 [in]

Type: PCTSTR

A null-terminated string of maximum length INTERNET_MAX_URL_LENGTH that contains the second URL.

-param fIgnoreSlash

Type: BOOL

A value that is set to TRUE to have UrlCompare ignore a trailing '/' character on either or both URLs.

-returns

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.

Note

The shlwapi.h header defines UrlCompare as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

-see-also

StrCmp