From dfe4710889f5a21dff0a55f28e622852e2eba0cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Sat, 28 May 2005 21:39:03 +0000 Subject: [PATCH] Alexandre Julliard - Added rules for building import libraries in the individual dll makefiles, and added support for building a .def.a static import library too. Uwe Bonnes - Test cases for URL_UNESCAPE and small fix. Francois Gouget - Assorted spelling fixes. svn path=/trunk/; revision=15623 --- reactos/lib/shlwapi/Makefile.in | 1 + reactos/lib/shlwapi/reg.c | 6 +++--- reactos/lib/shlwapi/url.c | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/reactos/lib/shlwapi/Makefile.in b/reactos/lib/shlwapi/Makefile.in index 7a802420bd9..3121339c7b3 100644 --- a/reactos/lib/shlwapi/Makefile.in +++ b/reactos/lib/shlwapi/Makefile.in @@ -4,6 +4,7 @@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = shlwapi.dll +IMPORTLIB = libshlwapi.$(IMPLIBEXT) IMPORTS = ole32 user32 gdi32 advapi32 kernel32 ntdll DELAYIMPORTS = oleaut32 EXTRALIBS = -luuid $(LIBUNICODE) diff --git a/reactos/lib/shlwapi/reg.c b/reactos/lib/shlwapi/reg.c index f4ce4373bfd..e6a7f1748a9 100644 --- a/reactos/lib/shlwapi/reg.c +++ b/reactos/lib/shlwapi/reg.c @@ -1300,10 +1300,10 @@ LONG WINAPI SHQueryInfoKeyW(HKEY hKey, LPDWORD pwSubKeys, LPDWORD pwSubKeyMax, * * REG_EXPAND_SZ: * case-1: the unexpanded string is smaller than the expanded one - * subcase-1: the buffer is to small to hold the unexpanded string: + * subcase-1: the buffer is too small to hold the unexpanded string: * function fails and returns the size of the unexpanded string. * - * subcase-2: buffer is to small to hold the expanded string: + * subcase-2: buffer is too small to hold the expanded string: * the function return success (!!) and the result is truncated * *** This is clearly an error in the native implementation. *** * @@ -1332,7 +1332,7 @@ DWORD WINAPI SHQueryValueExA( HKEY hKey, LPCSTR lpszValue, /* Expand type REG_EXPAND_SZ into REG_SZ */ LPSTR szData; - /* If the caller didn't supply a buffer or the buffer is to small we have + /* If the caller didn't supply a buffer or the buffer is too small we have * to allocate our own */ if ((!pvData) || (dwRet == ERROR_MORE_DATA) ) diff --git a/reactos/lib/shlwapi/url.c b/reactos/lib/shlwapi/url.c index eedb50b28fc..20f3d00669a 100644 --- a/reactos/lib/shlwapi/url.c +++ b/reactos/lib/shlwapi/url.c @@ -459,7 +459,7 @@ HRESULT WINAPI UrlCanonicalizeW(LPCWSTR pszUrl, LPWSTR pszCanonicalized, lpszUrlCpy[--nLen]=0; if(dwFlags & URL_UNESCAPE) - UrlUnescapeW(lpszUrlCpy, NULL, NULL, URL_UNESCAPE_INPLACE); + UrlUnescapeW(lpszUrlCpy, NULL, &nLen, URL_UNESCAPE_INPLACE); if((EscapeFlags = dwFlags & (URL_ESCAPE_UNSAFE | URL_ESCAPE_SPACES_ONLY | @@ -1160,7 +1160,7 @@ HRESULT WINAPI UrlUnescapeW( TRACE("(%s, %p, %p, 0x%08lx)\n", debugstr_w(pszUrl), pszUnescaped, pcchUnescaped, dwFlags); - if(!pszUrl || !pszUnescaped || !pcchUnescaped) + if(!pszUrl || (!pszUnescaped && !(dwFlags & URL_UNESCAPE_INPLACE))|| !pcchUnescaped) return E_INVALIDARG; if(dwFlags & URL_UNESCAPE_INPLACE)