ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
July 2015
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
13 participants
257 discussions
Start a n
N
ew thread
[akhaldi] 68504: [TWAIN_32_WINETEST] Sync with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon Jul 20 23:00:00 2015 New Revision: 68504 URL:
http://svn.reactos.org/svn/reactos?rev=68504&view=rev
Log: [TWAIN_32_WINETEST] Sync with Wine Staging 1.7.47. CORE-9924 Modified: trunk/rostests/winetests/twain_32/dsm.c Modified: trunk/rostests/winetests/twain_32/dsm.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/twain_32/dsm.c?…
============================================================================== --- trunk/rostests/winetests/twain_32/dsm.c [iso-8859-1] (original) +++ trunk/rostests/winetests/twain_32/dsm.c [iso-8859-1] Mon Jul 20 23:00:00 2015 @@ -71,6 +71,8 @@ GlobalUnlock(hcontainer); return TRUE; } + else + *ret = 0; return FALSE; }
9 years, 5 months
1
0
0
0
[akhaldi] 68503: [USP10] Sync with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon Jul 20 22:59:38 2015 New Revision: 68503 URL:
http://svn.reactos.org/svn/reactos?rev=68503&view=rev
Log: [USP10] Sync with Wine Staging 1.7.47. CORE-9924 Modified: trunk/reactos/dll/win32/usp10/shape.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/usp10/shape.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/usp10/shape.c?re…
============================================================================== --- trunk/reactos/dll/win32/usp10/shape.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/usp10/shape.c [iso-8859-1] Mon Jul 20 22:59:38 2015 @@ -3336,13 +3336,8 @@ void SHAPE_ApplyOpenTypePositions(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *psa, const WORD* pwGlyphs, INT cGlyphs, int *piAdvance, GOFFSET *pGoffset ) { - const TEXTRANGE_PROPERTIES *rpRangeProperties; + const TEXTRANGE_PROPERTIES *rpRangeProperties = &ShapingData[psa->eScript].defaultGPOSTextRange; int i; - - rpRangeProperties = &ShapingData[psa->eScript].defaultGPOSTextRange; - - if (!rpRangeProperties) - return; load_ot_tables(hdc, psc); Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Mon Jul 20 22:59:38 2015 @@ -196,7 +196,7 @@ reactos/dll/win32/updspapi # Synced to WineStaging-1.7.37 reactos/dll/win32/url # Synced to WineStaging-1.7.37 reactos/dll/win32/urlmon # Synced to WineStaging-1.7.37 -reactos/dll/win32/usp10 # Synced to WineStaging-1.7.37 +reactos/dll/win32/usp10 # Synced to WineStaging-1.7.47 reactos/dll/win32/uxtheme # Forked reactos/dll/win32/vbscript # Synced to WineStaging-1.7.37 reactos/dll/win32/version # Synced to WineStaging-1.7.37
9 years, 5 months
1
0
0
0
[akhaldi] 68502: [SHLWAPI_WINETEST] Sync with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon Jul 20 22:58:24 2015 New Revision: 68502 URL:
http://svn.reactos.org/svn/reactos?rev=68502&view=rev
Log: [SHLWAPI_WINETEST] Sync with Wine Staging 1.7.47. CORE-9924 Modified: trunk/rostests/winetests/shlwapi/istream.c trunk/rostests/winetests/shlwapi/ordinal.c trunk/rostests/winetests/shlwapi/path.c trunk/rostests/winetests/shlwapi/url.c Modified: trunk/rostests/winetests/shlwapi/istream.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shlwapi/istream…
============================================================================== --- trunk/rostests/winetests/shlwapi/istream.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shlwapi/istream.c [iso-8859-1] Mon Jul 20 22:58:24 2015 @@ -489,7 +489,8 @@ static const CHAR testEx_txt[] = "\\testEx.txt"; BOOL delret; - trace("SHCreateStreamOnFileEx: testing mode %d, STGM flags %08x\n", mode, stgm); + if (winetest_debug > 1) + trace("SHCreateStreamOnFileEx: testing mode %d, STGM flags %08x\n", mode, stgm); /* Don't used a fixed path for the testEx.txt file */ GetTempPathA(MAX_PATH, test_fileA); Modified: trunk/rostests/winetests/shlwapi/ordinal.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shlwapi/ordinal…
============================================================================== --- trunk/rostests/winetests/shlwapi/ordinal.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shlwapi/ordinal.c [iso-8859-1] Mon Jul 20 22:58:24 2015 @@ -75,6 +75,7 @@ static HRESULT (WINAPI *pSKDeleteValueW)(DWORD, LPCWSTR, LPCWSTR); static HRESULT (WINAPI *pSKAllocValueW)(DWORD, LPCWSTR, LPCWSTR, DWORD*, void**, DWORD*); static HWND (WINAPI *pSHSetParentHwnd)(HWND, HWND); +static HRESULT (WINAPI *pIUnknown_GetClassID)(IUnknown*, CLSID*); static HMODULE hmlang; static HRESULT (WINAPI *pLcidToRfc1766A)(LCID, LPSTR, INT); @@ -553,10 +554,10 @@ hmem2 = pSHMapHandle(hmem, procid, GetCurrentProcessId(), 0, 0); /* It seems like Windows Vista/2008 uses a different internal implementation - * for shared memory, and calling SHMapHandle fails with ERROR_INVALID_HANDLE. */ - ok(hmem2 != NULL || broken(hmem2 == NULL && GetLastError() == ERROR_INVALID_HANDLE), + * for shared memory, and calling SHMapHandle fails. */ + ok(hmem2 != NULL || broken(hmem2 == NULL), "SHMapHandle failed: %u\n", GetLastError()); - if (hmem2 == NULL && GetLastError() == ERROR_INVALID_HANDLE) + if (hmem2 == NULL) { win_skip("Subprocess failed to map shared memory, skipping test\n"); return; @@ -3053,6 +3054,7 @@ MAKEFUNC(SHSetWindowBits, 165); MAKEFUNC(SHSetParentHwnd, 167); MAKEFUNC(ConnectToConnectionPoint, 168); + MAKEFUNC(IUnknown_GetClassID, 175); MAKEFUNC(SHSearchMapInt, 198); MAKEFUNC(SHCreateWorkerWindowA, 257); MAKEFUNC(GUIDFromStringA, 269); @@ -3158,6 +3160,95 @@ DestroyWindow(hwnd2); } +static HRESULT WINAPI testpersist_QI(IPersist *iface, REFIID riid, void **obj) +{ + if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IPersist)) { + *obj = iface; + IPersist_AddRef(iface); + return S_OK; + } + + *obj = NULL; + return E_NOINTERFACE; +} + +static HRESULT WINAPI testpersist_QI2(IPersist *iface, REFIID riid, void **obj) +{ + if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IPersistFolder)) { + *obj = iface; + IPersist_AddRef(iface); + return S_OK; + } + + *obj = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI testpersist_AddRef(IPersist *iface) +{ + return 2; +} + +static ULONG WINAPI testpersist_Release(IPersist *iface) +{ + return 1; +} + +static HRESULT WINAPI testpersist_GetClassID(IPersist *iface, CLSID *clsid) +{ + memset(clsid, 0xab, sizeof(*clsid)); + return 0x8fff2222; +} + +static IPersistVtbl testpersistvtbl = { + testpersist_QI, + testpersist_AddRef, + testpersist_Release, + testpersist_GetClassID +}; + +static IPersistVtbl testpersist2vtbl = { + testpersist_QI2, + testpersist_AddRef, + testpersist_Release, + testpersist_GetClassID +}; + +static IPersist testpersist = { &testpersistvtbl }; +static IPersist testpersist2 = { &testpersist2vtbl }; + +static void test_IUnknown_GetClassID(void) +{ + CLSID clsid, clsid2, clsid3; + HRESULT hr; + +if (0) /* crashes on native systems */ + hr = pIUnknown_GetClassID(NULL, NULL); + + memset(&clsid, 0xcc, sizeof(clsid)); + memset(&clsid3, 0xcc, sizeof(clsid3)); + hr = pIUnknown_GetClassID(NULL, &clsid); + ok(hr == E_FAIL, "got 0x%08x\n", hr); + ok(IsEqualCLSID(&clsid, &CLSID_NULL) || broken(IsEqualCLSID(&clsid, &clsid3)) /* win2k, winxp, win2k3 */, + "got wrong clsid %s\n", wine_dbgstr_guid(&clsid)); + + memset(&clsid, 0xcc, sizeof(clsid)); + memset(&clsid2, 0xab, sizeof(clsid2)); + hr = pIUnknown_GetClassID((IUnknown*)&testpersist, &clsid); + ok(hr == 0x8fff2222, "got 0x%08x\n", hr); + ok(IsEqualCLSID(&clsid, &clsid2) || broken(IsEqualCLSID(&clsid, &clsid3)) /* win2k3 */, + "got wrong clsid %s\n", wine_dbgstr_guid(&clsid)); + + /* IPersistFolder is also supported */ + memset(&clsid, 0xcc, sizeof(clsid)); + memset(&clsid2, 0xab, sizeof(clsid2)); + memset(&clsid3, 0xcc, sizeof(clsid3)); + hr = pIUnknown_GetClassID((IUnknown*)&testpersist2, &clsid); + ok(hr == 0x8fff2222, "got 0x%08x\n", hr); + ok(IsEqualCLSID(&clsid, &clsid2) || broken(IsEqualCLSID(&clsid, &clsid3)) /* win2k3 */, + "got wrong clsid %s\n", wine_dbgstr_guid(&clsid)); +} + START_TEST(ordinal) { char **argv; @@ -3212,6 +3303,7 @@ test_SHSetIniString(); test_SHGetShellKey(); test_SHSetParentHwnd(); + test_IUnknown_GetClassID(); FreeLibrary(hshell32); FreeLibrary(hmlang); Modified: trunk/rostests/winetests/shlwapi/path.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shlwapi/path.c?…
============================================================================== --- trunk/rostests/winetests/shlwapi/path.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shlwapi/path.c [iso-8859-1] Mon Jul 20 22:58:24 2015 @@ -188,13 +188,18 @@ /* ################ */ -static LPWSTR GetWideString(const char* szString) -{ - LPWSTR wszString = HeapAlloc(GetProcessHeap(), 0, (2*INTERNET_MAX_URL_LENGTH) * sizeof(WCHAR)); - - MultiByteToWideChar(CP_ACP, 0, szString, -1, wszString, INTERNET_MAX_URL_LENGTH); - - return wszString; +static LPWSTR GetWideString(const char *src) +{ + WCHAR *ret; + + if (!src) + return NULL; + + ret = HeapAlloc(GetProcessHeap(), 0, (2*INTERNET_MAX_URL_LENGTH) * sizeof(WCHAR)); + + MultiByteToWideChar(CP_ACP, 0, src, -1, ret, INTERNET_MAX_URL_LENGTH); + + return ret; } static void FreeWideString(LPWSTR wszString) Modified: trunk/rostests/winetests/shlwapi/url.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shlwapi/url.c?r…
============================================================================== --- trunk/rostests/winetests/shlwapi/url.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shlwapi/url.c [iso-8859-1] Mon Jul 20 22:58:24 2015 @@ -1150,7 +1150,7 @@ if (todo) { - todo_wine ok(dwSize == dwExpectLen && (!SUCCEEDED(hr) || strcmp(szReturnUrl, szExpectUrl)==0), + todo_wine ok(dwSize == dwExpectLen && (FAILED(hr) || strcmp(szReturnUrl, szExpectUrl)==0), "Expected %s (len=%d), but got %s (len=%d)\n", szExpectUrl, dwExpectLen, SUCCEEDED(hr) ? szReturnUrl : "(null)", dwSize); } else
9 years, 5 months
1
0
0
0
[akhaldi] 68501: [SHLWAPI] Sync with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
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?…
============================================================================== --- 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.…
============================================================================== --- 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?r…
============================================================================== --- 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?re…
============================================================================== --- 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=…
============================================================================== --- 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
9 years, 5 months
1
0
0
0
[akhaldi] 68500: [SHDOCVW] Sync with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon Jul 20 22:56:16 2015 New Revision: 68500 URL:
http://svn.reactos.org/svn/reactos?rev=68500&view=rev
Log: [SHDOCVW] Sync with Wine Staging 1.7.47. CORE-9924 Modified: trunk/reactos/dll/win32/shdocvw/shdocvw_main.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/shdocvw/shdocvw_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shdocvw/shdocvw_…
============================================================================== --- trunk/reactos/dll/win32/shdocvw/shdocvw_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shdocvw/shdocvw_main.c [iso-8859-1] Mon Jul 20 22:56:16 2015 @@ -64,7 +64,7 @@ */ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv) { - TRACE("\n"); + TRACE("(%s %s %p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); if(IsEqualGUID(&CLSID_WebBrowser, rclsid) || IsEqualGUID(&CLSID_WebBrowser_V1, rclsid) @@ -132,7 +132,8 @@ TRACE("%p 0x%x %p\n", hinst, fdwReason, fImpLoad); switch (fdwReason) { - case DLL_PROCESS_ATTACH: + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(hinst); break; case DLL_PROCESS_DETACH: if (fImpLoad) break; Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Mon Jul 20 22:56:16 2015 @@ -177,7 +177,7 @@ reactos/dll/win32/sensapi # Synced to WineStaging-1.7.37 reactos/dll/win32/setupapi # Forked at Wine-20050524 reactos/dll/win32/shdoclc # Synced to WineStaging-1.7.37 -reactos/dll/win32/shdocvw # Synced to WineStaging-1.7.37 +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
9 years, 5 months
1
0
0
0
[akhaldi] 68499: [SCRRUN_WINETEST] Sync with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon Jul 20 22:55:40 2015 New Revision: 68499 URL:
http://svn.reactos.org/svn/reactos?rev=68499&view=rev
Log: [SCRRUN_WINETEST] Sync with Wine Staging 1.7.47. CORE-9924 Modified: trunk/rostests/winetests/scrrun/CMakeLists.txt trunk/rostests/winetests/scrrun/dictionary.c trunk/rostests/winetests/scrrun/filesystem.c trunk/rostests/winetests/scrrun/scrrun.idl Modified: trunk/rostests/winetests/scrrun/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/scrrun/CMakeLis…
============================================================================== --- trunk/rostests/winetests/scrrun/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/winetests/scrrun/CMakeLists.txt [iso-8859-1] Mon Jul 20 22:55:40 2015 @@ -11,5 +11,5 @@ add_dependencies(scrrun_winetest scrrun_idlheader_test) target_link_libraries(scrrun_winetest uuid) set_module_type(scrrun_winetest win32cui) -add_importlibs(scrrun_winetest ole32 oleaut32 msvcrt kernel32) +add_importlibs(scrrun_winetest ole32 oleaut32 user32 msvcrt kernel32) add_cd_file(TARGET scrrun_winetest DESTINATION reactos/bin FOR all) Modified: trunk/rostests/winetests/scrrun/dictionary.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/scrrun/dictiona…
============================================================================== --- trunk/rostests/winetests/scrrun/dictionary.c [iso-8859-1] (original) +++ trunk/rostests/winetests/scrrun/dictionary.c [iso-8859-1] Mon Jul 20 22:55:40 2015 @@ -1,5 +1,6 @@ /* * Copyright (C) 2012 Alistair Leslie-Hughes + * Copyright 2015 Nikolay Sivov for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -22,6 +23,7 @@ #include "windows.h" #include "ole2.h" #include "oleauto.h" +#include "olectl.h" #include "dispex.h" #include "wine/test.h" @@ -44,10 +46,7 @@ hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, &IID_IDispatch, (void**)&disp); - if(FAILED(hr)) { - win_skip("Could not create FileSystem object: %08x\n", hr); - return; - } + ok(hr == S_OK, "got 0x%08x\n", hr); VariantInit(&key); VariantInit(&value); @@ -66,37 +65,1003 @@ V_VT(&value) = VT_BSTR; V_BSTR(&value) = SysAllocString(key_add_value); hr = IDictionary_Add(dict, &key, &value); - todo_wine ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK); + ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK); VariantClear(&value); exists = VARIANT_FALSE; hr = IDictionary_Exists(dict, &key, &exists); - todo_wine ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK); - todo_wine ok(exists == VARIANT_TRUE, "Expected TRUE but got FALSE.\n"); + ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK); + ok(exists == VARIANT_TRUE, "Expected TRUE but got FALSE.\n"); VariantClear(&key); exists = VARIANT_TRUE; V_VT(&key) = VT_BSTR; V_BSTR(&key) = SysAllocString(key_non_exist); hr = IDictionary_Exists(dict, &key, &exists); - todo_wine ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK); - todo_wine ok(exists == VARIANT_FALSE, "Expected FALSE but got TRUE.\n"); + ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK); + ok(exists == VARIANT_FALSE, "Expected FALSE but got TRUE.\n"); VariantClear(&key); hr = IDictionary_get_Count(dict, &count); ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK); - todo_wine ok(count == 1, "got %d, expected 1\n", count); + ok(count == 1, "got %d, expected 1\n", count); IDictionary_Release(dict); IDispatch_Release(disp); } +static void test_comparemode(void) +{ + CompareMethod method; + IDictionary *dict; + VARIANT key, item; + HRESULT hr; + + hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, + &IID_IDictionary, (void**)&dict); + ok(hr == S_OK, "got 0x%08x\n", hr); + +if (0) /* crashes on native */ + hr = IDictionary_get_CompareMode(dict, NULL); + + method = 10; + hr = IDictionary_get_CompareMode(dict, &method); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(method == BinaryCompare, "got %d\n", method); + + /* invalid mode value is not checked */ + hr = IDictionary_put_CompareMode(dict, 10); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IDictionary_get_CompareMode(dict, &method); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(method == 10, "got %d\n", method); + + hr = IDictionary_put_CompareMode(dict, DatabaseCompare); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IDictionary_get_CompareMode(dict, &method); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(method == DatabaseCompare, "got %d\n", method); + + /* try to change mode of a non-empty dict */ + V_VT(&key) = VT_I2; + V_I2(&key) = 0; + VariantInit(&item); + hr = IDictionary_Add(dict, &key, &item); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IDictionary_put_CompareMode(dict, BinaryCompare); + ok(hr == CTL_E_ILLEGALFUNCTIONCALL, "got 0x%08x\n", hr); + + IDictionary_Release(dict); +} + +static DWORD get_str_hash(const WCHAR *str, CompareMethod method) +{ + DWORD hash = 0; + + while (*str) { + WCHAR ch; + + if (method == TextCompare || method == DatabaseCompare) + ch = PtrToInt(CharLowerW(IntToPtr(*str))); + else + ch = *str; + + hash += (hash << 4) + ch; + str++; + } + + return hash % 1201; +} + +static DWORD get_num_hash(FLOAT num) +{ + return (*((DWORD*)&num)) % 1201; +} + +static DWORD get_ptr_hash(void *ptr) +{ + return PtrToUlong(ptr) % 1201; +} + +typedef union +{ + struct + { + unsigned int m : 23; + unsigned int exp_bias : 8; + unsigned int sign : 1; + } i; + float f; +} R4_FIELDS; + +typedef union +{ + struct + { + unsigned int m_lo : 32; /* 52 bits of precision */ + unsigned int m_hi : 20; + unsigned int exp_bias : 11; /* bias == 1023 */ + unsigned int sign : 1; + } i; + double d; +} R8_FIELDS; + +static HRESULT WINAPI test_unk_QI(IUnknown *iface, REFIID riid, void **obj) +{ + if (IsEqualIID(riid, &IID_IUnknown)) { + *obj = iface; + return S_OK; + } + + ok(0, "unexpected %s\n", wine_dbgstr_guid(riid)); + *obj = NULL; + return E_NOINTERFACE; +} + +static HRESULT WINAPI test_unk_no_QI(IUnknown *iface, REFIID riid, void **obj) +{ + *obj = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI test_unk_AddRef(IUnknown *iface) +{ + ok(0, "unxpected\n"); + return 2; +} + +static ULONG WINAPI test_unk_Release(IUnknown *iface) +{ + return 1; +} + +static IUnknownVtbl test_unk_vtbl = { + test_unk_QI, + test_unk_AddRef, + test_unk_Release +}; + +static IUnknownVtbl test_unk_no_vtbl = { + test_unk_no_QI, + test_unk_AddRef, + test_unk_Release +}; + +static HRESULT WINAPI test_disp_QI(IDispatch *iface, REFIID riid, void **obj) +{ + if (IsEqualIID(riid, &IID_IDispatch) || IsEqualIID(riid, &IID_IUnknown)) { + *obj = iface; + return S_OK; + } + + ok(0, "unexpected %s\n", wine_dbgstr_guid(riid)); + *obj = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI test_disp_AddRef(IDispatch *iface) +{ + ok(0, "unxpected\n"); + return 2; +} + +static ULONG WINAPI test_disp_Release(IDispatch *iface) +{ + return 1; +} + +static HRESULT WINAPI test_disp_GetTypeInfoCount(IDispatch *iface, UINT *count) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI test_disp_GetTypeInfo(IDispatch *iface, UINT index, LCID lcid, ITypeInfo **ti) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI test_disp_GetIDsOfNames(IDispatch *iface, REFIID riid, LPOLESTR *names, + UINT name_count, LCID lcid, DISPID *dispid) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI test_disp_Invoke(IDispatch *iface, DISPID dispid, REFIID riid, + LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *result, EXCEPINFO *excepinfo, UINT *arg_err) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static IDispatchVtbl test_disp_vtbl = { + test_disp_QI, + test_disp_AddRef, + test_disp_Release, + test_disp_GetTypeInfoCount, + test_disp_GetTypeInfo, + test_disp_GetIDsOfNames, + test_disp_Invoke +}; + +static IUnknown test_unk = { &test_unk_vtbl }; +static IUnknown test_unk2 = { &test_unk_no_vtbl }; +static IDispatch test_disp = { &test_disp_vtbl }; + +static void test_hash_value(void) +{ + /* string test data */ + static const WCHAR str_hash_tests[][10] = { + {'a','b','c','d',0}, + {'a','B','C','d','1',0}, + {'1','2','3',0}, + {'A',0}, + {'a',0}, + { 0 } + }; + + static const int int_hash_tests[] = { + 0, -1, 100, 1, 255 + }; + + static const FLOAT float_hash_tests[] = { + 0.0, -1.0, 100.0, 1.0, 255.0, 1.234 + }; + + IDictionary *dict; + VARIANT key, hash; + IDispatch *disp; + DWORD expected; + IUnknown *unk; + R8_FIELDS fx8; + R4_FIELDS fx4; + HRESULT hr; + unsigned i; + + hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, + &IID_IDictionary, (void**)&dict); + ok(hr == S_OK, "got 0x%08x\n", hr); + + V_VT(&key) = VT_BSTR; + V_BSTR(&key) = NULL; + VariantInit(&hash); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == 0, "got %d\n", V_I4(&hash)); + + for (i = 0; i < sizeof(str_hash_tests)/sizeof(str_hash_tests[0]); i++) { + expected = get_str_hash(str_hash_tests[i], BinaryCompare); + + hr = IDictionary_put_CompareMode(dict, BinaryCompare); + ok(hr == S_OK, "got 0x%08x\n", hr); + + V_VT(&key) = VT_BSTR; + V_BSTR(&key) = SysAllocString(str_hash_tests[i]); + VariantInit(&hash); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == expected, "%d: binary mode: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash), + expected); + VariantClear(&key); + + expected = get_str_hash(str_hash_tests[i], TextCompare); + hr = IDictionary_put_CompareMode(dict, TextCompare); + ok(hr == S_OK, "got 0x%08x\n", hr); + + V_VT(&key) = VT_BSTR; + V_BSTR(&key) = SysAllocString(str_hash_tests[i]); + VariantInit(&hash); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == expected, "%d: text mode: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash), + expected); + VariantClear(&key); + + expected = get_str_hash(str_hash_tests[i], DatabaseCompare); + hr = IDictionary_put_CompareMode(dict, DatabaseCompare); + ok(hr == S_OK, "got 0x%08x\n", hr); + + V_VT(&key) = VT_BSTR; + V_BSTR(&key) = SysAllocString(str_hash_tests[i]); + VariantInit(&hash); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == expected, "%d: db mode: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash), + expected); + VariantClear(&key); + } + + V_VT(&key) = VT_INT; + V_INT(&key) = 1; + VariantInit(&hash); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == ~0u, "got hash 0x%08x\n", V_I4(&hash)); + + V_VT(&key) = VT_UINT; + V_UINT(&key) = 1; + VariantInit(&hash); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == ~0u, "got hash 0x%08x\n", V_I4(&hash)); + + V_VT(&key) = VT_I1; + V_I1(&key) = 1; + VariantInit(&hash); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == ~0u || broken(V_I4(&hash) == 0xa1), "got hash 0x%08x\n", V_I4(&hash)); + + V_VT(&key) = VT_I8; + V_I8(&key) = 1; + VariantInit(&hash); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == ~0u, "got hash 0x%08x\n", V_I4(&hash)); + + V_VT(&key) = VT_UI2; + V_UI2(&key) = 1; + VariantInit(&hash); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == ~0u, "got hash 0x%08x\n", V_I4(&hash)); + + V_VT(&key) = VT_UI4; + V_UI4(&key) = 1; + VariantInit(&hash); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == ~0u, "got hash 0x%08x\n", V_I4(&hash)); + + for (i = 0; i < sizeof(int_hash_tests)/sizeof(int_hash_tests[0]); i++) { + SHORT i2; + BYTE ui1; + LONG i4; + + expected = get_num_hash(int_hash_tests[i]); + + V_VT(&key) = VT_I2; + V_I2(&key) = int_hash_tests[i]; + VariantInit(&hash); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash), + expected); + + i2 = int_hash_tests[i]; + V_VT(&key) = VT_I2|VT_BYREF; + V_I2REF(&key) = &i2; + VariantInit(&hash); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash), + expected); + + V_VT(&key) = VT_I4; + V_I4(&key) = int_hash_tests[i]; + VariantInit(&hash); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash), + expected); + + i4 = int_hash_tests[i]; + V_VT(&key) = VT_I4|VT_BYREF; + V_I4REF(&key) = &i4; + VariantInit(&hash); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash), + expected); + + expected = get_num_hash((FLOAT)(BYTE)int_hash_tests[i]); + V_VT(&key) = VT_UI1; + V_UI1(&key) = int_hash_tests[i]; + VariantInit(&hash); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash), + expected); + + ui1 = int_hash_tests[i]; + V_VT(&key) = VT_UI1|VT_BYREF; + V_UI1REF(&key) = &ui1; + VariantInit(&hash); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash), + expected); + } + + /* nan */ + fx4.f = 10.0; + fx4.i.exp_bias = 0xff; + + V_VT(&key) = VT_R4; + V_R4(&key) = fx4.f; + VariantInit(&hash); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == ~0u || broken(V_I4(&hash) == 0 /* win2k */ || + V_I4(&hash) == 0x1f4 /* vista, win2k8 */), "got hash 0x%08x\n", V_I4(&hash)); + + /* inf */ + fx4.f = 10.0; + fx4.i.m = 0; + fx4.i.exp_bias = 0xff; + + V_VT(&key) = VT_R4; + V_R4(&key) = fx4.f; + V_I4(&hash) = 10; + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == 0, "got hash 0x%08x\n", V_I4(&hash)); + + /* nan */ + fx8.d = 10.0; + fx8.i.exp_bias = 0x7ff; + + V_VT(&key) = VT_R8; + V_R8(&key) = fx8.d; + VariantInit(&hash); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == ~0u || broken(V_I4(&hash) == 0 /* win2k */ || + V_I4(&hash) == 0x1f4 /* vista, win2k8 */), "got hash 0x%08x\n", V_I4(&hash)); + + V_VT(&key) = VT_DATE; + V_DATE(&key) = fx8.d; + VariantInit(&hash); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == ~0u || broken(V_I4(&hash) == 0 /* win2k */ || + V_I4(&hash) == 0x1f4 /* vista, win2k8 */), "got hash 0x%08x\n", V_I4(&hash)); + + /* inf */ + fx8.d = 10.0; + fx8.i.m_lo = 0; + fx8.i.m_hi = 0; + fx8.i.exp_bias = 0x7ff; + + V_VT(&key) = VT_R8; + V_R8(&key) = fx8.d; + V_I4(&hash) = 10; + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == 0, "got hash 0x%08x\n", V_I4(&hash)); + + V_VT(&key) = VT_DATE; + V_DATE(&key) = fx8.d; + V_I4(&hash) = 10; + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == 0, "got hash 0x%08x\n", V_I4(&hash)); + + for (i = 0; i < sizeof(float_hash_tests)/sizeof(float_hash_tests[0]); i++) { + double dbl; + FLOAT flt; + DATE date; + + expected = get_num_hash(float_hash_tests[i]); + + V_VT(&key) = VT_R4; + V_R4(&key) = float_hash_tests[i]; + VariantInit(&hash); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash), + expected); + + flt = float_hash_tests[i]; + V_VT(&key) = VT_R4|VT_BYREF; + V_R4REF(&key) = &flt; + VariantInit(&hash); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash), + expected); + + V_VT(&key) = VT_R8; + V_R8(&key) = float_hash_tests[i]; + VariantInit(&hash); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash), + expected); + + dbl = float_hash_tests[i]; + V_VT(&key) = VT_R8|VT_BYREF; + V_R8REF(&key) = &dbl; + VariantInit(&hash); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash), + expected); + + V_VT(&key) = VT_DATE; + V_DATE(&key) = float_hash_tests[i]; + VariantInit(&hash); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash), + expected); + + V_VT(&key) = VT_DATE|VT_BYREF; + date = float_hash_tests[i]; + V_DATEREF(&key) = &date; + VariantInit(&hash); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash), + expected); + } + + /* interface pointers as keys */ + V_VT(&key) = VT_UNKNOWN; + V_UNKNOWN(&key) = 0; + VariantInit(&hash); + V_I4(&hash) = 1; + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == 0, "got hash 0x%08x, expected 0\n", V_I4(&hash)); + + /* QI doesn't work */ + V_VT(&key) = VT_UNKNOWN; + V_UNKNOWN(&key) = &test_unk2; + VariantInit(&hash); + expected = get_ptr_hash(&test_unk2); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k */, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == ~0u, "got hash 0x%08x, expected 0x%08x\n", V_I4(&hash), expected); + + V_VT(&key) = VT_UNKNOWN; + V_UNKNOWN(&key) = &test_unk; + VariantInit(&hash); + expected = get_ptr_hash(&test_unk); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == expected, "got hash 0x%08x, expected 0x%08x\n", V_I4(&hash), expected); + + /* interface without IDispatch support */ + V_VT(&key) = VT_DISPATCH; + V_DISPATCH(&key) = (IDispatch*)&test_unk; + VariantInit(&hash); + expected = get_ptr_hash(&test_unk); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == expected, "got hash 0x%08x, expected 0x%08x\n", V_I4(&hash), expected); + + V_VT(&key) = VT_DISPATCH; + V_DISPATCH(&key) = &test_disp; + VariantInit(&hash); + expected = get_ptr_hash(&test_disp); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == expected, "got hash 0x%08x, expected 0x%08x\n", V_I4(&hash), expected); + + /* same with BYREF */ +if (0) { /* crashes on native */ + V_VT(&key) = VT_UNKNOWN|VT_BYREF; + V_UNKNOWNREF(&key) = 0; + hr = IDictionary_get_HashVal(dict, &key, &hash); +} + unk = NULL; + V_VT(&key) = VT_UNKNOWN|VT_BYREF; + V_UNKNOWNREF(&key) = &unk; + VariantInit(&hash); + V_I4(&hash) = 1; + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == 0, "got hash 0x%08x, expected 0\n", V_I4(&hash)); + + V_VT(&key) = VT_UNKNOWN|VT_BYREF; + unk = &test_unk; + V_UNKNOWNREF(&key) = &unk; + VariantInit(&hash); + expected = get_ptr_hash(&test_unk); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == expected, "got hash 0x%08x, expected 0x%08x\n", V_I4(&hash), expected); + + /* interface without IDispatch support */ + V_VT(&key) = VT_DISPATCH|VT_BYREF; + unk = &test_unk; + V_DISPATCHREF(&key) = (IDispatch**)&unk; + VariantInit(&hash); + expected = get_ptr_hash(&test_unk); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == expected, "got hash 0x%08x, expected 0x%08x\n", V_I4(&hash), expected); + + V_VT(&key) = VT_DISPATCH|VT_BYREF; + disp = &test_disp; + V_DISPATCHREF(&key) = &disp; + VariantInit(&hash); + expected = get_ptr_hash(&test_disp); + hr = IDictionary_get_HashVal(dict, &key, &hash); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash)); + ok(V_I4(&hash) == expected, "got hash 0x%08x, expected 0x%08x\n", V_I4(&hash), expected); + + IDictionary_Release(dict); +} + +static void test_Exists(void) +{ + VARIANT_BOOL exists; + IDictionary *dict; + VARIANT key, item; + HRESULT hr; + + hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, + &IID_IDictionary, (void**)&dict); + ok(hr == S_OK, "got 0x%08x\n", hr); + +if (0) /* crashes on native */ + hr = IDictionary_Exists(dict, NULL, NULL); + + V_VT(&key) = VT_I2; + V_I2(&key) = 0; + hr = IDictionary_Exists(dict, &key, NULL); + ok(hr == CTL_E_ILLEGALFUNCTIONCALL, "got 0x%08x\n", hr); + + V_VT(&key) = VT_I2; + V_I2(&key) = 0; + exists = VARIANT_TRUE; + hr = IDictionary_Exists(dict, &key, &exists); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(exists == VARIANT_FALSE, "got %x\n", exists); + + VariantInit(&item); + hr = IDictionary_Add(dict, &key, &item); + ok(hr == S_OK, "got 0x%08x\n", hr); + + V_VT(&key) = VT_R4; + V_R4(&key) = 0.0; + hr = IDictionary_Add(dict, &key, &item); + ok(hr == CTL_E_KEY_ALREADY_EXISTS, "got 0x%08x\n", hr); + + V_VT(&key) = VT_I2; + V_I2(&key) = 0; + hr = IDictionary_Exists(dict, &key, NULL); + ok(hr == CTL_E_ILLEGALFUNCTIONCALL, "got 0x%08x\n", hr); + + V_VT(&key) = VT_I2; + V_I2(&key) = 0; + exists = VARIANT_FALSE; + hr = IDictionary_Exists(dict, &key, &exists); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(exists == VARIANT_TRUE, "got %x\n", exists); + + /* key of different type, but resolves to same hash value */ + V_VT(&key) = VT_R4; + V_R4(&key) = 0.0; + exists = VARIANT_FALSE; + hr = IDictionary_Exists(dict, &key, &exists); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(exists == VARIANT_TRUE, "got %x\n", exists); + + IDictionary_Release(dict); +} + +static void test_Keys(void) +{ + VARIANT key, keys, item; + IDictionary *dict; + LONG index; + HRESULT hr; + + hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, + &IID_IDictionary, (void**)&dict); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IDictionary_Keys(dict, NULL); + ok(hr == S_OK, "got 0x%08x\n", hr); + + VariantInit(&keys); + hr = IDictionary_Keys(dict, &keys); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&keys) == (VT_ARRAY|VT_VARIANT), "got %d\n", V_VT(&keys)); + VariantClear(&keys); + + V_VT(&key) = VT_R4; + V_R4(&key) = 0.0; + VariantInit(&item); + hr = IDictionary_Add(dict, &key, &item); + ok(hr == S_OK, "got 0x%08x\n", hr); + + VariantInit(&keys); + hr = IDictionary_Keys(dict, &keys); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&keys) == (VT_ARRAY|VT_VARIANT), "got %d\n", V_VT(&keys)); + + VariantInit(&key); + index = 0; + hr = SafeArrayGetElement(V_ARRAY(&keys), &index, &key); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&key) == VT_R4, "got %d\n", V_VT(&key)); + + index = SafeArrayGetDim(V_ARRAY(&keys)); + ok(index == 1, "got %d\n", index); + + hr = SafeArrayGetUBound(V_ARRAY(&keys), 1, &index); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(index == 0, "got %d\n", index); + + VariantClear(&keys); + + IDictionary_Release(dict); +} + +static void test_Remove(void) +{ + VARIANT key, item; + IDictionary *dict; + HRESULT hr; + + hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, + &IID_IDictionary, (void**)&dict); + ok(hr == S_OK, "got 0x%08x\n", hr); + +if (0) + hr = IDictionary_Remove(dict, NULL); + + /* nothing added yet */ + V_VT(&key) = VT_R4; + V_R4(&key) = 0.0; + hr = IDictionary_Remove(dict, &key); + ok(hr == CTL_E_ELEMENT_NOT_FOUND, "got 0x%08x\n", hr); + + VariantInit(&item); + hr = IDictionary_Add(dict, &key, &item); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IDictionary_Remove(dict, &key); + ok(hr == S_OK, "got 0x%08x\n", hr); + + IDictionary_Release(dict); +} + +static void test_Item(void) +{ + VARIANT key, item; + IDictionary *dict; + HRESULT hr; + + hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, + &IID_IDictionary, (void**)&dict); + ok(hr == S_OK, "got 0x%08x\n", hr); + + V_VT(&key) = VT_I2; + V_I2(&key) = 10; + V_VT(&item) = VT_I2; + V_I2(&item) = 123; + hr = IDictionary_get_Item(dict, &key, &item); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&item) == VT_EMPTY, "got %d\n", V_VT(&item)); + + V_VT(&key) = VT_I2; + V_I2(&key) = 10; + V_VT(&item) = VT_I2; + hr = IDictionary_get_Item(dict, &key, &item); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&item) == VT_EMPTY, "got %d\n", V_VT(&item)); + + IDictionary_Release(dict); +} + +static void test_Add(void) +{ + static const WCHAR testW[] = {'t','e','s','t','W',0}; + VARIANT key, item; + IDictionary *dict; + HRESULT hr; + BSTR str; + + hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, + &IID_IDictionary, (void**)&dict); + ok(hr == S_OK, "got 0x%08x\n", hr); + + str = SysAllocString(testW); + V_VT(&key) = VT_I2; + V_I2(&key) = 1; + V_VT(&item) = VT_BSTR|VT_BYREF; + V_BSTRREF(&item) = &str; + hr = IDictionary_Add(dict, &key, &item); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IDictionary_get_Item(dict, &key, &item); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&item) == VT_BSTR, "got %d\n", V_VT(&item)); + + SysFreeString(str); + + IDictionary_Release(dict); +} + +static void test_IEnumVARIANT(void) +{ + IUnknown *enum1, *enum2; + IEnumVARIANT *enumvar; + VARIANT key, item; + IDictionary *dict; + ULONG fetched; + HRESULT hr; + + hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, + &IID_IDictionary, (void**)&dict); + ok(hr == S_OK, "got 0x%08x\n", hr); + +if (0) /* crashes on native */ + hr = IDictionary__NewEnum(dict, NULL); + + hr = IDictionary__NewEnum(dict, &enum1); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IDictionary__NewEnum(dict, &enum2); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(enum1 != enum2, "got %p, %p\n", enum2, enum1); + IUnknown_Release(enum2); + + hr = IUnknown_QueryInterface(enum1, &IID_IEnumVARIANT, (void**)&enumvar); + ok(hr == S_OK, "got 0x%08x\n", hr); + IUnknown_Release(enum1); + + /* dictionary is empty */ + hr = IEnumVARIANT_Skip(enumvar, 1); + ok(hr == S_FALSE, "got 0x%08x\n", hr); + + hr = IEnumVARIANT_Skip(enumvar, 0); + ok(hr == S_OK, "got 0x%08x\n", hr); + + V_VT(&key) = VT_I2; + V_I2(&key) = 1; + V_VT(&item) = VT_I4; + V_I4(&item) = 100; + hr = IDictionary_Add(dict, &key, &item); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IEnumVARIANT_Skip(enumvar, 0); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IEnumVARIANT_Reset(enumvar); + ok(hr == S_OK, "got 0x%08x\n", hr); + hr = IEnumVARIANT_Skip(enumvar, 1); + ok(hr == S_OK, "got 0x%08x\n", hr); + hr = IEnumVARIANT_Skip(enumvar, 1); + ok(hr == S_FALSE, "got 0x%08x\n", hr); + + V_VT(&key) = VT_I2; + V_I2(&key) = 4000; + V_VT(&item) = VT_I4; + V_I4(&item) = 200; + hr = IDictionary_Add(dict, &key, &item); + ok(hr == S_OK, "got 0x%08x\n", hr); + + V_VT(&key) = VT_I2; + V_I2(&key) = 0; + V_VT(&item) = VT_I4; + V_I4(&item) = 300; + hr = IDictionary_Add(dict, &key, &item); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IEnumVARIANT_Reset(enumvar); + ok(hr == S_OK, "got 0x%08x\n", hr); + + VariantInit(&key); + hr = IEnumVARIANT_Next(enumvar, 1, &key, &fetched); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&key) == VT_I2, "got %d\n", V_VT(&key)); + ok(V_I2(&key) == 1, "got %d\n", V_I2(&key)); + ok(fetched == 1, "got %u\n", fetched); + + hr = IEnumVARIANT_Reset(enumvar); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IDictionary_Remove(dict, &key); + ok(hr == S_OK, "got 0x%08x\n", hr); + + VariantInit(&key); + hr = IEnumVARIANT_Next(enumvar, 1, &key, &fetched); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&key) == VT_I2, "got %d\n", V_VT(&key)); + ok(V_I2(&key) == 4000, "got %d\n", V_I2(&key)); + ok(fetched == 1, "got %u\n", fetched); + + VariantInit(&key); + hr = IEnumVARIANT_Next(enumvar, 1, &key, &fetched); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&key) == VT_I2, "got %d\n", V_VT(&key)); + ok(V_I2(&key) == 0, "got %d\n", V_I2(&key)); + ok(fetched == 1, "got %u\n", fetched); + + /* enumeration reached the bottom, add one more pair */ + VariantInit(&key); + hr = IEnumVARIANT_Next(enumvar, 1, &key, &fetched); + ok(hr == S_FALSE, "got 0x%08x\n", hr); + + V_VT(&key) = VT_I2; + V_I2(&key) = 13; + V_VT(&item) = VT_I4; + V_I4(&item) = 350; + hr = IDictionary_Add(dict, &key, &item); + ok(hr == S_OK, "got 0x%08x\n", hr); + + /* still doesn't work until Reset() */ + VariantInit(&key); + hr = IEnumVARIANT_Next(enumvar, 1, &key, &fetched); + ok(hr == S_FALSE, "got 0x%08x\n", hr); + + IEnumVARIANT_Release(enumvar); + IDictionary_Release(dict); +} + START_TEST(dictionary) { + IDispatch *disp; + HRESULT hr; + CoInitialize(NULL); + hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, + &IID_IDispatch, (void**)&disp); + if(FAILED(hr)) { + win_skip("Dictionary object is not supported: %08x\n", hr); + CoUninitialize(); + return; + } + IDispatch_Release(disp); + test_interfaces(); - + test_comparemode(); + test_hash_value(); + test_Exists(); + test_Keys(); + test_Remove(); + test_Item(); + test_Add(); + test_IEnumVARIANT(); CoUninitialize(); } Modified: trunk/rostests/winetests/scrrun/filesystem.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/scrrun/filesyst…
============================================================================== --- trunk/rostests/winetests/scrrun/filesystem.c [iso-8859-1] (original) +++ trunk/rostests/winetests/scrrun/filesystem.c [iso-8859-1] Mon Jul 20 22:55:40 2015 @@ -20,6 +20,7 @@ #define COBJMACROS #include <stdio.h> +#include <limits.h> #include "windows.h" #include "ole2.h" @@ -33,6 +34,9 @@ #include "scrrun.h" static IFileSystem3 *fs3; + +/* w2k and 2k3 error code. */ +#define E_VAR_NOT_SET 0x800a005b static inline ULONG get_refcount(IUnknown *iface) { @@ -537,11 +541,11 @@ static void test_GetFile(void) { static const WCHAR slW[] = {'\\',0}; - BSTR path; + BSTR path, str; WCHAR pathW[MAX_PATH]; FileAttribute fa; VARIANT size; - DWORD gfa; + DWORD gfa, new_gfa; IFile *file; HRESULT hr; HANDLE hf; @@ -571,10 +575,38 @@ hr = IFileSystem3_GetFile(fs3, path, &file); ok(hr == S_OK, "GetFile returned %x, expected S_OK\n", hr); + hr = IFile_get_Path(file, NULL); + ok(hr == E_POINTER, "got 0x%08x\n", hr); + + hr = IFile_get_Path(file, &str); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(!lstrcmpW(str, pathW), "got %s\n", wine_dbgstr_w(str)); + SysFreeString(str); + +#define FILE_ATTR_MASK (FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_HIDDEN | \ + FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_ARCHIVE | \ + FILE_ATTRIBUTE_REPARSE_POINT | FILE_ATTRIBUTE_COMPRESSED) + hr = IFile_get_Attributes(file, &fa); - gfa = GetFileAttributesW(pathW) & (FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_HIDDEN | - FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_ARCHIVE | - FILE_ATTRIBUTE_REPARSE_POINT | FILE_ATTRIBUTE_COMPRESSED); + gfa = GetFileAttributesW(pathW) & FILE_ATTR_MASK; + ok(hr == S_OK, "get_Attributes returned %x, expected S_OK\n", hr); + ok(fa == gfa, "fa = %x, expected %x\n", fa, gfa); + + hr = IFile_put_Attributes(file, gfa | FILE_ATTRIBUTE_READONLY); + ok(hr == S_OK, "put_Attributes failed: %08x\n", hr); + new_gfa = GetFileAttributesW(pathW) & FILE_ATTR_MASK; + ok(new_gfa == (gfa|FILE_ATTRIBUTE_READONLY), "new_gfa = %x, expected %x\n", new_gfa, gfa|FILE_ATTRIBUTE_READONLY); + + hr = IFile_get_Attributes(file, &fa); + ok(hr == S_OK, "get_Attributes returned %x, expected S_OK\n", hr); + ok(fa == new_gfa, "fa = %x, expected %x\n", fa, new_gfa); + + hr = IFile_put_Attributes(file, gfa); + ok(hr == S_OK, "put_Attributes failed: %08x\n", hr); + new_gfa = GetFileAttributesW(pathW) & FILE_ATTR_MASK; + ok(new_gfa == gfa, "new_gfa = %x, expected %x\n", new_gfa, gfa); + + hr = IFile_get_Attributes(file, &fa); ok(hr == S_OK, "get_Attributes returned %x, expected S_OK\n", hr); ok(fa == gfa, "fa = %x, expected %x\n", fa, gfa); @@ -1349,6 +1381,15 @@ hr = ITextStream_Read(stream, 1, &str); ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr); + hr = ITextStream_Close(stream); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = ITextStream_Read(stream, 1, &str); + ok(hr == CTL_E_BADFILEMODE || hr == E_VAR_NOT_SET, "got 0x%08x\n", hr); + + hr = ITextStream_Close(stream); + ok(hr == S_FALSE || hr == E_VAR_NOT_SET, "got 0x%08x\n", hr); + ITextStream_Release(stream); /* check it's created */ @@ -1862,6 +1903,88 @@ IDrive_Release(drive); IEnumVARIANT_Release(iter); +} + +static const struct extension_test { + WCHAR path[20]; + WCHAR ext[10]; +} extension_tests[] = { + { {'n','o','e','x','t',0}, {0} }, + { {'n','.','o','.','e','x','t',0}, {'e','x','t',0} }, + { {'n','.','o','.','e','X','t',0}, {'e','X','t',0} }, + { { 0 } } +}; + +static void test_GetExtensionName(void) +{ + BSTR path, ext; + HRESULT hr; + int i; + + for (i = 0; i < sizeof(extension_tests)/sizeof(extension_tests[0]); i++) { + + path = SysAllocString(extension_tests[i].path); + ext = NULL; + hr = IFileSystem3_GetExtensionName(fs3, path, &ext); + ok(hr == S_OK, "got 0x%08x\n", hr); + if (*extension_tests[i].ext) + ok(!lstrcmpW(ext, extension_tests[i].ext), "%d: path %s, got %s, expected %s\n", i, + wine_dbgstr_w(path), wine_dbgstr_w(ext), wine_dbgstr_w(extension_tests[i].ext)); + else + ok(ext == NULL, "%d: path %s, got %s, expected %s\n", i, + wine_dbgstr_w(path), wine_dbgstr_w(ext), wine_dbgstr_w(extension_tests[i].ext)); + + SysFreeString(path); + SysFreeString(ext); + } +} + +static void test_GetSpecialFolder(void) +{ + WCHAR pathW[MAX_PATH]; + IFolder *folder; + HRESULT hr; + DWORD ret; + BSTR path; + + hr = IFileSystem3_GetSpecialFolder(fs3, WindowsFolder, NULL); + ok(hr == E_POINTER, "got 0x%08x\n", hr); + + hr = IFileSystem3_GetSpecialFolder(fs3, TemporaryFolder+1, NULL); + ok(hr == E_POINTER, "got 0x%08x\n", hr); + + hr = IFileSystem3_GetSpecialFolder(fs3, TemporaryFolder+1, &folder); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + + hr = IFileSystem3_GetSpecialFolder(fs3, WindowsFolder, &folder); + ok(hr == S_OK, "got 0x%08x\n", hr); + hr = IFolder_get_Path(folder, &path); + ok(hr == S_OK, "got 0x%08x\n", hr); + GetWindowsDirectoryW(pathW, sizeof(pathW)/sizeof(WCHAR)); + ok(!lstrcmpiW(pathW, path), "got %s, expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(pathW)); + SysFreeString(path); + IFolder_Release(folder); + + hr = IFileSystem3_GetSpecialFolder(fs3, SystemFolder, &folder); + ok(hr == S_OK, "got 0x%08x\n", hr); + hr = IFolder_get_Path(folder, &path); + ok(hr == S_OK, "got 0x%08x\n", hr); + GetSystemDirectoryW(pathW, sizeof(pathW)/sizeof(WCHAR)); + ok(!lstrcmpiW(pathW, path), "got %s, expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(pathW)); + SysFreeString(path); + IFolder_Release(folder); + + hr = IFileSystem3_GetSpecialFolder(fs3, TemporaryFolder, &folder); + ok(hr == S_OK, "got 0x%08x\n", hr); + hr = IFolder_get_Path(folder, &path); + ok(hr == S_OK, "got 0x%08x\n", hr); + ret = GetTempPathW(sizeof(pathW)/sizeof(WCHAR), pathW); + if (ret && pathW[ret-1] == '\\') + pathW[ret-1] = 0; + + ok(!lstrcmpiW(pathW, path), "got %s, expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(pathW)); + SysFreeString(path); + IFolder_Release(folder); } START_TEST(filesystem) @@ -1898,6 +2021,8 @@ test_Read(); test_GetDriveName(); test_SerialNumber(); + test_GetExtensionName(); + test_GetSpecialFolder(); IFileSystem3_Release(fs3); Modified: trunk/rostests/winetests/scrrun/scrrun.idl URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/scrrun/scrrun.i…
============================================================================== --- trunk/rostests/winetests/scrrun/scrrun.idl [iso-8859-1] (original) +++ trunk/rostests/winetests/scrrun/scrrun.idl [iso-8859-1] Mon Jul 20 22:55:40 2015 @@ -24,7 +24,10 @@ cpp_quote("#undef DeleteFile") cpp_quote("#undef MoveFile") cpp_quote("#endif") -cpp_quote("#define CTL_E_ENDOFFILE STD_CTL_SCODE(62)") /* this is not defined in public headers */ +/* this is not defined in public headers */ +cpp_quote("#define CTL_E_ENDOFFILE STD_CTL_SCODE(62)") +cpp_quote("#define CTL_E_KEY_ALREADY_EXISTS STD_CTL_SCODE(457)") +cpp_quote("#define CTL_E_ELEMENT_NOT_FOUND STD_CTL_SCODE(32811)") [ uuid(420B2830-E718-11CF-893D-00A0C9054228),
9 years, 5 months
1
0
0
0
[akhaldi] 68498: [SCRRUN] Sync with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon Jul 20 22:55:19 2015 New Revision: 68498 URL:
http://svn.reactos.org/svn/reactos?rev=68498&view=rev
Log: [SCRRUN] Sync with Wine Staging 1.7.47. CORE-9924 Modified: trunk/reactos/dll/win32/scrrun/dictionary.c trunk/reactos/dll/win32/scrrun/filesystem.c trunk/reactos/dll/win32/scrrun/scrrun.c trunk/reactos/dll/win32/scrrun/scrrun.idl trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/scrrun/dictionary.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/scrrun/dictionar…
============================================================================== --- trunk/reactos/dll/win32/scrrun/dictionary.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/scrrun/dictionary.c [iso-8859-1] Mon Jul 20 22:55:19 2015 @@ -1,5 +1,6 @@ /* * Copyright (C) 2012 Alistair Leslie-Hughes + * Copyright 2015 Nikolay Sivov for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,16 +19,345 @@ #include "scrrun_private.h" +#include <olectl.h> +#include <wine/list.h> +#include <wine/port.h> +#include <wine/unicode.h> + +#define BUCKET_COUNT 509 +#define DICT_HASH_MOD 1201 + +/* Implementation details + + Dictionary contains one list that links all pairs, this way + order in which they were added is preserved. Each bucket has + its own list to hold all pairs in this bucket. Initially all + bucket lists are zeroed and we init them once we about to add + first pair. + + When pair is removed it's unlinked from both lists; if it was + a last pair in a bucket list it stays empty in initialized state. + + Preserving pair order is important for enumeration, so far testing + indicates that pairs are not reordered basing on hash value. + */ + +struct keyitem_pair { + struct list entry; + struct list bucket; + DWORD hash; + VARIANT key; + VARIANT item; +}; + typedef struct { IDictionary IDictionary_iface; - LONG ref; + + CompareMethod method; + LONG count; + struct list pairs; + struct list buckets[BUCKET_COUNT]; + struct list notifier; } dictionary; +struct dictionary_enum { + IEnumVARIANT IEnumVARIANT_iface; + LONG ref; + + dictionary *dict; + struct list *cur; + struct list notify; +}; + static inline dictionary *impl_from_IDictionary(IDictionary *iface) { return CONTAINING_RECORD(iface, dictionary, IDictionary_iface); +} + +static inline struct dictionary_enum *impl_from_IEnumVARIANT(IEnumVARIANT *iface) +{ + return CONTAINING_RECORD(iface, struct dictionary_enum, IEnumVARIANT_iface); +} + +static inline struct list *get_bucket_head(dictionary *dict, DWORD hash) +{ + return &dict->buckets[hash % BUCKET_COUNT]; +} + +static inline BOOL is_string_key(const VARIANT *key) +{ + return V_VT(key) == VT_BSTR || V_VT(key) == (VT_BSTR|VT_BYREF); +} + +/* Only for VT_BSTR or VT_BSTR|VT_BYREF types */ +static inline WCHAR *get_key_strptr(const VARIANT *key) +{ + if (V_VT(key) == VT_BSTR) + return V_BSTR(key); + + if (V_BSTRREF(key)) + return *V_BSTRREF(key); + + return NULL; +} + +/* should be used only when both keys are of string type, it's not checked */ +static inline int strcmp_key(const dictionary *dict, const VARIANT *key1, const VARIANT *key2) +{ + const WCHAR *str1, *str2; + + str1 = get_key_strptr(key1); + str2 = get_key_strptr(key2); + return dict->method == BinaryCompare ? strcmpW(str1, str2) : strcmpiW(str1, str2); +} + +static BOOL is_matching_key(const dictionary *dict, const struct keyitem_pair *pair, const VARIANT *key, DWORD hash) +{ + if (is_string_key(key) && is_string_key(&pair->key)) { + if (hash != pair->hash) + return FALSE; + + return strcmp_key(dict, key, &pair->key) == 0; + } + + if ((is_string_key(key) && !is_string_key(&pair->key)) || + (!is_string_key(key) && is_string_key(&pair->key))) + return FALSE; + + /* for numeric keys only check hash */ + return hash == pair->hash; +} + +static struct keyitem_pair *get_keyitem_pair(dictionary *dict, VARIANT *key) +{ + struct keyitem_pair *pair; + struct list *head, *entry; + VARIANT hash; + HRESULT hr; + + hr = IDictionary_get_HashVal(&dict->IDictionary_iface, key, &hash); + if (FAILED(hr)) + return NULL; + + head = get_bucket_head(dict, V_I4(&hash)); + if (!head->next || list_empty(head)) + return NULL; + + entry = list_head(head); + do { + pair = LIST_ENTRY(entry, struct keyitem_pair, bucket); + if (is_matching_key(dict, pair, key, V_I4(&hash))) return pair; + } while ((entry = list_next(head, entry))); + + return NULL; +} + +static HRESULT add_keyitem_pair(dictionary *dict, VARIANT *key, VARIANT *item) +{ + struct keyitem_pair *pair; + struct list *head; + VARIANT hash; + HRESULT hr; + + hr = IDictionary_get_HashVal(&dict->IDictionary_iface, key, &hash); + if (FAILED(hr)) + return hr; + + pair = heap_alloc(sizeof(*pair)); + if (!pair) + return E_OUTOFMEMORY; + + pair->hash = V_I4(&hash); + VariantInit(&pair->key); + VariantInit(&pair->item); + + hr = VariantCopyInd(&pair->key, key); + if (FAILED(hr)) + goto failed; + + hr = VariantCopyInd(&pair->item, item); + if (FAILED(hr)) + goto failed; + + head = get_bucket_head(dict, pair->hash); + if (!head->next) + /* this only happens once per bucket */ + list_init(head); + + /* link to bucket list and to full list */ + list_add_tail(head, &pair->bucket); + list_add_tail(&dict->pairs, &pair->entry); + dict->count++; + return S_OK; + +failed: + VariantClear(&pair->key); + VariantClear(&pair->item); + heap_free(pair); + return hr; +} + +static void free_keyitem_pair(struct keyitem_pair *pair) +{ + VariantClear(&pair->key); + VariantClear(&pair->item); + heap_free(pair); +} + +static HRESULT WINAPI dict_enum_QueryInterface(IEnumVARIANT *iface, REFIID riid, void **obj) +{ + struct dictionary_enum *This = impl_from_IEnumVARIANT(iface); + + TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), obj); + + if (IsEqualIID(riid, &IID_IEnumVARIANT) || IsEqualIID(riid, &IID_IUnknown)) { + *obj = iface; + IEnumVARIANT_AddRef(iface); + return S_OK; + } + else { + WARN("interface not supported %s\n", debugstr_guid(riid)); + *obj = NULL; + return E_NOINTERFACE; + } +} + +static ULONG WINAPI dict_enum_AddRef(IEnumVARIANT *iface) +{ + struct dictionary_enum *This = impl_from_IEnumVARIANT(iface); + TRACE("(%p)\n", This); + return InterlockedIncrement(&This->ref); +} + +static ULONG WINAPI dict_enum_Release(IEnumVARIANT *iface) +{ + struct dictionary_enum *This = impl_from_IEnumVARIANT(iface); + LONG ref; + + TRACE("(%p)\n", This); + + ref = InterlockedDecrement(&This->ref); + if(ref == 0) { + list_remove(&This->notify); + IDictionary_Release(&This->dict->IDictionary_iface); + heap_free(This); + } + + return ref; +} + +static HRESULT WINAPI dict_enum_Next(IEnumVARIANT *iface, ULONG count, VARIANT *keys, ULONG *fetched) +{ + struct dictionary_enum *This = impl_from_IEnumVARIANT(iface); + struct keyitem_pair *pair; + ULONG i = 0; + + TRACE("(%p)->(%u %p %p)\n", This, count, keys, fetched); + + if (fetched) + *fetched = 0; + + if (!count) + return S_OK; + + while (This->cur && i < count) { + pair = LIST_ENTRY(This->cur, struct keyitem_pair, entry); + VariantCopy(&keys[i], &pair->key); + This->cur = list_next(&This->dict->pairs, This->cur); + i++; + } + + if (fetched) + *fetched = i; + + return i < count ? S_FALSE : S_OK; +} + +static HRESULT WINAPI dict_enum_Skip(IEnumVARIANT *iface, ULONG count) +{ + struct dictionary_enum *This = impl_from_IEnumVARIANT(iface); + + TRACE("(%p)->(%u)\n", This, count); + + if (!count) + return S_OK; + + if (!This->cur) + return S_FALSE; + + while (count--) { + This->cur = list_next(&This->dict->pairs, This->cur); + if (!This->cur) break; + } + + return count == 0 ? S_OK : S_FALSE; +} + +static HRESULT WINAPI dict_enum_Reset(IEnumVARIANT *iface) +{ + struct dictionary_enum *This = impl_from_IEnumVARIANT(iface); + + TRACE("(%p)\n", This); + + This->cur = list_head(&This->dict->pairs); + return S_OK; +} + +static HRESULT create_dict_enum(dictionary*, IUnknown**); + +static HRESULT WINAPI dict_enum_Clone(IEnumVARIANT *iface, IEnumVARIANT **cloned) +{ + struct dictionary_enum *This = impl_from_IEnumVARIANT(iface); + TRACE("(%p)->(%p)\n", This, cloned); + return create_dict_enum(This->dict, (IUnknown**)cloned); +} + +static const IEnumVARIANTVtbl dictenumvtbl = { + dict_enum_QueryInterface, + dict_enum_AddRef, + dict_enum_Release, + dict_enum_Next, + dict_enum_Skip, + dict_enum_Reset, + dict_enum_Clone +}; + +static HRESULT create_dict_enum(dictionary *dict, IUnknown **ret) +{ + struct dictionary_enum *This; + + *ret = NULL; + + This = heap_alloc(sizeof(*This)); + if (!This) + return E_OUTOFMEMORY; + + This->IEnumVARIANT_iface.lpVtbl = &dictenumvtbl; + This->ref = 1; + This->cur = list_head(&dict->pairs); + list_add_tail(&dict->notifier, &This->notify); + This->dict = dict; + IDictionary_AddRef(&dict->IDictionary_iface); + + *ret = (IUnknown*)&This->IEnumVARIANT_iface; + return S_OK; +} + +static void notify_remove_pair(struct list *notifier, struct list *pair) +{ + struct dictionary_enum *dict_enum; + struct list *cur; + + LIST_FOR_EACH(cur, notifier) { + dict_enum = LIST_ENTRY(cur, struct dictionary_enum, notify); + if (!pair) + dict_enum->cur = list_head(&dict_enum->dict->pairs); + else if (dict_enum->cur == pair) { + dict_enum->cur = list_next(&dict_enum->dict->pairs, dict_enum->cur); + } + } } static HRESULT WINAPI dictionary_QueryInterface(IDictionary *iface, REFIID riid, void **obj) @@ -81,8 +411,10 @@ TRACE("(%p)\n", This); ref = InterlockedDecrement(&This->ref); - if(ref == 0) + if(ref == 0) { + IDictionary_RemoveAll(iface); heap_free(This); + } return ref; } @@ -155,134 +487,360 @@ return E_NOTIMPL; } -static HRESULT WINAPI dictionary_put_Item(IDictionary *iface, VARIANT *Key, VARIANT *pRetItem) -{ - dictionary *This = impl_from_IDictionary(iface); - - FIXME("(%p)->(%p %p)\n", This, Key, pRetItem); - - return E_NOTIMPL; -} - -static HRESULT WINAPI dictionary_get_Item(IDictionary *iface, VARIANT *Key, VARIANT *pRetItem) -{ - dictionary *This = impl_from_IDictionary(iface); - - FIXME("(%p)->(%p %p)\n", This, Key, pRetItem ); - - return E_NOTIMPL; -} - -static HRESULT WINAPI dictionary_Add(IDictionary *iface, VARIANT *Key, VARIANT *Item) -{ - dictionary *This = impl_from_IDictionary(iface); - - FIXME("(%p)->(%p %p)\n", This, Key, Item); - - return E_NOTIMPL; -} - -static HRESULT WINAPI dictionary_get_Count(IDictionary *iface, LONG *pCount) -{ - dictionary *This = impl_from_IDictionary(iface); - - FIXME("(%p)->(%p)\n", This, pCount); - - *pCount = 0; - - return S_OK; -} - -static HRESULT WINAPI dictionary_Exists(IDictionary *iface, VARIANT *Key, VARIANT_BOOL *pExists) -{ - dictionary *This = impl_from_IDictionary(iface); - - FIXME("(%p)->(%p %p)\n", This, Key, pExists); - - return E_NOTIMPL; -} - -static HRESULT WINAPI dictionary_Items(IDictionary *iface, VARIANT *pItemsArray) -{ - dictionary *This = impl_from_IDictionary(iface); - - FIXME("(%p)->(%p)\n", This, pItemsArray); - - return E_NOTIMPL; -} - -static HRESULT WINAPI dictionary_put_Key(IDictionary *iface, VARIANT *Key, VARIANT *rhs) -{ - dictionary *This = impl_from_IDictionary(iface); - - FIXME("(%p)->(%p %p)\n", This, Key, rhs); - - return E_NOTIMPL; -} - -static HRESULT WINAPI dictionary_Keys(IDictionary *iface, VARIANT *pKeysArray) -{ - dictionary *This = impl_from_IDictionary(iface); - - FIXME("(%p)->(%p)\n", This, pKeysArray); - - return E_NOTIMPL; -} - -static HRESULT WINAPI dictionary_Remove(IDictionary *iface, VARIANT *Key) -{ - dictionary *This = impl_from_IDictionary(iface); - - FIXME("(%p)->(%p)\n", This, Key); - - return E_NOTIMPL; +static HRESULT WINAPI dictionary_put_Item(IDictionary *iface, VARIANT *key, VARIANT *item) +{ + dictionary *This = impl_from_IDictionary(iface); + struct keyitem_pair *pair; + + TRACE("(%p)->(%s %s)\n", This, debugstr_variant(key), debugstr_variant(item)); + + if ((pair = get_keyitem_pair(This, key))) + return VariantCopyInd(&pair->item, item); + + return IDictionary_Add(iface, key, item); +} + +static HRESULT WINAPI dictionary_get_Item(IDictionary *iface, VARIANT *key, VARIANT *item) +{ + dictionary *This = impl_from_IDictionary(iface); + struct keyitem_pair *pair; + + TRACE("(%p)->(%s %p)\n", This, debugstr_variant(key), item); + + if ((pair = get_keyitem_pair(This, key))) + VariantCopy(item, &pair->item); + else { + VariantInit(item); + return IDictionary_Add(iface, key, item); + } + + return S_OK; +} + +static HRESULT WINAPI dictionary_Add(IDictionary *iface, VARIANT *key, VARIANT *item) +{ + dictionary *This = impl_from_IDictionary(iface); + + TRACE("(%p)->(%s %s)\n", This, debugstr_variant(key), debugstr_variant(item)); + + if (get_keyitem_pair(This, key)) + return CTL_E_KEY_ALREADY_EXISTS; + + return add_keyitem_pair(This, key, item); +} + +static HRESULT WINAPI dictionary_get_Count(IDictionary *iface, LONG *count) +{ + dictionary *This = impl_from_IDictionary(iface); + + TRACE("(%p)->(%p)\n", This, count); + + *count = This->count; + return S_OK; +} + +static HRESULT WINAPI dictionary_Exists(IDictionary *iface, VARIANT *key, VARIANT_BOOL *exists) +{ + dictionary *This = impl_from_IDictionary(iface); + + TRACE("(%p)->(%s %p)\n", This, debugstr_variant(key), exists); + + if (!exists) + return CTL_E_ILLEGALFUNCTIONCALL; + + *exists = get_keyitem_pair(This, key) != NULL ? VARIANT_TRUE : VARIANT_FALSE; + return S_OK; +} + +static HRESULT WINAPI dictionary_Items(IDictionary *iface, VARIANT *items) +{ + dictionary *This = impl_from_IDictionary(iface); + struct keyitem_pair *pair; + SAFEARRAYBOUND bound; + SAFEARRAY *sa; + VARIANT *v; + HRESULT hr; + LONG i; + + TRACE("(%p)->(%p)\n", This, items); + + if (!items) + return S_OK; + + bound.lLbound = 0; + bound.cElements = This->count; + sa = SafeArrayCreate(VT_VARIANT, 1, &bound); + if (!sa) + return E_OUTOFMEMORY; + + hr = SafeArrayAccessData(sa, (void**)&v); + if (FAILED(hr)) { + SafeArrayDestroy(sa); + return hr; + } + + i = 0; + LIST_FOR_EACH_ENTRY(pair, &This->pairs, struct keyitem_pair, entry) { + VariantCopy(&v[i], &pair->item); + i++; + } + SafeArrayUnaccessData(sa); + + V_VT(items) = VT_ARRAY|VT_VARIANT; + V_ARRAY(items) = sa; + return S_OK; +} + +static HRESULT WINAPI dictionary_put_Key(IDictionary *iface, VARIANT *key, VARIANT *newkey) +{ + dictionary *This = impl_from_IDictionary(iface); + struct keyitem_pair *pair; + VARIANT empty; + HRESULT hr; + + TRACE("(%p)->(%s %s)\n", This, debugstr_variant(key), debugstr_variant(newkey)); + + if ((pair = get_keyitem_pair(This, key))) { + /* found existing pair for a key, add new pair with new key + and old item and remove old pair after that */ + + hr = IDictionary_Add(iface, newkey, &pair->item); + if (FAILED(hr)) + return hr; + + return IDictionary_Remove(iface, key); + } + + VariantInit(&empty); + return IDictionary_Add(iface, newkey, &empty); +} + +static HRESULT WINAPI dictionary_Keys(IDictionary *iface, VARIANT *keys) +{ + dictionary *This = impl_from_IDictionary(iface); + struct keyitem_pair *pair; + SAFEARRAYBOUND bound; + SAFEARRAY *sa; + VARIANT *v; + HRESULT hr; + LONG i; + + TRACE("(%p)->(%p)\n", This, keys); + + if (!keys) + return S_OK; + + bound.lLbound = 0; + bound.cElements = This->count; + sa = SafeArrayCreate(VT_VARIANT, 1, &bound); + if (!sa) + return E_OUTOFMEMORY; + + hr = SafeArrayAccessData(sa, (void**)&v); + if (FAILED(hr)) { + SafeArrayDestroy(sa); + return hr; + } + + i = 0; + LIST_FOR_EACH_ENTRY(pair, &This->pairs, struct keyitem_pair, entry) { + VariantCopy(&v[i], &pair->key); + i++; + } + SafeArrayUnaccessData(sa); + + V_VT(keys) = VT_ARRAY|VT_VARIANT; + V_ARRAY(keys) = sa; + return S_OK; +} + +static HRESULT WINAPI dictionary_Remove(IDictionary *iface, VARIANT *key) +{ + dictionary *This = impl_from_IDictionary(iface); + struct keyitem_pair *pair; + + TRACE("(%p)->(%s)\n", This, debugstr_variant(key)); + + if (!(pair = get_keyitem_pair(This, key))) + return CTL_E_ELEMENT_NOT_FOUND; + + notify_remove_pair(&This->notifier, &pair->entry); + list_remove(&pair->entry); + list_remove(&pair->bucket); + This->count--; + + free_keyitem_pair(pair); + return S_OK; } static HRESULT WINAPI dictionary_RemoveAll(IDictionary *iface) { dictionary *This = impl_from_IDictionary(iface); - - FIXME("(%p)->()\n", This); - - return E_NOTIMPL; -} - -static HRESULT WINAPI dictionary_put_CompareMode(IDictionary *iface, CompareMethod pcomp) -{ - dictionary *This = impl_from_IDictionary(iface); - - FIXME("(%p)->()\n", This); - - return E_NOTIMPL; -} - -static HRESULT WINAPI dictionary_get_CompareMode(IDictionary *iface, CompareMethod *pcomp) -{ - dictionary *This = impl_from_IDictionary(iface); - - FIXME("(%p)->(%p)\n", This, pcomp); - - return E_NOTIMPL; -} - -static HRESULT WINAPI dictionary__NewEnum(IDictionary *iface, IUnknown **ppunk) -{ - dictionary *This = impl_from_IDictionary(iface); - - FIXME("(%p)->(%p)\n", This, ppunk); - - return E_NOTIMPL; -} - -static HRESULT WINAPI dictionary_get_HashVal(IDictionary *iface, VARIANT *Key, VARIANT *HashVal) -{ - dictionary *This = impl_from_IDictionary(iface); - - FIXME("(%p)->(%p %p)\n", This, Key, HashVal); - - return E_NOTIMPL; -} - + struct keyitem_pair *pair, *pair2; + + TRACE("(%p)\n", This); + + if (This->count == 0) + return S_OK; + + notify_remove_pair(&This->notifier, NULL); + LIST_FOR_EACH_ENTRY_SAFE(pair, pair2, &This->pairs, struct keyitem_pair, entry) { + list_remove(&pair->entry); + list_remove(&pair->bucket); + free_keyitem_pair(pair); + } + This->count = 0; + + return S_OK; +} + +static HRESULT WINAPI dictionary_put_CompareMode(IDictionary *iface, CompareMethod method) +{ + dictionary *This = impl_from_IDictionary(iface); + + TRACE("(%p)->(%d)\n", This, method); + + if (This->count) + return CTL_E_ILLEGALFUNCTIONCALL; + + This->method = method; + return S_OK; +} + +static HRESULT WINAPI dictionary_get_CompareMode(IDictionary *iface, CompareMethod *method) +{ + dictionary *This = impl_from_IDictionary(iface); + + TRACE("(%p)->(%p)\n", This, method); + + *method = This->method; + return S_OK; +} + +static HRESULT WINAPI dictionary__NewEnum(IDictionary *iface, IUnknown **ret) +{ + dictionary *This = impl_from_IDictionary(iface); + + TRACE("(%p)->(%p)\n", This, ret); + + return create_dict_enum(This, ret); +} + +static DWORD get_str_hash(const WCHAR *str, CompareMethod method) +{ + DWORD hash = 0; + + if (str) { + while (*str) { + WCHAR ch; + + ch = (method == TextCompare || method == DatabaseCompare) ? tolowerW(*str) : *str; + + hash += (hash << 4) + ch; + str++; + } + } + + return hash % DICT_HASH_MOD; +} + +static DWORD get_num_hash(FLOAT num) +{ + return (*((DWORD*)&num)) % DICT_HASH_MOD; +} + +static HRESULT get_flt_hash(FLOAT flt, LONG *hash) +{ + if (isinf(flt)) { + *hash = 0; + return S_OK; + } + else if (!isnan(flt)) { + *hash = get_num_hash(flt); + return S_OK; + } + + /* NaN case */ + *hash = ~0u; + return CTL_E_ILLEGALFUNCTIONCALL; +} + +static DWORD get_ptr_hash(void *ptr) +{ + return PtrToUlong(ptr) % DICT_HASH_MOD; +} + +static HRESULT WINAPI dictionary_get_HashVal(IDictionary *iface, VARIANT *key, VARIANT *hash) +{ + dictionary *This = impl_from_IDictionary(iface); + + TRACE("(%p)->(%s %p)\n", This, debugstr_variant(key), hash); + + V_VT(hash) = VT_I4; + switch (V_VT(key)) + { + case VT_BSTR|VT_BYREF: + case VT_BSTR: + V_I4(hash) = get_str_hash(get_key_strptr(key), This->method); + break; + case VT_UI1|VT_BYREF: + case VT_UI1: + V_I4(hash) = get_num_hash(V_VT(key) & VT_BYREF ? *V_UI1REF(key) : V_UI1(key)); + break; + case VT_I2|VT_BYREF: + case VT_I2: + V_I4(hash) = get_num_hash(V_VT(key) & VT_BYREF ? *V_I2REF(key) : V_I2(key)); + break; + case VT_I4|VT_BYREF: + case VT_I4: + V_I4(hash) = get_num_hash(V_VT(key) & VT_BYREF ? *V_I4REF(key) : V_I4(key)); + break; + case VT_UNKNOWN|VT_BYREF: + case VT_DISPATCH|VT_BYREF: + case VT_UNKNOWN: + case VT_DISPATCH: + { + IUnknown *src = (V_VT(key) & VT_BYREF) ? *V_UNKNOWNREF(key) : V_UNKNOWN(key); + IUnknown *unk = NULL; + + if (!src) { + V_I4(hash) = 0; + return S_OK; + } + + IUnknown_QueryInterface(src, &IID_IUnknown, (void**)&unk); + if (!unk) { + V_I4(hash) = ~0u; + return CTL_E_ILLEGALFUNCTIONCALL; + } + V_I4(hash) = get_ptr_hash(unk); + IUnknown_Release(unk); + break; + } + case VT_DATE|VT_BYREF: + case VT_DATE: + return get_flt_hash(V_VT(key) & VT_BYREF ? *V_DATEREF(key) : V_DATE(key), &V_I4(hash)); + case VT_R4|VT_BYREF: + case VT_R4: + return get_flt_hash(V_VT(key) & VT_BYREF ? *V_R4REF(key) : V_R4(key), &V_I4(hash)); + case VT_R8|VT_BYREF: + case VT_R8: + return get_flt_hash(V_VT(key) & VT_BYREF ? *V_R8REF(key) : V_R8(key), &V_I4(hash)); + case VT_INT: + case VT_UINT: + case VT_I1: + case VT_I8: + case VT_UI2: + case VT_UI4: + V_I4(hash) = ~0u; + return CTL_E_ILLEGALFUNCTIONCALL; + default: + FIXME("not implemented for type %d\n", V_VT(key)); + return E_NOTIMPL; + } + + return S_OK; +} static const struct IDictionaryVtbl dictionary_vtbl = { @@ -323,6 +881,11 @@ This->IDictionary_iface.lpVtbl = &dictionary_vtbl; This->ref = 1; + This->method = BinaryCompare; + This->count = 0; + list_init(&This->pairs); + list_init(&This->notifier); + memset(This->buckets, 0, sizeof(This->buckets)); *obj = &This->IDictionary_iface; Modified: trunk/reactos/dll/win32/scrrun/filesystem.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/scrrun/filesyste…
============================================================================== --- trunk/reactos/dll/win32/scrrun/filesystem.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/scrrun/filesystem.c [iso-8859-1] Mon Jul 20 22:55:19 2015 @@ -620,8 +620,16 @@ static HRESULT WINAPI textstream_Close(ITextStream *iface) { struct textstream *This = impl_from_ITextStream(iface); - FIXME("(%p): stub\n", This); - return E_NOTIMPL; + HRESULT hr = S_OK; + + TRACE("(%p)\n", This); + + if(!CloseHandle(This->file)) + hr = S_FALSE; + + This->file = NULL; + + return hr; } static const ITextStreamVtbl textstreamvtbl = { @@ -2533,11 +2541,20 @@ return hr; } -static HRESULT WINAPI file_get_Path(IFile *iface, BSTR *pbstrPath) +static HRESULT WINAPI file_get_Path(IFile *iface, BSTR *path) { struct file *This = impl_from_IFile(iface); - FIXME("(%p)->(%p)\n", This, pbstrPath); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, path); + + if (!path) + return E_POINTER; + + *path = SysAllocString(This->path); + if (!*path) + return E_OUTOFMEMORY; + + return S_OK; } static HRESULT WINAPI file_get_Name(IFile *iface, BSTR *name) @@ -2623,8 +2640,10 @@ static HRESULT WINAPI file_put_Attributes(IFile *iface, FileAttribute pfa) { struct file *This = impl_from_IFile(iface); - FIXME("(%p)->(%x)\n", This, pfa); - return E_NOTIMPL; + + TRACE("(%p)->(%x)\n", This, pfa); + + return SetFileAttributesW(This->path, pfa) ? S_OK : create_error(GetLastError()); } static HRESULT WINAPI file_get_DateCreated(IFile *iface, DATE *pdate) @@ -3090,12 +3109,26 @@ return S_OK; } -static HRESULT WINAPI filesys_GetExtensionName(IFileSystem3 *iface, BSTR Path, - BSTR *pbstrResult) -{ - FIXME("%p %s %p\n", iface, debugstr_w(Path), pbstrResult); - - return E_NOTIMPL; +static HRESULT WINAPI filesys_GetExtensionName(IFileSystem3 *iface, BSTR path, + BSTR *ext) +{ + INT len; + + TRACE("%p %s %p\n", iface, debugstr_w(path), ext); + + *ext = NULL; + len = SysStringLen(path); + while (len) { + if (path[len-1] == '.') { + *ext = SysAllocString(&path[len]); + if (!*ext) + return E_OUTOFMEMORY; + break; + } + len--; + } + + return S_OK; } static HRESULT WINAPI filesys_GetAbsolutePathName(IFileSystem3 *iface, BSTR Path, @@ -3249,11 +3282,41 @@ static HRESULT WINAPI filesys_GetSpecialFolder(IFileSystem3 *iface, SpecialFolderConst SpecialFolder, - IFolder **ppfolder) -{ - FIXME("%p %d %p\n", iface, SpecialFolder, ppfolder); - - return E_NOTIMPL; + IFolder **folder) +{ + WCHAR pathW[MAX_PATH]; + DWORD ret; + + TRACE("%p %d %p\n", iface, SpecialFolder, folder); + + if (!folder) + return E_POINTER; + + *folder = NULL; + + switch (SpecialFolder) + { + case WindowsFolder: + ret = GetWindowsDirectoryW(pathW, sizeof(pathW)/sizeof(WCHAR)); + break; + case SystemFolder: + ret = GetSystemDirectoryW(pathW, sizeof(pathW)/sizeof(WCHAR)); + break; + case TemporaryFolder: + ret = GetTempPathW(sizeof(pathW)/sizeof(WCHAR), pathW); + /* we don't want trailing backslash */ + if (ret && pathW[ret-1] == '\\') + pathW[ret-1] = 0; + break; + default: + FIXME("unknown special folder type, %d\n", SpecialFolder); + return E_INVALIDARG; + } + + if (!ret) + return HRESULT_FROM_WIN32(GetLastError()); + + return create_folder(pathW, folder); } static inline HRESULT delete_file(const WCHAR *file, DWORD file_len, VARIANT_BOOL force) Modified: trunk/reactos/dll/win32/scrrun/scrrun.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/scrrun/scrrun.c?…
============================================================================== --- trunk/reactos/dll/win32/scrrun/scrrun.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/scrrun/scrrun.c [iso-8859-1] Mon Jul 20 22:55:19 2015 @@ -202,11 +202,11 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) { if(IsEqualGUID(&CLSID_FileSystemObject, rclsid)) { - TRACE("(CLSID_WshShell %s %p)\n", debugstr_guid(riid), ppv); + TRACE("(CLSID_FileSystemObject %s %p)\n", debugstr_guid(riid), ppv); return IClassFactory_QueryInterface(&FileSystemFactory, riid, ppv); } else if(IsEqualGUID(&CLSID_Dictionary, rclsid)) { - TRACE("(CLSID_WshShell %s %p)\n", debugstr_guid(riid), ppv); + TRACE("(CLSID_Dictionary %s %p)\n", debugstr_guid(riid), ppv); return IClassFactory_QueryInterface(&DictionaryFactory, riid, ppv); } Modified: trunk/reactos/dll/win32/scrrun/scrrun.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/scrrun/scrrun.id…
============================================================================== --- trunk/reactos/dll/win32/scrrun/scrrun.idl [iso-8859-1] (original) +++ trunk/reactos/dll/win32/scrrun/scrrun.idl [iso-8859-1] Mon Jul 20 22:55:19 2015 @@ -27,7 +27,10 @@ cpp_quote("#undef DeleteFile") cpp_quote("#undef MoveFile") cpp_quote("#endif") -cpp_quote("#define CTL_E_ENDOFFILE STD_CTL_SCODE(62)") /* this is not defined in public headers */ +/* this is not defined in public headers */ +cpp_quote("#define CTL_E_ENDOFFILE STD_CTL_SCODE(62)") +cpp_quote("#define CTL_E_KEY_ALREADY_EXISTS STD_CTL_SCODE(457)") +cpp_quote("#define CTL_E_ELEMENT_NOT_FOUND STD_CTL_SCODE(32811)") [ uuid(420B2830-E718-11CF-893D-00A0C9054228), Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Mon Jul 20 22:55:19 2015 @@ -171,7 +171,7 @@ reactos/dll/win32/rsaenh # Synced to WineStaging-1.7.47 reactos/dll/win32/sccbase # Synced to WineStaging-1.7.37 reactos/dll/win32/schannel # Synced to WineStaging-1.7.37 -reactos/dll/win32/scrrun # Synced to WineStaging-1.7.37 +reactos/dll/win32/scrrun # Synced to WineStaging-1.7.47 reactos/dll/win32/secur32 # Forked reactos/dll/win32/security # Forked (different .spec) reactos/dll/win32/sensapi # Synced to WineStaging-1.7.37
9 years, 5 months
1
0
0
0
[akhaldi] 68497: [RSAENH] Sync with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon Jul 20 22:54:41 2015 New Revision: 68497 URL:
http://svn.reactos.org/svn/reactos?rev=68497&view=rev
Log: [RSAENH] Sync with Wine Staging 1.7.47. CORE-9924 Modified: trunk/reactos/dll/win32/rsaenh/mpi.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/rsaenh/mpi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rsaenh/mpi.c?rev…
============================================================================== --- trunk/reactos/dll/win32/rsaenh/mpi.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/rsaenh/mpi.c [iso-8859-1] Mon Jul 20 22:54:41 2015 @@ -1783,7 +1783,7 @@ } /* power of two ? */ - if (s_is_power_of_two(b, &ix) == 1) { + if (s_is_power_of_two(b, &ix)) { if (d != NULL) { *d = a->dp[0] & ((((mp_digit)1)<<ix) - 1); } @@ -1955,8 +1955,8 @@ dr = 0; - /* if the modulus is odd or dr != 0 use the fast method */ - if (mp_isodd (P) == 1 || dr != 0) { + /* if the modulus is odd use the fast method */ + if (mp_isodd (P) == 1) { return mp_exptmod_fast (G, X, P, Y, dr); } else { /* otherwise use the generic Barrett reduction technique */ Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Mon Jul 20 22:54:41 2015 @@ -168,7 +168,7 @@ reactos/dll/win32/riched32 # Synced to WineStaging-1.7.37 reactos/dll/win32/rpcrt4 # Synced to Wine-1.7.17 reactos/dll/win32/rsabase # Synced to WineStaging-1.7.37 -reactos/dll/win32/rsaenh # Synced to WineStaging-1.7.37 +reactos/dll/win32/rsaenh # Synced to WineStaging-1.7.47 reactos/dll/win32/sccbase # Synced to WineStaging-1.7.37 reactos/dll/win32/schannel # Synced to WineStaging-1.7.37 reactos/dll/win32/scrrun # Synced to WineStaging-1.7.37
9 years, 5 months
1
0
0
0
[akhaldi] 68496: [RICHED20_WINETEST] Sync with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon Jul 20 22:53:56 2015 New Revision: 68496 URL:
http://svn.reactos.org/svn/reactos?rev=68496&view=rev
Log: [RICHED20_WINETEST] Sync with Wine Staging 1.7.47. CORE-9924 Modified: trunk/rostests/winetests/riched20/CMakeLists.txt trunk/rostests/winetests/riched20/editor.c trunk/rostests/winetests/riched20/richole.c trunk/rostests/winetests/riched20/txtsrv.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/rostests/winetests/riched20/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/riched20/CMakeL…
Modified: trunk/rostests/winetests/riched20/editor.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/riched20/editor…
Modified: trunk/rostests/winetests/riched20/richole.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/riched20/richol…
Modified: trunk/rostests/winetests/riched20/txtsrv.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/riched20/txtsrv…
9 years, 5 months
1
0
0
0
[akhaldi] 68495: [RICHED20] Sync with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon Jul 20 22:53:23 2015 New Revision: 68495 URL:
http://svn.reactos.org/svn/reactos?rev=68495&view=rev
Log: [RICHED20] Sync with Wine Staging 1.7.47. CORE-9924 Added: trunk/reactos/dll/win32/riched20/riched_tom.idl (with props) trunk/reactos/dll/win32/riched20/riched_tom.rgs (with props) Modified: trunk/reactos/dll/win32/riched20/CMakeLists.txt trunk/reactos/dll/win32/riched20/editor.c trunk/reactos/dll/win32/riched20/editor.h trunk/reactos/dll/win32/riched20/editstr.h trunk/reactos/dll/win32/riched20/res.h trunk/reactos/dll/win32/riched20/richole.c trunk/reactos/dll/win32/riched20/run.c trunk/reactos/dll/win32/riched20/txtsrv.c trunk/reactos/dll/win32/riched20/version.rc trunk/reactos/dll/win32/riched20/writer.c trunk/reactos/media/doc/README.WINE [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/dll/win32/riched20/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/CMakeLi…
Modified: trunk/reactos/dll/win32/riched20/editor.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/editor.…
Modified: trunk/reactos/dll/win32/riched20/editor.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/editor.…
Modified: trunk/reactos/dll/win32/riched20/editstr.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/editstr…
Modified: trunk/reactos/dll/win32/riched20/res.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/res.h?r…
Added: trunk/reactos/dll/win32/riched20/riched_tom.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/riched_…
Added: trunk/reactos/dll/win32/riched20/riched_tom.rgs URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/riched_…
Modified: trunk/reactos/dll/win32/riched20/richole.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/richole…
Modified: trunk/reactos/dll/win32/riched20/run.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/run.c?r…
Modified: trunk/reactos/dll/win32/riched20/txtsrv.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/txtsrv.…
Modified: trunk/reactos/dll/win32/riched20/version.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/version…
Modified: trunk/reactos/dll/win32/riched20/writer.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/writer.…
Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
9 years, 5 months
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
26
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Results per page:
10
25
50
100
200