Skip to content

Latest commit

 

History

History
98 lines (72 loc) · 2.68 KB

nf-shlwapi-urlhasha.md

File metadata and controls

98 lines (72 loc) · 2.68 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.UrlHashA
UrlHashA function (shlwapi.h)
Hashes a URL string. (ANSI)
UrlHashA
shlwapi/UrlHashA
shell\UrlHash.htm
shell
9c0ce709-e097-4501-bee1-b24df9d4828d
12/05/2018
UrlHash, UrlHash function [Windows Shell], UrlHashA, UrlHashW, _win32_UrlHash, shell.UrlHash, shlwapi/UrlHash, shlwapi/UrlHashA, shlwapi/UrlHashW
shlwapi.h
Windows
Windows 2000 Professional, Windows XP [desktop apps only]
Windows 2000 Server [desktop apps only]
UrlHashW (Unicode) and UrlHashA (ANSI)
Shlwapi.lib
Shlwapi.dll (version 5.0 or later)
Windows
19H1
UrlHashA
shlwapi/UrlHashA
c++
APIRef
kbSyntax
DllExport
Shlwapi.dll
API-MS-Win-Core-url-l1-1-0.dll
KernelBase.dll
UrlHash
UrlHashA
UrlHashW

UrlHashA function

-description

Hashes a URL string.

-parameters

-param pszUrl [in]

Type: PCTSTR

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

-param pbHash [out]

Type: BYTE*

A pointer to a buffer that, when this function returns successfully, receives the hashed array.

-param cbHash

Type: DWORD

The number of elements in the array at pbHash. It should be no larger than 256.

-returns

Type: HRESULT

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

-remarks

To hash a URL into a single byte, set cbHash = sizeof(BYTE) and pbHash = (LPBYTE)&bHashedValue, where bHashedValue is a one-byte buffer. To hash a URL into a DWORD, set cbHash = sizeof(DWORD) and pbHash = (LPBYTE)&dwHashedValue, where dwHashedValue is a DWORD buffer.

Note

The shlwapi.h header defines UrlHash 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

HashData