UrlHashW

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



License: X11

ChangeLog:

  Jon Griffiths <jon_p_griffiths@yahoo.com>

  +dlls/shlwapi/shlwapi.spec,dlls/shlwapi/url.c
   Implement UrlHashW.


Cheers,
Jon


=====
"Don't wait for the seas to part, or messiahs to come;
 Don't you sit around and waste this chance..." - Live

jon_p_griffiths@yahoo.com

__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com
--- wine/dlls/shlwapi/shlwapi.spec	Mon Aug 19 05:43:44 2002
+++ wine-develop/dlls/shlwapi/shlwapi.spec	Mon Aug 19 14:13:05 2002
@@ -668,7 +668,7 @@
 @ 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(str ptr long) UrlHashW
 @ stdcall UrlIsA(str long) UrlIsA
 @ stdcall UrlIsNoHistoryA(str) UrlIsNoHistoryA
 @ stdcall UrlIsNoHistoryW(wstr) UrlIsNoHistoryW
--- wine/dlls/shlwapi/url.c	Mon Jul 29 21:51:30 2002
+++ wine-develop/dlls/shlwapi/url.c	Mon Aug 19 14:15:39 2002
@@ -1172,7 +1172,29 @@
     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;
 }
 
 /*************************************************************************

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux