SRCDIR = @srcdir@\r
VPATH = @srcdir@\r
MODULE = shlwapi.dll\r
+IMPORTLIB = libshlwapi.$(IMPLIBEXT)\r
IMPORTS = ole32 user32 gdi32 advapi32 kernel32 ntdll\r
DELAYIMPORTS = oleaut32\r
EXTRALIBS = -luuid $(LIBUNICODE)\r
*\r
* REG_EXPAND_SZ:\r
* case-1: the unexpanded string is smaller than the expanded one\r
- * subcase-1: the buffer is to small to hold the unexpanded string:\r
+ * subcase-1: the buffer is too small to hold the unexpanded string:\r
* function fails and returns the size of the unexpanded string.\r
*\r
- * subcase-2: buffer is to small to hold the expanded string:\r
+ * subcase-2: buffer is too small to hold the expanded string:\r
* the function return success (!!) and the result is truncated\r
* *** This is clearly an error in the native implementation. ***\r
*\r
/* Expand type REG_EXPAND_SZ into REG_SZ */\r
LPSTR szData;\r
\r
- /* If the caller didn't supply a buffer or the buffer is to small we have\r
+ /* If the caller didn't supply a buffer or the buffer is too small we have\r
* to allocate our own\r
*/\r
if ((!pvData) || (dwRet == ERROR_MORE_DATA) )\r
lpszUrlCpy[--nLen]=0;\r
\r
if(dwFlags & URL_UNESCAPE)\r
- UrlUnescapeW(lpszUrlCpy, NULL, NULL, URL_UNESCAPE_INPLACE);\r
+ UrlUnescapeW(lpszUrlCpy, NULL, &nLen, URL_UNESCAPE_INPLACE);\r
\r
if((EscapeFlags = dwFlags & (URL_ESCAPE_UNSAFE |\r
URL_ESCAPE_SPACES_ONLY |\r
TRACE("(%s, %p, %p, 0x%08lx)\n", debugstr_w(pszUrl), pszUnescaped,\r
pcchUnescaped, dwFlags);\r
\r
- if(!pszUrl || !pszUnescaped || !pcchUnescaped)\r
+ if(!pszUrl || (!pszUnescaped && !(dwFlags & URL_UNESCAPE_INPLACE))|| !pcchUnescaped)\r
return E_INVALIDARG;\r
\r
if(dwFlags & URL_UNESCAPE_INPLACE)\r