Author: akhaldi Date: Mon Jul 20 22:57:09 2015 New Revision: 68501
URL: http://svn.reactos.org/svn/reactos?rev=68501&view=rev Log: [SHLWAPI] Sync with Wine Staging 1.7.47. CORE-9924
Modified: trunk/reactos/dll/win32/shlwapi/assoc.c trunk/reactos/dll/win32/shlwapi/ordinal.c trunk/reactos/dll/win32/shlwapi/path.c trunk/reactos/dll/win32/shlwapi/string.c trunk/reactos/dll/win32/shlwapi/url.c trunk/reactos/dll/win32/shlwapi/wsprintf.c trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/shlwapi/assoc.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/assoc.c?r... ============================================================================== --- trunk/reactos/dll/win32/shlwapi/assoc.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/assoc.c [iso-8859-1] Mon Jul 20 22:57:09 2015 @@ -88,6 +88,7 @@
return SHCoCreateInstance( NULL, &clsid, NULL, refiid, lpInterface ); } +
struct AssocPerceivedInfo { @@ -254,6 +255,7 @@ } return NULL; } +
/************************************************************************* * AssocGetPerceivedType [SHLWAPI.@]
Modified: trunk/reactos/dll/win32/shlwapi/ordinal.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/ordinal.c... ============================================================================== --- trunk/reactos/dll/win32/shlwapi/ordinal.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/ordinal.c [iso-8859-1] Mon Jul 20 22:57:09 2015 @@ -1364,7 +1364,7 @@ * * PARAMS * lpUnknown [I] Object supporting the IPersist interface - * lpClassId [O] Destination for Class Id + * clsid [O] Destination for Class Id * * RETURNS * Success: S_OK. lpClassId contains the Class Id requested. @@ -1372,23 +1372,30 @@ * E_NOINTERFACE If lpUnknown does not support IPersist, * Or an HRESULT error code. */ -HRESULT WINAPI IUnknown_GetClassID(IUnknown *lpUnknown, CLSID* lpClassId) -{ - IPersist* lpPersist; - HRESULT hRet = E_FAIL; - - TRACE("(%p,%s)\n", lpUnknown, debugstr_guid(lpClassId)); - - if (lpUnknown) - { - hRet = IUnknown_QueryInterface(lpUnknown,&IID_IPersist,(void**)&lpPersist); - if (SUCCEEDED(hRet)) +HRESULT WINAPI IUnknown_GetClassID(IUnknown *lpUnknown, CLSID *clsid) +{ + IPersist *persist; + HRESULT hr; + + TRACE("(%p, %p)\n", lpUnknown, clsid); + + if (!lpUnknown) { - IPersist_GetClassID(lpPersist, lpClassId); - IPersist_Release(lpPersist); - } - } - return hRet; + memset(clsid, 0, sizeof(*clsid)); + return E_FAIL; + } + + hr = IUnknown_QueryInterface(lpUnknown, &IID_IPersist, (void**)&persist); + if (hr != S_OK) + { + hr = IUnknown_QueryInterface(lpUnknown, &IID_IPersistFolder, (void**)&persist); + if (hr != S_OK) + return hr; + } + + hr = IPersist_GetClassID(persist, clsid); + IPersist_Release(persist); + return hr; }
/*************************************************************************
Modified: trunk/reactos/dll/win32/shlwapi/path.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/path.c?re... ============================================================================== --- trunk/reactos/dll/win32/shlwapi/path.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/path.c [iso-8859-1] Mon Jul 20 22:57:09 2015 @@ -21,7 +21,29 @@
#include "precomp.h"
+#ifdef __REACTOS__ int WINAPI IsNetDrive(int drive); +#else + +/* Get a function pointer from a DLL handle */ +#define GET_FUNC(func, module, name, fail) \ + do { \ + if (!func) { \ + if (!SHLWAPI_h##module && !(SHLWAPI_h##module = LoadLibraryA(#module ".dll"))) return fail; \ + func = (fn##func)GetProcAddress(SHLWAPI_h##module, name); \ + if (!func) return fail; \ + } \ + } while (0) + +/* DLL handles for late bound calls */ +static HMODULE SHLWAPI_hshell32; + +/* Function pointers for GET_FUNC macro; these need to be global because of gcc bug */ +typedef BOOL (WINAPI *fnpIsNetDrive)(int); +static fnpIsNetDrive pIsNetDrive; + +#endif /* __REACTOS__ */ +
HRESULT WINAPI SHGetWebFolderFilePathW(LPCWSTR,LPWSTR,DWORD);
@@ -2175,7 +2197,11 @@ { TRACE("(%s)\n",debugstr_a(lpszPath));
+#ifdef __REACTOS__ if (lpszPath && (lpszPath[0]=='\') && (lpszPath[1]=='\') && (lpszPath[2]!='?')) +#else + if (lpszPath && (lpszPath[0]=='\') && (lpszPath[1]=='\')) +#endif return TRUE; return FALSE; } @@ -2189,7 +2215,11 @@ { TRACE("(%s)\n",debugstr_w(lpszPath));
+#ifdef __REACTOS__ if (lpszPath && (lpszPath[0]=='\') && (lpszPath[1]=='\') && (lpszPath[2]!='?')) +#else + if (lpszPath && (lpszPath[0]=='\') && (lpszPath[1]=='\')) +#endif return TRUE; return FALSE; } @@ -3686,7 +3716,12 @@ dwDriveNum = PathGetDriveNumberA(lpszPath); if (dwDriveNum == -1) return FALSE; +#ifdef __REACTOS__ return IsNetDrive(dwDriveNum); +#else + GET_FUNC(pIsNetDrive, shell32, (LPCSTR)66, FALSE); /* ord 66 = shell32.IsNetDrive */ + return pIsNetDrive(dwDriveNum); +#endif }
/************************************************************************* @@ -3707,7 +3742,12 @@ dwDriveNum = PathGetDriveNumberW(lpszPath); if (dwDriveNum == -1) return FALSE; +#ifdef __REACTOS__ return IsNetDrive(dwDriveNum); +#else + GET_FUNC(pIsNetDrive, shell32, (LPCSTR)66, FALSE); /* ord 66 = shell32.IsNetDrive */ + return pIsNetDrive(dwDriveNum); +#endif }
/*************************************************************************
Modified: trunk/reactos/dll/win32/shlwapi/string.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/string.c?... ============================================================================== --- trunk/reactos/dll/win32/shlwapi/string.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/string.c [iso-8859-1] Mon Jul 20 22:57:09 2015 @@ -2684,8 +2684,7 @@ mem = HeapAlloc(GetProcessHeap(), 0, reqLen); if (mem) { - reqLen = WideCharToMultiByte(CodePage, 0, lpSrcStr, len, mem, - reqLen, NULL, NULL); + WideCharToMultiByte(CodePage, 0, lpSrcStr, len, mem, reqLen, NULL, NULL);
reqLen = SHTruncateString(mem, dstlen -1); reqLen++;
Modified: trunk/reactos/dll/win32/shlwapi/url.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/url.c?rev... ============================================================================== --- trunk/reactos/dll/win32/shlwapi/url.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/url.c [iso-8859-1] Mon Jul 20 22:57:09 2015 @@ -673,11 +673,11 @@ /* Canonicalize the base input prior to looking for the scheme */ myflags = dwFlags & (URL_DONT_SIMPLIFY | URL_UNESCAPE); len = INTERNET_MAX_URL_LENGTH; - ret = UrlCanonicalizeW(pszBase, mbase, &len, myflags); + UrlCanonicalizeW(pszBase, mbase, &len, myflags);
/* Canonicalize the relative input prior to looking for the scheme */ len = INTERNET_MAX_URL_LENGTH; - ret = UrlCanonicalizeW(pszRelative, mrelative, &len, myflags); + UrlCanonicalizeW(pszRelative, mrelative, &len, myflags);
/* See if the base has a scheme */ res1 = ParseURLW(mbase, &base);
Modified: trunk/reactos/dll/win32/shlwapi/wsprintf.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/wsprintf.... ============================================================================== --- trunk/reactos/dll/win32/shlwapi/wsprintf.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shlwapi/wsprintf.c [iso-8859-1] Mon Jul 20 22:57:09 2015 @@ -319,7 +319,7 @@ WPRINTF_FORMAT format; LPSTR p = buffer; UINT i, len, sign; - CHAR number[20]; + CHAR number[21]; /* 64bit number can be 18446744073709551616 which is 20 chars. and a \0 */ WPRINTF_DATA argData;
TRACE("%p %u %s\n", buffer, maxlen, debugstr_a(spec)); @@ -426,7 +426,7 @@ WPRINTF_FORMAT format; LPWSTR p = buffer; UINT i, len, sign; - CHAR number[20]; + CHAR number[21]; /* 64bit number can be 18446744073709551616 which is 20 chars. and a \0 */ WPRINTF_DATA argData;
TRACE("%p %u %s\n", buffer, maxlen, debugstr_w(spec));
Modified: trunk/reactos/media/doc/README.WINE URL: http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=6... ============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Mon Jul 20 22:57:09 2015 @@ -180,7 +180,7 @@ reactos/dll/win32/shdocvw # Synced to WineStaging-1.7.47 reactos/dll/win32/shell32 # Forked at Wine-20071011 reactos/dll/win32/shfolder # Synced to WineStaging-1.7.37 -reactos/dll/win32/shlwapi # Synced to WineStaging-1.7.37 +reactos/dll/win32/shlwapi # Synced to WineStaging-1.7.47 reactos/dll/win32/slbcsp # Synced to WineStaging-1.7.37 reactos/dll/win32/snmpapi # Synced to WineStaging-1.7.37 reactos/dll/win32/softpub # Synced to WineStaging-1.7.37