Owen Rudge : shlwapi: Implement stub for UrlFixupW.

Alexandre Julliard julliard at winehq.org
Tue Sep 8 08:56:05 CDT 2009


Module: wine
Branch: master
Commit: 5f28a6a2d5ec5064144d260ac2e65095b5c48098
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5f28a6a2d5ec5064144d260ac2e65095b5c48098

Author: Owen Rudge <orudge at codeweavers.com>
Date:   Wed Sep  2 16:38:12 2009 +0100

shlwapi: Implement stub for UrlFixupW.

---

 dlls/shlwapi/shlwapi.spec |    2 +-
 dlls/shlwapi/url.c        |   32 ++++++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+), 1 deletions(-)

diff --git a/dlls/shlwapi/shlwapi.spec b/dlls/shlwapi/shlwapi.spec
index 158d5e3..4acda49 100644
--- a/dlls/shlwapi/shlwapi.spec
+++ b/dlls/shlwapi/shlwapi.spec
@@ -459,7 +459,7 @@
 459 stdcall -noname SHExpandEnvironmentStringsA(str ptr long) kernel32.ExpandEnvironmentStringsA
 460 stdcall -noname SHExpandEnvironmentStringsW(wstr ptr long) kernel32.ExpandEnvironmentStringsW
 461 stdcall -noname SHGetAppCompatFlags(long)
-462 stub -noname UrlFixupW
+462 stdcall -noname UrlFixupW(wstr wstr long)
 463 stub -noname SHExpandEnvironmentStringsForUserA
 464 stub -noname SHExpandEnvironmentStringsForUserW
 465 stub -noname PathUnExpandEnvStringsForUserA
diff --git a/dlls/shlwapi/url.c b/dlls/shlwapi/url.c
index 6498862..f031297 100644
--- a/dlls/shlwapi/url.c
+++ b/dlls/shlwapi/url.c
@@ -2382,3 +2382,35 @@ HRESULT WINAPI MLBuildResURLW(LPCWSTR lpszLibName, HMODULE hMod, DWORD dwFlags,
   }
   return hRet;
 }
+
+/***********************************************************************
+ *             UrlFixupW [SHLWAPI.462]
+ *
+ * Checks the scheme part of a URL and attempts to correct misspellings.
+ *
+ * PARAMS
+ *  lpszUrl           [I] Pointer to the URL to be corrected
+ *  lpszTranslatedUrl [O] Pointer to a buffer to store corrected URL
+ *  dwMaxChars        [I] Maximum size of corrected URL
+ *
+ * RETURNS
+ *  success: S_OK if URL corrected or already correct
+ *  failure: S_FALSE if unable to correct / COM error code if other error
+ *
+ */
+HRESULT WINAPI UrlFixupW(LPCWSTR url, LPWSTR translatedUrl, DWORD maxChars)
+{
+    DWORD srcLen;
+
+    FIXME("(%s,%p,%d) STUB\n", debugstr_w(url), translatedUrl, maxChars);
+
+    if (!url)
+        return E_FAIL;
+
+    srcLen = lstrlenW(url);
+
+    /* For now just copy the URL directly */
+    lstrcpynW(translatedUrl, url, (maxChars < srcLen) ? maxChars : srcLen);
+
+    return S_OK;
+}




More information about the wine-cvs mailing list