Export (0) Print
Expand All

UrlHash function

Hashes a URL string.

Syntax


HRESULT UrlHash(
  _In_   PCTSTR pszURL,
  _Out_  BYTE *pbHash,
  DWORD cbHash
);

Parameters

pszURL [in]

Type: PCTSTR

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

pbHash [out]

Type: BYTE*

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

cbHash

Type: DWORD

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

Return value

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.

Requirements

Minimum supported client

Windows 2000 Professional, Windows XP [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Shlwapi.h

Library

Shlwapi.lib

DLL

Shlwapi.dll (version 5.0 or later)

Unicode and ANSI names

UrlHashW (Unicode) and UrlHashA (ANSI)

See also

HashData

 

 

Community Additions

ADD
Show:
© 2014 Microsoft