mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 11:26:10 +00:00
Implement UrlHashW.
This commit is contained in:
parent
911a17748f
commit
41b2609903
2 changed files with 24 additions and 2 deletions
|
@ -668,7 +668,7 @@ init SHLWAPI_LibMain
|
|||
@ stdcall UrlGetPartA(str ptr ptr long long) UrlGetPartA
|
||||
@ stdcall UrlGetPartW(wstr ptr ptr long long) UrlGetPartW
|
||||
@ stdcall UrlHashA(str ptr long) UrlHashA
|
||||
@ stub UrlHashW
|
||||
@ stdcall UrlHashW(wstr ptr long) UrlHashW
|
||||
@ stdcall UrlIsA(str long) UrlIsA
|
||||
@ stdcall UrlIsNoHistoryA(str) UrlIsNoHistoryA
|
||||
@ stdcall UrlIsNoHistoryW(wstr) UrlIsNoHistoryW
|
||||
|
|
|
@ -1172,7 +1172,29 @@ HRESULT WINAPI UrlHashA(LPCSTR pszUrl, unsigned char *lpDest, INT nDestLen)
|
|||
return E_INVALIDARG;
|
||||
|
||||
HashData(pszUrl, strlen(pszUrl), lpDest, nDestLen);
|
||||
return NOERROR;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* UrlHashW [SHLWAPI.@]
|
||||
*
|
||||
* See UrlHashA.
|
||||
*/
|
||||
HRESULT WINAPI UrlHashW(LPCWSTR pszUrl, unsigned char *lpDest, INT nDestLen)
|
||||
{
|
||||
char szUrl[MAX_PATH];
|
||||
|
||||
TRACE("(%s,%p,%d)\n",debugstr_w(pszUrl), lpDest, nDestLen);
|
||||
|
||||
if (IsBadStringPtrW(pszUrl, -1) || IsBadWritePtr(lpDest, nDestLen))
|
||||
return E_INVALIDARG;
|
||||
|
||||
/* Win32 hashes the data as an ASCII string, presumably so that both A+W
|
||||
* return the same digests for the same URL.
|
||||
*/
|
||||
WideCharToMultiByte(0, 0, pszUrl, -1, szUrl, MAX_PATH, 0, 0);
|
||||
HashData(szUrl, strlen(szUrl), lpDest, nDestLen);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|
|
Loading…
Reference in a new issue