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
January 2012
----- 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
19 participants
559 discussions
Start a n
N
ew thread
[akhaldi] 55237: [HLINK_WINETEST] * Sync to Wine 1.3.37.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Jan 27 12:14:09 2012 New Revision: 55237 URL:
http://svn.reactos.org/svn/reactos?rev=55237&view=rev
Log: [HLINK_WINETEST] * Sync to Wine 1.3.37. Modified: trunk/rostests/winetests/hlink/browse_ctx.c trunk/rostests/winetests/hlink/hlink.c Modified: trunk/rostests/winetests/hlink/browse_ctx.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/hlink/browse_ct…
============================================================================== --- trunk/rostests/winetests/hlink/browse_ctx.c [iso-8859-1] (original) +++ trunk/rostests/winetests/hlink/browse_ctx.c [iso-8859-1] Fri Jan 27 12:14:09 2012 @@ -23,16 +23,6 @@ #include <hlink.h> #include "wine/test.h" - -/* Win9x and WinMe don't have lstrcmpW */ -static int strcmp_ww(const WCHAR *str1, const WCHAR *str2) -{ - DWORD len1 = lstrlenW(str1); - DWORD len2 = lstrlenW(str2); - - if (len1 != len2) return 1; - return memcmp(str1, str2, len1 * sizeof(WCHAR)); -} static void test_SetInitialHlink(void) { @@ -68,7 +58,7 @@ hres = IMoniker_GetDisplayName(found_moniker, bindctx, NULL, &found_name); ok(hres == S_OK, "GetDisplayName failed: 0x%08x\n", hres); - ok(!strcmp_ww(found_name, exp_name), "Found display name should have been %s, was: %s\n", wine_dbgstr_w(exp_name), wine_dbgstr_w(found_name)); + ok(!lstrcmpW(found_name, exp_name), "Found display name should have been %s, was: %s\n", wine_dbgstr_w(exp_name), wine_dbgstr_w(found_name)); CoTaskMemFree(exp_name); CoTaskMemFree(found_name); @@ -124,6 +114,8 @@ hres = IHlinkBrowseContext_GetBrowseWindowInfo(bc, &bwinfo_get); ok(hres == S_OK, "GetBrowseWindowInfo failed: 0x%08x\n", hres); ok(!memcmp(&bwinfo_set, &bwinfo_get, sizeof(HLBWINFO)), "Set and Get differ\n"); + + IHlinkBrowseContext_Release(bc); } START_TEST(browse_ctx) Modified: trunk/rostests/winetests/hlink/hlink.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/hlink/hlink.c?r…
============================================================================== --- trunk/rostests/winetests/hlink/hlink.c [iso-8859-1] (original) +++ trunk/rostests/winetests/hlink/hlink.c [iso-8859-1] Fri Jan 27 12:14:09 2012 @@ -57,6 +57,14 @@ DEFINE_EXPECT(BindToStorage); DEFINE_EXPECT(GetDisplayName); +DEFINE_EXPECT(ComposeWith); +DEFINE_EXPECT(OnNavigationComplete); +DEFINE_EXPECT(Enum); +DEFINE_EXPECT(Reduce); + +DEFINE_EXPECT(GetClassID); +DEFINE_EXPECT(Save); + static const char *debugstr_guid(REFIID riid) { static char buf[50]; @@ -347,7 +355,6 @@ const unsigned char *data; DWORD i; BOOL same; - unsigned int expected_data_win9x_size = 0; hr = IHlink_QueryInterface(lnk, &IID_IPersistStream, (void **)&ps); ok(hr == S_OK, "IHlink_QueryInterface failed with error 0x%08x\n", hr); @@ -365,13 +372,9 @@ data = GlobalLock(hglobal); - if (expected_data_size % 4) - expected_data_win9x_size = 4 * ((expected_data_size / 4) + 1); - /* first check we have the right amount of data */ ok((data_size == expected_data_size) || - (data_size == expected_data_alt_size) || - broken(data_size == expected_data_win9x_size), /* Win9x and WinMe */ + (data_size == expected_data_alt_size), "%s: Size of saved data differs (expected %d or %d, actual %d)\n", testname, expected_data_size, expected_data_alt_size, data_size); @@ -437,9 +440,9 @@ hr = HlinkCreateFromString(url, NULL, NULL, NULL, 0, NULL, &IID_IHlink, (LPVOID*) &lnk); - ok(hr == S_OK, "IHlinkCreateFromString failed with error 0x%08x\n", hr); + ok(hr == S_OK, "HlinkCreateFromString failed with error 0x%08x\n", hr); if (!lnk) { - skip("Can't create lnk, skipping test_persist. Was wineprefixcreate run properly?\n"); + skip("Can't create lnk, skipping test_persist.\n"); return; } test_persist_save_data("url only", lnk, @@ -449,7 +452,7 @@ hr = HlinkCreateFromString(url, NULL, friendly_name, NULL, 0, NULL, &IID_IHlink, (LPVOID*) &lnk); - ok(hr == S_OK, "IHlinCreateFromString failed with error 0x%08x\n", hr); + ok(hr == S_OK, "HlinkCreateFromString failed with error 0x%08x\n", hr); test_persist_save_data("url + friendly name", lnk, expected_hlink_data2, sizeof(expected_hlink_data2), expected_hlink_data2_ie7, sizeof(expected_hlink_data2_ie7)); @@ -457,7 +460,7 @@ hr = HlinkCreateFromString(url, location, friendly_name, NULL, 0, NULL, &IID_IHlink, (LPVOID*) &lnk); - ok(hr == S_OK, "IHlinCreateFromString failed with error 0x%08x\n", hr); + ok(hr == S_OK, "HlinkCreateFromString failed with error 0x%08x\n", hr); test_persist_save_data("url + friendly_name + location", lnk, expected_hlink_data3, sizeof(expected_hlink_data3), expected_hlink_data3_ie7, sizeof(expected_hlink_data3_ie7)); @@ -465,7 +468,7 @@ hr = HlinkCreateFromString(rel_url, NULL, NULL, NULL, 0, NULL, &IID_IHlink, (LPVOID*) &lnk); - ok(hr == S_OK, "IHlinCreateFromString failed with error 0x%08x\n", hr); + ok(hr == S_OK, "HlinkCreateFromString failed with error 0x%08x\n", hr); test_persist_save_data("relative url", lnk, expected_hlink_data4, sizeof(expected_hlink_data4), expected_hlink_data4, sizeof(expected_hlink_data4)); @@ -473,7 +476,7 @@ hr = HlinkCreateFromString(url, NULL, NULL, NULL, 0, NULL, &IID_IHlink, (LPVOID*) &lnk); - ok(hr == S_OK, "IHlinCreateFromString failed with error 0x%08x\n", hr); + ok(hr == S_OK, "HlinkCreateFromString failed with error 0x%08x\n", hr); hr = IHlink_SetTargetFrameName(lnk, target_frame_name); ok(hr == S_OK, "IHlink_SetTargetFrameName failed with error 0x%08x\n", hr); test_persist_save_data("url + target frame name", lnk, @@ -483,7 +486,7 @@ hr = HlinkCreateFromString(filename, NULL, NULL, NULL, 0, NULL, &IID_IHlink, (LPVOID*) &lnk); - ok(hr == S_OK, "IHlinCreateFromString failed with error 0x%08x\n", hr); + ok(hr == S_OK, "HlinkCreateFromString failed with error 0x%08x\n", hr); test_persist_save_data("filename", lnk, expected_hlink_data6, sizeof(expected_hlink_data6), expected_hlink_data6, sizeof(expected_hlink_data6)); @@ -813,8 +816,9 @@ static HRESULT WINAPI Moniker_GetClassID(IMoniker *iface, CLSID *pClassID) { - ok(0, "unexpected call\n"); - return E_NOTIMPL; + CHECK_EXPECT(GetClassID); + *pClassID = IID_IUnknown; /* not a valid CLSID */ + return S_OK; } static HRESULT WINAPI Moniker_IsDirty(IMoniker *iface) @@ -831,8 +835,8 @@ static HRESULT WINAPI Moniker_Save(IMoniker *iface, IStream *pStm, BOOL fClearDirty) { - ok(0, "unexpected call\n"); - return E_NOTIMPL; + CHECK_EXPECT(Save); + return S_OK; } static HRESULT WINAPI Moniker_GetSizeMax(IMoniker *iface, ULARGE_INTEGER *pcbSize) @@ -876,7 +880,7 @@ static HRESULT WINAPI Moniker_Reduce(IMoniker *iface, IBindCtx *pbc, DWORD dwReduceHowFar, IMoniker **ppmkToLeft, IMoniker **ppmkReduced) { - ok(0, "unexpected call\n"); + CHECK_EXPECT(Reduce); return E_NOTIMPL; } @@ -889,7 +893,7 @@ static HRESULT WINAPI Moniker_Enum(IMoniker *iface, BOOL fForwrd, IEnumMoniker **ppenumMoniker) { - ok(0, "unexpected call\n"); + CHECK_EXPECT(Enum); return E_NOTIMPL; } @@ -1056,6 +1060,7 @@ ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08x\n", hres); hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc); + ok(hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08x\n", hres); ok(found_trgt == dummy, "Found target should've been %p, was: %p\n", dummy, found_trgt); ok(lstrcmpW(found_loc, two) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(two), wine_dbgstr_w(found_loc)); IMoniker_Release(found_trgt); @@ -1066,6 +1071,7 @@ ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08x\n", hres); hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc); + ok(hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08x\n", hres); ok(found_trgt == dummy2, "Found target should've been %p, was: %p\n", dummy2, found_trgt); ok(lstrcmpW(found_loc, two) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(two), wine_dbgstr_w(found_loc)); IMoniker_Release(found_trgt); @@ -1076,6 +1082,7 @@ ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08x\n", hres); hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc); + ok(hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08x\n", hres); ok(found_trgt == dummy, "Found target should've been %p, was: %p\n", dummy, found_trgt); ok(lstrcmpW(found_loc, one) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(found_loc)); IMoniker_Release(found_trgt); @@ -1086,17 +1093,19 @@ ok(hres == E_INVALIDARG, "IHlink_SetMonikerReference should've failed with E_INVALIDARG (0x%08x), failed with 0x%08x\n", E_INVALIDARG, hres); hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc); + ok(hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08x\n", hres); ok(found_trgt == dummy, "Found target should've been %p, was: %p\n", dummy, found_trgt); ok(lstrcmpW(found_loc, one) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(found_loc)); IMoniker_Release(found_trgt); CoTaskMemFree(found_loc); /* invalid HLINKSETF flags */ - hres = IHlink_SetMonikerReference(hlink, 12, dummy2, two); /* Windows returns garbage; on 32-bit it returns the flags probably because the compiler happened to store them in %eax at some point */ - if (0) ok(hres == 12, "IHlink_SetMonikerReference should've failed with 0x%08x, failed with 0x%08x\n", 12, hres); + if (0) + IHlink_SetMonikerReference(hlink, 12, dummy2, two); hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc); + ok(hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08x\n", hres); ok(found_trgt == dummy, "Found target should've been %p, was: %p\n", dummy, found_trgt); ok(lstrcmpW(found_loc, one) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(found_loc)); IMoniker_Release(found_trgt); @@ -1107,6 +1116,7 @@ ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08x\n", hres); hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc); + ok(hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08x\n", hres); ok(found_trgt == dummy2, "Found target should've been %p, was: %p\n", dummy2, found_trgt); ok(lstrcmpW(found_loc, one) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(found_loc)); IMoniker_Release(found_trgt); @@ -1117,6 +1127,7 @@ ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08x\n", hres); hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc); + ok(hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08x\n", hres); ok(found_trgt == NULL, "Found target should've been %p, was: %p\n", NULL, found_trgt); ok(found_loc == NULL, "Found location should've been %s, was: %s\n", wine_dbgstr_w(NULL), wine_dbgstr_w(found_loc)); if(found_trgt) @@ -1244,12 +1255,12 @@ CoTaskMemFree(fnd_tgt); CoTaskMemFree(fnd_loc); - hres = IHlink_SetStringReference(link, 4, NULL, NULL); - /* Windows returns garbage; on 32-bit it returns the flags probably because the compiler happened to store them in %eax at some point */ - if (0) ok(hres == 4, "IHlink_SetStringReference should have failed with 0x4, instead: 0x%08x\n", hres); - - hres = IHlink_SetStringReference(link, -4, NULL, NULL); - if (0) ok(hres == -4, "IHlink_SetStringReference should have failed with 0xFFFFFFFC, instead: 0x%08x\n", hres); + if (0) + { + /* Windows returns garbage; on 32-bit it returns the flags probably because the compiler happened to store them in %eax at some point */ + IHlink_SetStringReference(link, 4, NULL, NULL); + IHlink_SetStringReference(link, -4, NULL, NULL); + } IHlink_Release(link); } @@ -1440,6 +1451,411 @@ IHlink_Release(hlink); } +} + +static WCHAR site_monikerW[] = {'S','I','T','E','_','M','O','N','I','K','E','R',0}; +static WCHAR ref_monikerW[] = {'R','E','F','_','M','O','N','I','K','E','R',0}; + +static HRESULT WINAPI hls_test_Moniker_BindToStorage(IMoniker *iface, + IBindCtx *pbc, IMoniker *toLeft, REFIID riid, void **obj) +{ + ok(0, "BTS: %p %p %p %p %p\n", iface, pbc, toLeft, riid, obj); + return E_NOTIMPL; +} + +static HRESULT WINAPI hls_site_Moniker_ComposeWith(IMoniker *iface, + IMoniker *right, BOOL onlyIfNotGeneric, IMoniker **composite) +{ + LPOLESTR rightName; + HRESULT hres; + + ok(onlyIfNotGeneric == 0, "Expected onlyIfNotGeneric to be FALSE\n"); + + CHECK_EXPECT(ComposeWith); + + hres = IMoniker_GetDisplayName(right, NULL, NULL, &rightName); + ok(hres == S_OK, "GetDisplayName failed: %08x\n", hres); + ok(!lstrcmpW(rightName, ref_monikerW), + "Expected to get moniker set via SetMonikerReference, instead got: %s\n", + wine_dbgstr_w(rightName)); + CoTaskMemFree(rightName); + + *composite = NULL; + + /* unlikely error code to verify this return result is used */ + return E_OUTOFMEMORY; +} + +static HRESULT WINAPI hls_site_Moniker_GetDisplayName(IMoniker *iface, + IBindCtx *pbc, IMoniker *toLeft, LPOLESTR *displayName) +{ + *displayName = CoTaskMemAlloc(sizeof(site_monikerW)); + memcpy(*displayName, site_monikerW, sizeof(site_monikerW)); + return S_OK; +} + +static HRESULT WINAPI hls_ref_Moniker_GetDisplayName(IMoniker *iface, + IBindCtx *pbc, IMoniker *toLeft, LPOLESTR *displayName) +{ + *displayName = CoTaskMemAlloc(sizeof(ref_monikerW)); + memcpy(*displayName, ref_monikerW, sizeof(ref_monikerW)); + return S_OK; +} + +static HRESULT WINAPI hls_test_Moniker_IsSystemMoniker(IMoniker *iface, + DWORD *mksys) +{ + return S_FALSE; +} + +static IMonikerVtbl hls_site_MonikerVtbl = { + Moniker_QueryInterface, + Moniker_AddRef, + Moniker_Release, + Moniker_GetClassID, + Moniker_IsDirty, + Moniker_Load, + Moniker_Save, + Moniker_GetSizeMax, + Moniker_BindToObject, + hls_test_Moniker_BindToStorage, + Moniker_Reduce, + hls_site_Moniker_ComposeWith, + Moniker_Enum, + Moniker_IsEqual, + Moniker_Hash, + Moniker_IsRunning, + Moniker_GetTimeOfLastChange, + Moniker_Inverse, + Moniker_CommonPrefixWith, + Moniker_RelativePathTo, + hls_site_Moniker_GetDisplayName, + Moniker_ParseDisplayName, + hls_test_Moniker_IsSystemMoniker +}; + +static IMonikerVtbl hls_ref_MonikerVtbl = { + Moniker_QueryInterface, + Moniker_AddRef, + Moniker_Release, + Moniker_GetClassID, + Moniker_IsDirty, + Moniker_Load, + Moniker_Save, + Moniker_GetSizeMax, + Moniker_BindToObject, + hls_test_Moniker_BindToStorage, + Moniker_Reduce, + Moniker_ComposeWith, + Moniker_Enum, + Moniker_IsEqual, + Moniker_Hash, + Moniker_IsRunning, + Moniker_GetTimeOfLastChange, + Moniker_Inverse, + Moniker_CommonPrefixWith, + Moniker_RelativePathTo, + hls_ref_Moniker_GetDisplayName, + Moniker_ParseDisplayName, + hls_test_Moniker_IsSystemMoniker +}; + +static IMoniker hls_site_Moniker = { &hls_site_MonikerVtbl }; +static IMoniker hls_ref_Moniker = { &hls_ref_MonikerVtbl }; + +static HRESULT WINAPI hls_QueryInterface(IHlinkSite *iface, REFGUID iid, + void **obj) +{ + ok(0, "QI: %p %s %p\n", iface, debugstr_guid(iid), obj); + return E_NOTIMPL; +} + +static ULONG WINAPI hls_AddRef(IHlinkSite *iface) +{ + return 2; +} + +static ULONG WINAPI hls_Release(IHlinkSite *iface) +{ + return 1; +} + +static HRESULT WINAPI hls_QueryService(IHlinkSite *iface, DWORD siteData, + REFGUID service, REFIID riid, IUnknown **punk) +{ + ok(0, "QS: %p %x %s %s %p\n", iface, siteData, debugstr_guid(service), + debugstr_guid(riid), punk); + return E_NOTIMPL; +} + +static HRESULT WINAPI hls_GetMoniker(IHlinkSite *iface, DWORD siteData, + DWORD assign, DWORD which, IMoniker **pmk) +{ + ok(siteData == 17, "Expected siteData == 17, got: %d\n", siteData); + *pmk = &hls_site_Moniker; + return S_OK; +} + +static HRESULT WINAPI hls_ReadyToNavigate(IHlinkSite *iface, DWORD siteData, + DWORD reserved) +{ + ok(0, "RTN: %p %x %x\n", iface, siteData, reserved); + return E_NOTIMPL; +} + +static HRESULT WINAPI hls_OnNavigationComplete(IHlinkSite *iface, + DWORD siteData, DWORD reserved, HRESULT error, LPCWSTR errorStr) +{ + CHECK_EXPECT(OnNavigationComplete); + ok(siteData == 17, "Expected siteData == 17, got: %d\n", siteData); + ok(error == E_OUTOFMEMORY, "Expected E_OUTOFMEMORY, got: %08x\n", error); + return E_NOTIMPL; +} + +static IHlinkSiteVtbl HlinkSiteVtbl = { + hls_QueryInterface, + hls_AddRef, + hls_Release, + hls_QueryService, + hls_GetMoniker, + hls_ReadyToNavigate, + hls_OnNavigationComplete +}; + +static IHlinkSite HlinkSite = { &HlinkSiteVtbl }; + +static void test_HlinkSite(void) +{ + IHlink *hl; + IMoniker *mon_ref; + IBindCtx *pbc; + HRESULT hres; + + hres = HlinkCreateFromString(NULL, NULL, NULL, NULL, 0, NULL, + &IID_IHlink, (LPVOID*)&hl); + ok(hres == S_OK, "HlinkCreateFromString failed: %08x\n", hres); + getMonikerRef(hl, NULL, NULL); + + hres = IHlink_SetHlinkSite(hl, &HlinkSite, 17); + ok(hres == S_OK, "SetHlinkSite failed: %08x\n", hres); + getMonikerRef(hl, NULL, NULL); + getStringRef(hl, NULL, NULL); + + hres = IHlink_GetMonikerReference(hl, HLINKGETREF_RELATIVE, &mon_ref, NULL); + ok(hres == S_OK, "GetMonikerReference failed: %08x\n", hres); + ok(mon_ref == NULL, "Didn't get expected moniker, instead: %p\n", mon_ref); + + hres = IHlink_GetMonikerReference(hl, HLINKGETREF_ABSOLUTE, &mon_ref, NULL); + ok(hres == S_OK, "GetMonikerReference failed: %08x\n", hres); + ok(mon_ref == &hls_site_Moniker, "Didn't get expected moniker, instead: %p\n", mon_ref); + + SET_EXPECT(Reduce); + SET_EXPECT(Enum); + hres = IHlink_SetMonikerReference(hl, HLINKSETF_TARGET, &hls_ref_Moniker, NULL); + ok(hres == S_OK, "SetMonikerReference failed: %08x\n", hres); + todo_wine CHECK_CALLED(Reduce); + todo_wine CHECK_CALLED(Enum); + + getMonikerRef(hl, &hls_ref_Moniker, NULL); + + SET_EXPECT(Enum); + getStringRef(hl, ref_monikerW, NULL); + todo_wine CHECK_CALLED(Enum); + + hres = IHlink_GetMonikerReference(hl, HLINKGETREF_RELATIVE, &mon_ref, NULL); + ok(hres == S_OK, "GetMonikerReference failed: %08x\n", hres); + ok(mon_ref == &hls_ref_Moniker, "Didn't get expected moniker, instead: %p\n", mon_ref); + IMoniker_Release(mon_ref); + + SET_EXPECT(ComposeWith); + hres = IHlink_GetMonikerReference(hl, HLINKGETREF_ABSOLUTE, &mon_ref, NULL); + ok(hres == E_OUTOFMEMORY, "Expected E_OUTOFMEMORY, got: %08x\n", hres); + ok(mon_ref == NULL, "Shouldn't have got a Moniker, got: %p\n", mon_ref); + CHECK_CALLED(ComposeWith); + + hres = CreateBindCtx(0, &pbc); + ok(hres == S_OK, "CreateBindCtx failed: %08x\n", hres); + + SET_EXPECT(ComposeWith); + SET_EXPECT(OnNavigationComplete); + hres = IHlink_Navigate(hl, 0, pbc, NULL, NULL); + ok(hres == E_OUTOFMEMORY, "Navigate should've failed: %08x\n", hres); + CHECK_CALLED(ComposeWith); + CHECK_CALLED(OnNavigationComplete); + + IBindCtx_Release(pbc); + IHlink_Release(hl); + + SET_EXPECT(Reduce); + SET_EXPECT(Enum); + hres = HlinkCreateFromMoniker(&hls_ref_Moniker, NULL, NULL, &HlinkSite, 17, + NULL, &IID_IHlink, (LPVOID*)&hl); + ok(hres == S_OK, "HlinkCreateFromMoniker failed: %08x\n", hres); + todo_wine CHECK_CALLED(Reduce); + todo_wine CHECK_CALLED(Enum); + getMonikerRef(hl, &hls_ref_Moniker, NULL); + IHlink_Release(hl); + + hres = HlinkCreateFromMoniker(NULL, NULL, NULL, &HlinkSite, 17, + NULL, &IID_IHlink, (LPVOID*)&hl); + ok(hres == S_OK, "HlinkCreateFromMoniker failed: %08x\n", hres); + getMonikerRef(hl, NULL, NULL); + IHlink_Release(hl); +} + +static void test_HlinkClone(void) +{ + HRESULT hres; + IHlink *hl, *cloned = NULL; + IMoniker *dummy, *fnd_mk; + IHlinkSite *fnd_site; + WCHAR *fnd_name; + DWORD fnd_data; + const WCHAR one[] = {'1',0}; + const WCHAR two[] = {'2',0}; + const WCHAR name[] = {'a',0}; + + hres = HlinkClone(NULL, NULL, NULL, 0, NULL); + ok(hres == E_INVALIDARG, "Got wrong failure code: %08x\n", hres); + + hres = HlinkCreateFromString(NULL, NULL, NULL, NULL, 0, NULL, + &IID_IHlink, (void**)&hl); + ok(hres == S_OK, "HlinkCreateFromString failed: %08x\n", hres); + + hres = HlinkClone(hl, &IID_IHlink, NULL, 0, NULL); + ok(hres == E_INVALIDARG, "Got wrong failure code: %08x\n", hres); + + if (0) + { + /* crash on Windows XP */ + HlinkClone(hl, NULL, NULL, 0, NULL); + + HlinkClone(hl, NULL, NULL, 0, (void**)&cloned); + } + + hres = HlinkClone(hl, &IID_IHlink, NULL, 0, (void**)&cloned); + ok(hres == S_OK, "HlinkClone failed: %08x\n", hres); + ok(cloned != NULL, "Didn't get a clone\n"); + getMonikerRef(cloned, NULL, NULL); + IHlink_Release(cloned); + + IHlink_Release(hl); + + SET_EXPECT(Reduce); + SET_EXPECT(Enum); + hres = HlinkCreateFromMoniker(&hls_ref_Moniker, two, NULL, NULL, 0, NULL, &IID_IHlink, (void**)&hl); + todo_wine CHECK_CALLED(Reduce); + todo_wine CHECK_CALLED(Enum); + ok(hres == S_OK, "HlinkCreateFromMoniker failed: 0x%08x\n", hres); + getMonikerRef(hl, &hls_ref_Moniker, two); + + SET_EXPECT(Save); + SET_EXPECT(GetClassID); + cloned = (IHlink*)0xdeadbeef; + hres = HlinkClone(hl, &IID_IHlink, NULL, 0, (void**)&cloned); + /* fails because of invalid CLSID given by Moniker_GetClassID */ + ok(hres == REGDB_E_CLASSNOTREG, "Wrong error code: %08x\n", hres); + ok(cloned == NULL, "Shouldn't have gotten a clone\n"); + CHECK_CALLED(Save); + CHECK_CALLED(GetClassID); + + IHlink_Release(hl); + + hres = CreateItemMoniker(one, one, &dummy); + ok(hres == S_OK, "CreateItemMoniker failed: 0x%08x\n", hres); + + hres = HlinkCreateFromMoniker(dummy, two, name, &HlinkSite, 17, NULL, &IID_IHlink, (void**)&hl); + ok(hres == S_OK, "HlinkCreateFromMoniker failed: 0x%08x\n", hres); + getMonikerRef(hl, dummy, two); + + cloned = NULL; + hres = HlinkClone(hl, &IID_IHlink, NULL, 0, (void**)&cloned); + ok(hres == S_OK, "HlinkClone failed: %08x\n", hres); + ok(cloned != NULL, "Should have gotten a clone\n"); + + fnd_mk = getMonikerRef(cloned, (IMoniker*)0xFFFFFFFF, two); + ok(fnd_mk != NULL, "Expected non-null Moniker\n"); + ok(fnd_mk != dummy, "Expected a new Moniker to be created\n"); + + fnd_name = NULL; + hres = IHlink_GetFriendlyName(cloned, HLFNAMEF_DEFAULT, &fnd_name); + ok(hres == S_OK, "GetFriendlyName failed: %08x\n", hres); + ok(fnd_name != NULL, "Expected friendly name to be non-NULL\n"); + ok(lstrcmpW(fnd_name, name) == 0, "Expected friendly name to be %s, was %s\n", + wine_dbgstr_w(name), wine_dbgstr_w(fnd_name)); + CoTaskMemFree(fnd_name); + + fnd_site = (IHlinkSite*)0xdeadbeef; + fnd_data = 4; + hres = IHlink_GetHlinkSite(cloned, &fnd_site, &fnd_data); + ok(hres == S_OK, "GetHlinkSite failed: %08x\n", hres); + ok(fnd_site == NULL, "Expected NULL site\n"); + ok(fnd_data == 4, "Expected site data to be 4, was: %d\n", fnd_data); + + IHlink_Release(cloned); + IHlink_Release(hl); + + hres = HlinkCreateFromMoniker(dummy, NULL, NULL, NULL, 0, NULL, &IID_IHlink, (void**)&hl); + ok(hres == S_OK, "HlinkCreateFromMoniker failed: 0x%08x\n", hres); + getMonikerRef(hl, dummy, NULL); + + cloned = NULL; + hres = HlinkClone(hl, &IID_IHlink, &HlinkSite, 17, (void**)&cloned); + ok(hres == S_OK, "HlinkClone failed: %08x\n", hres); + ok(cloned != NULL, "Should have gotten a clone\n"); + + fnd_mk = getMonikerRef(cloned, (IMoniker*)0xFFFFFFFF, NULL); + ok(fnd_mk != NULL, "Expected non-null Moniker\n"); + ok(fnd_mk != dummy, "Expected a new Moniker to be created\n"); + + fnd_site = (IHlinkSite*)0xdeadbeef; + fnd_data = 4; + hres = IHlink_GetHlinkSite(cloned, &fnd_site, &fnd_data); + ok(hres == S_OK, "GetHlinkSite failed: %08x\n", hres); + ok(fnd_site == &HlinkSite, "Expected found site to be HlinkSite, was: %p\n", fnd_site); + ok(fnd_data == 17, "Expected site data to be 17, was: %d\n", fnd_data); + + IHlink_Release(cloned); + IHlink_Release(hl); + + IMoniker_Release(dummy); +} + +static void test_StdHlink(void) +{ + IHlink *hlink; + WCHAR *str; + HRESULT hres; + + static const WCHAR testW[] = {'t','e','s','t',0}; + + hres = CoCreateInstance(&CLSID_StdHlink, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, + &IID_IHlink, (void**)&hlink); + ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres); + + str = (void*)0xdeadbeef; + hres = IHlink_GetTargetFrameName(hlink, &str); + ok(hres == S_FALSE, "GetTargetFrameName failed: %08x\n", hres); + ok(!str, "str = %s\n", wine_dbgstr_w(str)); + + hres = IHlink_SetTargetFrameName(hlink, testW); + ok(hres == S_OK, "SetTargetFrameName failed: %08x\n", hres); + + str = (void*)0xdeadbeef; + hres = IHlink_GetTargetFrameName(hlink, &str); + ok(hres == S_OK, "GetTargetFrameName failed: %08x\n", hres); + ok(!lstrcmpW(str, testW), "str = %s\n", wine_dbgstr_w(str)); + CoTaskMemFree(str); + + hres = IHlink_SetTargetFrameName(hlink, NULL); + ok(hres == S_OK, "SetTargetFrameName failed: %08x\n", hres); + + str = (void*)0xdeadbeef; + hres = IHlink_GetTargetFrameName(hlink, &str); + ok(hres == S_FALSE, "GetTargetFrameName failed: %08x\n", hres); + ok(!str, "str = %s\n", wine_dbgstr_w(str)); + + IHlink_Release(hlink); } START_TEST(hlink) @@ -1457,6 +1873,9 @@ test_HlinkGetSetStringReference(); test_HlinkMoniker(); test_HashLink(); + test_HlinkSite(); + test_HlinkClone(); + test_StdHlink(); CoUninitialize(); }
12 years, 11 months
1
0
0
0
[akhaldi] 55236: [HLINK] * Sync to Wine 1.3.37.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Jan 27 12:14:01 2012 New Revision: 55236 URL:
http://svn.reactos.org/svn/reactos?rev=55236&view=rev
Log: [HLINK] * Sync to Wine 1.3.37. Added: trunk/reactos/dll/win32/hlink/hlink.rc (with props) trunk/reactos/dll/win32/hlink/hlink.rgs (with props) trunk/reactos/dll/win32/hlink/hlink_classes.idl (with props) Modified: trunk/reactos/dll/win32/hlink/CMakeLists.txt trunk/reactos/dll/win32/hlink/browse_ctx.c trunk/reactos/dll/win32/hlink/extserv.c trunk/reactos/dll/win32/hlink/hlink.rbuild trunk/reactos/dll/win32/hlink/hlink.spec trunk/reactos/dll/win32/hlink/hlink_main.c trunk/reactos/dll/win32/hlink/hlink_private.h trunk/reactos/dll/win32/hlink/link.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/hlink/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hlink/CMakeLists…
============================================================================== --- trunk/reactos/dll/win32/hlink/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hlink/CMakeLists.txt [iso-8859-1] Fri Jan 27 12:14:01 2012 @@ -2,6 +2,7 @@ add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) +set_rc_compiler() spec2def(hlink.dll hlink.spec) list(APPEND SOURCE @@ -9,6 +10,7 @@ extserv.c hlink_main.c link.c + hlink.rc ${CMAKE_CURRENT_BINARY_DIR}/hlink_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/hlink.def) Modified: trunk/reactos/dll/win32/hlink/browse_ctx.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hlink/browse_ctx…
============================================================================== --- trunk/reactos/dll/win32/hlink/browse_ctx.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hlink/browse_ctx.c [iso-8859-1] Fri Jan 27 12:14:01 2012 @@ -24,43 +24,23 @@ WINE_DEFAULT_DEBUG_CHANNEL(hlink); -static const IHlinkBrowseContextVtbl hlvt; - typedef struct { - const IHlinkBrowseContextVtbl *lpVtbl; + IHlinkBrowseContext IHlinkBrowseContext_iface; LONG ref; HLBWINFO* BrowseWindowInfo; IHlink* CurrentPage; } HlinkBCImpl; - -HRESULT WINAPI HLinkBrowseContext_Constructor(IUnknown *pUnkOuter, REFIID riid, - LPVOID *ppv) -{ - HlinkBCImpl * hl; - - TRACE("unkOut=%p riid=%s\n", pUnkOuter, debugstr_guid(riid)); - *ppv = NULL; - - if (pUnkOuter) - return CLASS_E_NOAGGREGATION; - - hl = heap_alloc_zero(sizeof(HlinkBCImpl)); - if (!hl) - return E_OUTOFMEMORY; - - hl->ref = 1; - hl->lpVtbl = &hlvt; - - *ppv = hl; - return S_OK; +static inline HlinkBCImpl *impl_from_IHlinkBrowseContext(IHlinkBrowseContext *iface) +{ + return CONTAINING_RECORD(iface, HlinkBCImpl, IHlinkBrowseContext_iface); } static HRESULT WINAPI IHlinkBC_fnQueryInterface( IHlinkBrowseContext *iface, REFIID riid, LPVOID* ppvObj) { - HlinkBCImpl *This = (HlinkBCImpl*)iface; + HlinkBCImpl *This = impl_from_IHlinkBrowseContext(iface); TRACE ("(%p)->(%s,%p)\n", This, debugstr_guid (riid), ppvObj); if (IsEqualIID(riid, &IID_IUnknown) || @@ -77,7 +57,7 @@ static ULONG WINAPI IHlinkBC_fnAddRef (IHlinkBrowseContext* iface) { - HlinkBCImpl *This = (HlinkBCImpl*)iface; + HlinkBCImpl *This = impl_from_IHlinkBrowseContext(iface); ULONG refCount = InterlockedIncrement(&This->ref); TRACE("(%p)->(count=%u)\n", This, refCount - 1); @@ -87,7 +67,7 @@ static ULONG WINAPI IHlinkBC_fnRelease (IHlinkBrowseContext* iface) { - HlinkBCImpl *This = (HlinkBCImpl*)iface; + HlinkBCImpl *This = impl_from_IHlinkBrowseContext(iface); ULONG refCount = InterlockedDecrement(&This->ref); TRACE("(%p)->(count=%u)\n", This, refCount + 1); @@ -106,7 +86,7 @@ DWORD dwReserved, IUnknown *piunk, IMoniker *pimk, DWORD *pdwRegister) { static const WCHAR szIdent[] = {'W','I','N','E','H','L','I','N','K',0}; - HlinkBCImpl *This = (HlinkBCImpl*)iface; + HlinkBCImpl *This = impl_from_IHlinkBrowseContext(iface); IMoniker *mon; IMoniker *composite; IRunningObjectTable *ROT; @@ -138,7 +118,7 @@ { HRESULT r = S_OK; IRunningObjectTable *ROT; - HlinkBCImpl *This = (HlinkBCImpl*)iface; + HlinkBCImpl *This = impl_from_IHlinkBrowseContext(iface); FIXME("(%p)->(%i)\n", This, dwRegister); @@ -152,7 +132,7 @@ static HRESULT WINAPI IHlinkBC_SetBrowseWindowInfo(IHlinkBrowseContext* iface, HLBWINFO *phlbwi) { - HlinkBCImpl *This = (HlinkBCImpl*)iface; + HlinkBCImpl *This = impl_from_IHlinkBrowseContext(iface); TRACE("(%p)->(%p)\n", This, phlbwi); if(!phlbwi) @@ -168,7 +148,7 @@ static HRESULT WINAPI IHlinkBC_GetBrowseWindowInfo(IHlinkBrowseContext* iface, HLBWINFO *phlbwi) { - HlinkBCImpl *This = (HlinkBCImpl*)iface; + HlinkBCImpl *This = impl_from_IHlinkBrowseContext(iface); TRACE("(%p)->(%p)\n", This, phlbwi); if(!phlbwi) @@ -185,7 +165,7 @@ static HRESULT WINAPI IHlinkBC_SetInitialHlink(IHlinkBrowseContext* iface, IMoniker *pimkTarget, LPCWSTR pwzLocation, LPCWSTR pwzFriendlyName) { - HlinkBCImpl *This = (HlinkBCImpl*)iface; + HlinkBCImpl *This = impl_from_IHlinkBrowseContext(iface); FIXME("(%p)->(%p %s %s)\n", This, pimkTarget, debugstr_w(pwzLocation), debugstr_w(pwzFriendlyName)); @@ -203,7 +183,7 @@ DWORD grfHLNF, IMoniker* pmkTarget, LPCWSTR pwzLocation, LPCWSTR pwzFriendlyName, ULONG *puHLID) { - HlinkBCImpl *This = (HlinkBCImpl*)iface; + HlinkBCImpl *This = impl_from_IHlinkBrowseContext(iface); FIXME("(%p)->(%i %p %s %s %p)\n", This, grfHLNF, pmkTarget, debugstr_w(pwzLocation), debugstr_w(pwzFriendlyName), puHLID); @@ -236,7 +216,7 @@ static HRESULT WINAPI IHlinkBC_GetHlink( IHlinkBrowseContext* iface, ULONG uHLID, IHlink** ppihl) { - HlinkBCImpl *This = (HlinkBCImpl*)iface; + HlinkBCImpl *This = impl_from_IHlinkBrowseContext(iface); TRACE("(%p)->(%x %p)\n", This, uHLID, ppihl); @@ -266,7 +246,7 @@ } static HRESULT WINAPI IHlinkBC_Close(IHlinkBrowseContext* iface, - DWORD reserverd) + DWORD reserved) { FIXME("\n"); return E_NOTIMPL; @@ -292,3 +272,24 @@ IHlinkBC_Clone, IHlinkBC_Close }; + +HRESULT HLinkBrowseContext_Constructor(IUnknown *pUnkOuter, REFIID riid, void **ppv) +{ + HlinkBCImpl * hl; + + TRACE("unkOut=%p riid=%s\n", pUnkOuter, debugstr_guid(riid)); + *ppv = NULL; + + if (pUnkOuter) + return CLASS_E_NOAGGREGATION; + + hl = heap_alloc_zero(sizeof(HlinkBCImpl)); + if (!hl) + return E_OUTOFMEMORY; + + hl->ref = 1; + hl->IHlinkBrowseContext_iface.lpVtbl = &hlvt; + + *ppv = hl; + return S_OK; +} Modified: trunk/reactos/dll/win32/hlink/extserv.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hlink/extserv.c?…
============================================================================== --- trunk/reactos/dll/win32/hlink/extserv.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hlink/extserv.c [iso-8859-1] Fri Jan 27 12:14:01 2012 @@ -23,13 +23,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(hlink); -#define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl))) - typedef struct { - const IUnknownVtbl *lpIUnknownVtbl; - const IAuthenticateVtbl *lpIAuthenticateVtbl; - const IHttpNegotiateVtbl *lpIHttpNegotiateVtbl; - const IExtensionServicesVtbl *lpIExtensionServicesVtbl; + IUnknown IUnknown_iface; + IAuthenticate IAuthenticate_iface; + IHttpNegotiate IHttpNegotiate_iface; + IExtensionServices IExtensionServices_iface; LONG ref; IUnknown *outer; @@ -40,31 +38,29 @@ LPWSTR headers; } ExtensionService; -#define EXTSERVUNK(x) ((IUnknown*)&(x)->lpIUnknownVtbl) -#define AUTHENTICATE(x) (&(x)->lpIAuthenticateVtbl) -#define HTTPNEGOTIATE(x) (&(x)->lpIHttpNegotiateVtbl) -#define EXTENSIONSERVICES(x) (&(x)->lpIExtensionServicesVtbl) - -#define EXTSERVUNK_THIS(iface) DEFINE_THIS(ExtensionService, IUnknown, iface) +static inline ExtensionService *impl_from_IUnknown(IUnknown *iface) +{ + return CONTAINING_RECORD(iface, ExtensionService, IUnknown_iface); +} static HRESULT WINAPI ExtServUnk_QueryInterface(IUnknown *iface, REFIID riid, void **ppv) { - ExtensionService *This = EXTSERVUNK_THIS(iface); + ExtensionService *This = impl_from_IUnknown(iface); *ppv = NULL; if(IsEqualGUID(&IID_IUnknown, riid)) { TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); - *ppv = EXTSERVUNK(This); + *ppv = &This->IUnknown_iface; }else if(IsEqualGUID(&IID_IAuthenticate, riid)) { TRACE("(%p)->(IID_IAuthenticate %p)\n", This, ppv); - *ppv = AUTHENTICATE(This); + *ppv = &This->IAuthenticate_iface; }else if(IsEqualGUID(&IID_IHttpNegotiate, riid)) { TRACE("(%p)->(IID_IHttpNegotiate %p)\n", This, ppv); - *ppv = HTTPNEGOTIATE(This); + *ppv = &This->IHttpNegotiate_iface; }else if(IsEqualGUID(&IID_IExtensionServices, riid)) { TRACE("(%p)->(IID_IExtensionServices %p)\n", This, ppv); - *ppv = EXTENSIONSERVICES(This); + *ppv = &This->IExtensionServices_iface; } if(*ppv) { @@ -78,7 +74,7 @@ static ULONG WINAPI ExtServUnk_AddRef(IUnknown *iface) { - ExtensionService *This = EXTSERVUNK_THIS(iface); + ExtensionService *This = impl_from_IUnknown(iface); LONG ref = InterlockedIncrement(&This->ref); TRACE("(%p) ref=%d\n", This, ref); @@ -88,7 +84,7 @@ static ULONG WINAPI ExtServUnk_Release(IUnknown *iface) { - ExtensionService *This = EXTSERVUNK_THIS(iface); + ExtensionService *This = impl_from_IUnknown(iface); LONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) ref=%d\n", This, ref); @@ -103,38 +99,39 @@ return ref; } -#undef EXTSERVUNK_THIS - static const IUnknownVtbl ExtServUnkVtbl = { ExtServUnk_QueryInterface, ExtServUnk_AddRef, ExtServUnk_Release }; -#define AUTHENTICATE_THIS(iface) DEFINE_THIS(ExtensionService, IAuthenticate, iface) +static inline ExtensionService *impl_from_IAuthenticate(IAuthenticate *iface) +{ + return CONTAINING_RECORD(iface, ExtensionService, IAuthenticate_iface); +} static HRESULT WINAPI Authenticate_QueryInterface(IAuthenticate *iface, REFIID riid, void **ppv) { - ExtensionService *This = AUTHENTICATE_THIS(iface); + ExtensionService *This = impl_from_IAuthenticate(iface); return IUnknown_QueryInterface(This->outer, riid, ppv); } static ULONG WINAPI Authenticate_AddRef(IAuthenticate *iface) { - ExtensionService *This = AUTHENTICATE_THIS(iface); + ExtensionService *This = impl_from_IAuthenticate(iface); return IUnknown_AddRef(This->outer); } static ULONG WINAPI Authenticate_Release(IAuthenticate *iface) { - ExtensionService *This = AUTHENTICATE_THIS(iface); + ExtensionService *This = impl_from_IAuthenticate(iface); return IUnknown_Release(This->outer); } static HRESULT WINAPI Authenticate_Authenticate(IAuthenticate *iface, HWND *phwnd, LPWSTR *pszUsername, LPWSTR *pszPassword) { - ExtensionService *This = AUTHENTICATE_THIS(iface); + ExtensionService *This = impl_from_IAuthenticate(iface); TRACE("(%p)->(%p %p %p)\n", This, phwnd, pszUsername, pszPassword); @@ -147,8 +144,6 @@ return S_OK; } - -#undef AUTHENTICATE_THIS static const IAuthenticateVtbl AuthenticateVtbl = { Authenticate_QueryInterface, @@ -157,30 +152,33 @@ Authenticate_Authenticate }; -#define HTTPNEGOTIATE_THIS(iface) DEFINE_THIS(ExtensionService, IHttpNegotiate, iface) +static inline ExtensionService *impl_from_IHttpNegotiate(IHttpNegotiate *iface) +{ + return CONTAINING_RECORD(iface, ExtensionService, IHttpNegotiate_iface); +} static HRESULT WINAPI HttpNegotiate_QueryInterface(IHttpNegotiate *iface, REFIID riid, void **ppv) { - ExtensionService *This = HTTPNEGOTIATE_THIS(iface); + ExtensionService *This = impl_from_IHttpNegotiate(iface); return IUnknown_QueryInterface(This->outer, riid, ppv); } static ULONG WINAPI HttpNegotiate_AddRef(IHttpNegotiate *iface) { - ExtensionService *This = HTTPNEGOTIATE_THIS(iface); + ExtensionService *This = impl_from_IHttpNegotiate(iface); return IUnknown_AddRef(This->outer); } static ULONG WINAPI HttpNegotiate_Release(IHttpNegotiate *iface) { - ExtensionService *This = HTTPNEGOTIATE_THIS(iface); + ExtensionService *This = impl_from_IHttpNegotiate(iface); return IUnknown_Release(This->outer); } static HRESULT WINAPI HttpNegotiate_BeginningTransaction(IHttpNegotiate *iface, LPCWSTR szURL, LPCWSTR szHeaders, DWORD dwReserved, LPWSTR *pszAdditionalHeaders) { - ExtensionService *This = HTTPNEGOTIATE_THIS(iface); + ExtensionService *This = impl_from_IHttpNegotiate(iface); TRACE("(%p)->(%s %s %x %p)\n", This, debugstr_w(szURL), debugstr_w(szHeaders), dwReserved, pszAdditionalHeaders); @@ -195,7 +193,7 @@ static HRESULT WINAPI HttpNegotiate_OnResponse(IHttpNegotiate *iface, DWORD dwResponseCode, LPCWSTR szResponseHeaders, LPCWSTR szRequestHeaders, LPWSTR *pszAdditionalRequestHeaders) { - ExtensionService *This = HTTPNEGOTIATE_THIS(iface); + ExtensionService *This = impl_from_IHttpNegotiate(iface); TRACE("(%p)->(%d %s %s %p)\n", This, dwResponseCode, debugstr_w(szResponseHeaders), debugstr_w(szRequestHeaders), pszAdditionalRequestHeaders); @@ -203,8 +201,6 @@ *pszAdditionalRequestHeaders = NULL; return S_OK; } - -#undef HTTPNEGOTIATE_THIS static const IHttpNegotiateVtbl HttpNegotiateVtbl = { HttpNegotiate_QueryInterface, @@ -214,23 +210,26 @@ HttpNegotiate_OnResponse }; -#define EXTENSIONSERVICES_THIS(iface) DEFINE_THIS(ExtensionService, IExtensionServices, iface) +static inline ExtensionService *impl_from_IExtensionServices(IExtensionServices *iface) +{ + return CONTAINING_RECORD(iface, ExtensionService, IExtensionServices_iface); +} static HRESULT WINAPI ExtServ_QueryInterface(IExtensionServices *iface, REFIID riid, void **ppv) { - ExtensionService *This = EXTENSIONSERVICES_THIS(iface); + ExtensionService *This = impl_from_IExtensionServices(iface); return IUnknown_QueryInterface(This->outer, riid, ppv); } static ULONG WINAPI ExtServ_AddRef(IExtensionServices *iface) { - ExtensionService *This = EXTENSIONSERVICES_THIS(iface); + ExtensionService *This = impl_from_IExtensionServices(iface); return IUnknown_AddRef(This->outer); } static ULONG WINAPI ExtServ_Release(IExtensionServices *iface) { - ExtensionService *This = EXTENSIONSERVICES_THIS(iface); + ExtensionService *This = impl_from_IExtensionServices(iface); return IUnknown_Release(This->outer); } @@ -260,7 +259,7 @@ static HRESULT WINAPI ExtServ_SetAdditionalHeaders(IExtensionServices* iface, LPCWSTR pwzAdditionalHeaders) { - ExtensionService *This = EXTENSIONSERVICES_THIS(iface); + ExtensionService *This = impl_from_IExtensionServices(iface); TRACE("(%p)->(%s)\n", This, debugstr_w(pwzAdditionalHeaders)); @@ -281,14 +280,12 @@ static HRESULT WINAPI ExtServ_SetAuthenticateData(IExtensionServices* iface, HWND phwnd, LPCWSTR pwzUsername, LPCWSTR pwzPassword) { - ExtensionService *This = EXTENSIONSERVICES_THIS(iface); + ExtensionService *This = impl_from_IExtensionServices(iface); TRACE("(%p)->(%p %s %s)\n", This, phwnd, debugstr_w(pwzUsername), debugstr_w(pwzPassword)); return ExtServ_ImplSetAuthenticateData(This, phwnd, pwzUsername, pwzPassword); } - -#undef EXTENSIONSERVICES_THIS static const IExtensionServicesVtbl ExtServVtbl = { ExtServ_QueryInterface, @@ -314,10 +311,10 @@ ret = heap_alloc(sizeof(*ret)); - ret->lpIUnknownVtbl = &ExtServUnkVtbl; - ret->lpIAuthenticateVtbl = &AuthenticateVtbl; - ret->lpIHttpNegotiateVtbl = &HttpNegotiateVtbl; - ret->lpIExtensionServicesVtbl= &ExtServVtbl; + ret->IUnknown_iface.lpVtbl = &ExtServUnkVtbl; + ret->IAuthenticate_iface.lpVtbl = &AuthenticateVtbl; + ret->IHttpNegotiate_iface.lpVtbl = &HttpNegotiateVtbl; + ret->IExtensionServices_iface.lpVtbl = &ExtServVtbl; ret->ref = 1; ret->headers = NULL; ret->hwnd = NULL; @@ -328,14 +325,14 @@ ExtServ_ImplSetAdditionalHeaders(ret, pwzAdditionalHeaders); if(!punkOuter) { - ret->outer = EXTSERVUNK(ret); - hres = IUnknown_QueryInterface(EXTSERVUNK(ret), riid, ppv); - IUnknown_Release(EXTSERVUNK(ret)); + ret->outer = &ret->IUnknown_iface; + hres = IUnknown_QueryInterface(&ret->IUnknown_iface, riid, ppv); + IUnknown_Release(&ret->IUnknown_iface); }else if(IsEqualGUID(&IID_IUnknown, riid)) { ret->outer = punkOuter; - *ppv = EXTSERVUNK(ret); + *ppv = &ret->IUnknown_iface; }else { - IUnknown_Release(EXTSERVUNK(ret)); + IUnknown_Release(&ret->IUnknown_iface); hres = E_INVALIDARG; } Modified: trunk/reactos/dll/win32/hlink/hlink.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hlink/hlink.rbui…
============================================================================== --- trunk/reactos/dll/win32/hlink/hlink.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hlink/hlink.rbuild [iso-8859-1] Fri Jan 27 12:14:01 2012 @@ -11,6 +11,7 @@ <file>extserv.c</file> <file>hlink_main.c</file> <file>link.c</file> + <file>hlink.rc</file> <pch>hlink_private.h</pch> <library>wine</library> <library>shell32</library> Added: trunk/reactos/dll/win32/hlink/hlink.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hlink/hlink.rc?r…
============================================================================== --- trunk/reactos/dll/win32/hlink/hlink.rc (added) +++ trunk/reactos/dll/win32/hlink/hlink.rc [iso-8859-1] Fri Jan 27 12:14:01 2012 @@ -1,0 +1,1 @@ +1 WINE_REGISTRY hlink.rgs Propchange: trunk/reactos/dll/win32/hlink/hlink.rc ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/win32/hlink/hlink.rgs URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hlink/hlink.rgs?…
============================================================================== --- trunk/reactos/dll/win32/hlink/hlink.rgs (added) +++ trunk/reactos/dll/win32/hlink/hlink.rgs [iso-8859-1] Fri Jan 27 12:14:01 2012 @@ -1,0 +1,17 @@ +HKCR +{ + NoRemove Interface + { + } + NoRemove CLSID + { + '{79EAC9D0-BAF9-11CE-8C82-00AA004BA90B}' = s 'StdHlink' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' } + } + '{79EAC9D1-BAF9-11CE-8C82-00AA004BA90B}' = s 'StdHlinkBrowseContext' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' } + } + } +} Propchange: trunk/reactos/dll/win32/hlink/hlink.rgs ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/win32/hlink/hlink.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hlink/hlink.spec…
============================================================================== --- trunk/reactos/dll/win32/hlink/hlink.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hlink/hlink.spec [iso-8859-1] Fri Jan 27 12:14:01 2012 @@ -30,4 +30,4 @@ @ stdcall -private DllCanUnloadNow() @ stdcall -private DllGetClassObject(ptr ptr ptr) @ stdcall -private DllRegisterServer() -# @ stub -private DllUnregisterServer +@ stdcall -private DllUnregisterServer() Added: trunk/reactos/dll/win32/hlink/hlink_classes.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hlink/hlink_clas…
============================================================================== --- trunk/reactos/dll/win32/hlink/hlink_classes.idl (added) +++ trunk/reactos/dll/win32/hlink/hlink_classes.idl [iso-8859-1] Fri Jan 27 12:14:01 2012 @@ -1,0 +1,36 @@ +/* + * COM Classes for hlink + * + * Copyright 2010 Alexandre Julliard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +[ + threading(apartment), + uuid(79eac9d0-baf9-11ce-8c82-00aa004ba90b) +] +coclass StdHlink +{ + interface IHlink; + interface IPersistStream; + interface IDataObject; +} + +[ + threading(apartment), + uuid(79eac9d1-baf9-11ce-8c82-00aa004ba90b) +] +coclass StdHlinkBrowseContext { interface IHlinkBrowseContext; } Propchange: trunk/reactos/dll/win32/hlink/hlink_classes.idl ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/win32/hlink/hlink_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hlink/hlink_main…
============================================================================== --- trunk/reactos/dll/win32/hlink/hlink_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hlink/hlink_main.c [iso-8859-1] Fri Jan 27 12:14:01 2012 @@ -21,19 +21,27 @@ #include "hlink_private.h" #include "winreg.h" +#include "rpcproxy.h" #include "hlguids.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(hlink); -typedef HRESULT (CALLBACK *LPFNCREATEINSTANCE)(IUnknown*, REFIID, LPVOID*); +static HINSTANCE instance; + +typedef HRESULT (*LPFNCREATEINSTANCE)(IUnknown*, REFIID, LPVOID*); typedef struct { - const IClassFactoryVtbl *lpVtbl; - LPFNCREATEINSTANCE lpfnCI; + IClassFactory IClassFactory_iface; + LPFNCREATEINSTANCE lpfnCI; } CFImpl; + +static inline CFImpl *impl_from_IClassFactory(IClassFactory *iface) +{ + return CONTAINING_RECORD(iface, CFImpl, IClassFactory_iface); +} BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { @@ -42,6 +50,7 @@ switch (fdwReason) { case DLL_PROCESS_ATTACH: + instance = hinstDLL; DisableThreadLibraryCalls(hinstDLL); break; case DLL_PROCESS_DETACH: @@ -252,14 +261,16 @@ HRESULT r; IHlink *hlink = NULL; - FIXME("%s %s %p %08x %p %08x %p %p %p\n", + TRACE("%s %s %p %08x %p %08x %p %p %p\n", debugstr_w(pwzTarget), debugstr_w(pwzLocation), pihlsite, dwSiteData, pihlframe, grfHLNF, pibc, pibsc, pihlbc); r = HlinkCreateFromString( pwzTarget, pwzLocation, NULL, pihlsite, dwSiteData, NULL, &IID_IHlink, (LPVOID*) &hlink ); - if (SUCCEEDED(r)) + if (SUCCEEDED(r)) { r = HlinkNavigate(hlink, pihlframe, grfHLNF, pibc, pibsc, pihlbc); + IHlink_Release(hlink); + } return r; } @@ -496,7 +507,7 @@ static HRESULT WINAPI HLinkCF_fnQueryInterface ( LPCLASSFACTORY iface, REFIID riid, LPVOID *ppvObj) { - CFImpl *This = (CFImpl *)iface; + CFImpl *This = impl_from_IClassFactory(iface); TRACE("(%p)->(%s)\n",This,debugstr_guid(riid)); @@ -526,7 +537,7 @@ static HRESULT WINAPI HLinkCF_fnCreateInstance( LPCLASSFACTORY iface, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObject) { - CFImpl *This = (CFImpl *)iface; + CFImpl *This = impl_from_IClassFactory(iface); TRACE("%p->(%p,%s,%p)\n", This, pUnkOuter, debugstr_guid(riid), ppvObject); @@ -550,8 +561,8 @@ HLinkCF_fnLockServer }; -static CFImpl HLink_cf = { &hlcfvt, HLink_Constructor }; -static CFImpl HLinkBrowseContext_cf = { &hlcfvt, HLinkBrowseContext_Constructor }; +static CFImpl HLink_cf = { { &hlcfvt }, HLink_Constructor }; +static CFImpl HLinkBrowseContext_cf = { { &hlcfvt }, HLinkBrowseContext_Constructor }; /*********************************************************************** * DllGetClassObject (HLINK.@) @@ -567,55 +578,27 @@ *ppv = NULL; if (IsEqualIID(rclsid, &CLSID_StdHlink)) - pcf = (IClassFactory*) &HLink_cf; + pcf = &HLink_cf.IClassFactory_iface; else if (IsEqualIID(rclsid, &CLSID_StdHlinkBrowseContext)) - pcf = (IClassFactory*) &HLinkBrowseContext_cf; + pcf = &HLinkBrowseContext_cf.IClassFactory_iface; else return CLASS_E_CLASSNOTAVAILABLE; return IClassFactory_QueryInterface(pcf, iid, ppv); } -static HRESULT register_clsid(LPCGUID guid) -{ - static const WCHAR clsid[] = - {'C','L','S','I','D','\\',0}; - static const WCHAR ips[] = - {'\\','I','n','p','r','o','c','S','e','r','v','e','r','3','2',0}; - static const WCHAR hlink[] = - {'h','l','i','n','k','.','d','l','l',0}; - static const WCHAR threading_model[] = - {'T','h','r','e','a','d','i','n','g','M','o','d','e','l',0}; - static const WCHAR apartment[] = - {'A','p','a','r','t','m','e','n','t',0}; - WCHAR path[80]; - HKEY key = NULL; - LONG r; - - lstrcpyW(path, clsid); - StringFromGUID2(guid, &path[6], 80); - lstrcatW(path, ips); - r = RegCreateKeyW(HKEY_CLASSES_ROOT, path, &key); - if (r != ERROR_SUCCESS) - return E_FAIL; - - RegSetValueExW(key, NULL, 0, REG_SZ, (const BYTE *)hlink, sizeof hlink); - RegSetValueExW(key, threading_model, 0, REG_SZ, (const BYTE *)apartment, sizeof apartment); - RegCloseKey(key); - - return S_OK; -} - -/*********************************************************************** - * DllRegisterServer (HLINK.@) +/*********************************************************************** + * DllRegisterServer (HLINK.@) */ HRESULT WINAPI DllRegisterServer(void) { - HRESULT r; - - r = register_clsid(&CLSID_StdHlink); - if (SUCCEEDED(r)) - r = register_clsid(&CLSID_StdHlinkBrowseContext); - - return S_OK; -} + return __wine_register_resources( instance ); +} + +/*********************************************************************** + * DllUnregisterServer (HLINK.@) + */ +HRESULT WINAPI DllUnregisterServer(void) +{ + return __wine_unregister_resources( instance ); +} Modified: trunk/reactos/dll/win32/hlink/hlink_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hlink/hlink_priv…
============================================================================== --- trunk/reactos/dll/win32/hlink/hlink_private.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hlink/hlink_private.h [iso-8859-1] Fri Jan 27 12:14:01 2012 @@ -29,8 +29,8 @@ #include "wine/unicode.h" -extern HRESULT WINAPI HLink_Constructor(IUnknown*,REFIID,void**); -extern HRESULT WINAPI HLinkBrowseContext_Constructor(IUnknown*,REFIID,void**); +extern HRESULT HLink_Constructor(IUnknown*,REFIID,void**) DECLSPEC_HIDDEN; +extern HRESULT HLinkBrowseContext_Constructor(IUnknown*,REFIID,void**) DECLSPEC_HIDDEN; static inline void *heap_alloc(size_t len) { Modified: trunk/reactos/dll/win32/hlink/link.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hlink/link.c?rev…
============================================================================== --- trunk/reactos/dll/win32/hlink/link.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hlink/link.c [iso-8859-1] Fri Jan 27 12:14:01 2012 @@ -37,17 +37,13 @@ /* known flags */ #define HLINK_SAVE_ALL (HLINK_SAVE_TARGET_FRAME_PRESENT|HLINK_SAVE_FRIENDLY_PRESENT|HLINK_SAVE_LOCATION_PRESENT|0x04|HLINK_SAVE_MONIKER_IS_ABSOLUTE|HLINK_SAVE_MONIKER_PRESENT) -static const IHlinkVtbl hlvt; -static const IPersistStreamVtbl psvt; -static const IDataObjectVtbl dovt; - typedef struct { - const IHlinkVtbl *lpVtbl; + IHlink IHlink_iface; LONG ref; - const IPersistStreamVtbl *lpPSVtbl; - const IDataObjectVtbl *lpDOVtbl; + IPersistStream IPersistStream_iface; + IDataObject IDataObject_iface; LPWSTR FriendlyName; LPWSTR Location; @@ -58,15 +54,20 @@ BOOL absolute; } HlinkImpl; - -static inline HlinkImpl* HlinkImpl_from_IPersistStream( IPersistStream* iface) -{ - return (HlinkImpl*) ((CHAR*)iface - FIELD_OFFSET(HlinkImpl, lpPSVtbl)); -} - -static inline HlinkImpl* HlinkImpl_from_IDataObject( IDataObject* iface) -{ - return (HlinkImpl*) ((CHAR*)iface - FIELD_OFFSET(HlinkImpl, lpDOVtbl)); +static inline HlinkImpl *impl_from_IHlink(IHlink *iface) +{ + return CONTAINING_RECORD(iface, HlinkImpl, IHlink_iface); +} + + +static inline HlinkImpl* impl_from_IPersistStream( IPersistStream* iface) +{ + return CONTAINING_RECORD(iface, HlinkImpl, IPersistStream_iface); +} + +static inline HlinkImpl* impl_from_IDataObject( IDataObject* iface) +{ + return CONTAINING_RECORD(iface, HlinkImpl, IDataObject_iface); } static HRESULT __GetMoniker(HlinkImpl* This, IMoniker** moniker, @@ -105,34 +106,10 @@ return S_OK; } -HRESULT WINAPI HLink_Constructor(IUnknown *pUnkOuter, REFIID riid, - LPVOID *ppv) -{ - HlinkImpl * hl; - - TRACE("unkOut=%p riid=%s\n", pUnkOuter, debugstr_guid(riid)); - *ppv = NULL; - - if (pUnkOuter) - return CLASS_E_NOAGGREGATION; - - hl = heap_alloc_zero(sizeof(HlinkImpl)); - if (!hl) - return E_OUTOFMEMORY; - - hl->ref = 1; - hl->lpVtbl = &hlvt; - hl->lpPSVtbl = &psvt; - hl->lpDOVtbl = &dovt; - - *ppv = hl; - return S_OK; -} - static HRESULT WINAPI IHlink_fnQueryInterface(IHlink* iface, REFIID riid, LPVOID *ppvObj) { - HlinkImpl *This = (HlinkImpl*)iface; + HlinkImpl *This = impl_from_IHlink(iface); TRACE ("(%p)->(%s,%p)\n", This, debugstr_guid (riid), ppvObj); @@ -141,9 +118,9 @@ if (IsEqualIID(riid, &IID_IUnknown) || (IsEqualIID(riid, &IID_IHlink))) *ppvObj = This; else if (IsEqualIID(riid, &IID_IPersistStream)) - *ppvObj = &(This->lpPSVtbl); + *ppvObj = &This->IPersistStream_iface; else if (IsEqualIID(riid, &IID_IDataObject)) - *ppvObj = &(This->lpDOVtbl); + *ppvObj = &This->IDataObject_iface; if (*ppvObj) { @@ -155,7 +132,7 @@ static ULONG WINAPI IHlink_fnAddRef (IHlink* iface) { - HlinkImpl *This = (HlinkImpl*)iface; + HlinkImpl *This = impl_from_IHlink(iface); ULONG refCount = InterlockedIncrement(&This->ref); TRACE("(%p)->(count=%u)\n", This, refCount - 1); @@ -165,7 +142,7 @@ static ULONG WINAPI IHlink_fnRelease (IHlink* iface) { - HlinkImpl *This = (HlinkImpl*)iface; + HlinkImpl *This = impl_from_IHlink(iface); ULONG refCount = InterlockedDecrement(&This->ref); TRACE("(%p)->(count=%u)\n", This, refCount + 1); @@ -187,7 +164,7 @@ static HRESULT WINAPI IHlink_fnSetHlinkSite( IHlink* iface, IHlinkSite* pihlSite, DWORD dwSiteData) { - HlinkImpl *This = (HlinkImpl*)iface; + HlinkImpl *This = impl_from_IHlink(iface); TRACE("(%p)->(%p %i)\n", This, pihlSite, dwSiteData); @@ -206,7 +183,7 @@ static HRESULT WINAPI IHlink_fnGetHlinkSite( IHlink* iface, IHlinkSite** ppihlSite, DWORD *pdwSiteData) { - HlinkImpl *This = (HlinkImpl*)iface; + HlinkImpl *This = impl_from_IHlink(iface); TRACE("(%p)->(%p %p)\n", This, ppihlSite, pdwSiteData); @@ -223,7 +200,7 @@ static HRESULT WINAPI IHlink_fnSetMonikerReference( IHlink* iface, DWORD rfHLSETF, IMoniker *pmkTarget, LPCWSTR pwzLocation) { - HlinkImpl *This = (HlinkImpl*)iface; + HlinkImpl *This = impl_from_IHlink(iface); TRACE("(%p)->(%i %p %s)\n", This, rfHLSETF, pmkTarget, debugstr_w(pwzLocation)); @@ -259,7 +236,7 @@ static HRESULT WINAPI IHlink_fnSetStringReference(IHlink* iface, DWORD grfHLSETF, LPCWSTR pwzTarget, LPCWSTR pwzLocation) { - HlinkImpl *This = (HlinkImpl*)iface; + HlinkImpl *This = impl_from_IHlink(iface); TRACE("(%p)->(%i %s %s)\n", This, grfHLSETF, debugstr_w(pwzTarget), debugstr_w(pwzLocation)); @@ -323,7 +300,7 @@ static HRESULT WINAPI IHlink_fnGetMonikerReference(IHlink* iface, DWORD dwWhichRef, IMoniker **ppimkTarget, LPWSTR *ppwzLocation) { - HlinkImpl *This = (HlinkImpl*)iface; + HlinkImpl *This = impl_from_IHlink(iface); TRACE("(%p) -> (%i %p %p)\n", This, dwWhichRef, ppimkTarget, ppwzLocation); @@ -348,7 +325,7 @@ static HRESULT WINAPI IHlink_fnGetStringReference (IHlink* iface, DWORD dwWhichRef, LPWSTR *ppwzTarget, LPWSTR *ppwzLocation) { - HlinkImpl *This = (HlinkImpl*)iface; + HlinkImpl *This = impl_from_IHlink(iface); TRACE("(%p) -> (%i %p %p)\n", This, dwWhichRef, ppwzTarget, ppwzLocation); @@ -396,7 +373,7 @@ static HRESULT WINAPI IHlink_fnSetFriendlyName (IHlink *iface, LPCWSTR pwzFriendlyName) { - HlinkImpl *This = (HlinkImpl*)iface; + HlinkImpl *This = impl_from_IHlink(iface); TRACE("(%p) -> (%s)\n", This, debugstr_w(pwzFriendlyName)); @@ -409,7 +386,7 @@ static HRESULT WINAPI IHlink_fnGetFriendlyName (IHlink* iface, DWORD grfHLFNAMEF, LPWSTR* ppwzFriendlyName) { - HlinkImpl *This = (HlinkImpl*)iface; + HlinkImpl *This = impl_from_IHlink(iface); TRACE("(%p) -> (%i %p)\n", This, grfHLFNAMEF, ppwzFriendlyName); @@ -445,7 +422,7 @@ static HRESULT WINAPI IHlink_fnSetTargetFrameName(IHlink* iface, LPCWSTR pwzTargetFramename) { - HlinkImpl *This = (HlinkImpl*)iface; + HlinkImpl *This = impl_from_IHlink(iface); TRACE("(%p)->(%s)\n", This, debugstr_w(pwzTargetFramename)); heap_free(This->TargetFrameName); @@ -457,10 +434,18 @@ static HRESULT WINAPI IHlink_fnGetTargetFrameName(IHlink* iface, LPWSTR *ppwzTargetFrameName) { - HlinkImpl *This = (HlinkImpl*)iface; + HlinkImpl *This = impl_from_IHlink(iface); TRACE("(%p)->(%p)\n", This, ppwzTargetFrameName); + + if(!This->TargetFrameName) { + *ppwzTargetFrameName = NULL; + return S_FALSE; + } + *ppwzTargetFrameName = hlink_co_strdupW( This->TargetFrameName ); + if(!*ppwzTargetFrameName) + return E_OUTOFMEMORY; return S_OK; } @@ -474,7 +459,7 @@ static HRESULT WINAPI IHlink_fnNavigate(IHlink* iface, DWORD grfHLNF, LPBC pbc, IBindStatusCallback *pbsc, IHlinkBrowseContext *phbc) { - HlinkImpl *This = (HlinkImpl*)iface; + HlinkImpl *This = impl_from_IHlink(iface); IMoniker *mon = NULL; HRESULT r; @@ -565,23 +550,23 @@ static HRESULT WINAPI IDataObject_fnQueryInterface(IDataObject* iface, REFIID riid, LPVOID *ppvObj) { - HlinkImpl *This = HlinkImpl_from_IDataObject(iface); + HlinkImpl *This = impl_from_IDataObject(iface); TRACE("%p\n", This); - return IHlink_QueryInterface((IHlink*)This, riid, ppvObj); + return IHlink_QueryInterface(&This->IHlink_iface, riid, ppvObj); } static ULONG WINAPI IDataObject_fnAddRef (IDataObject* iface) { - HlinkImpl *This = HlinkImpl_from_IDataObject(iface); + HlinkImpl *This = impl_from_IDataObject(iface); TRACE("%p\n", This); - return IHlink_AddRef((IHlink*)This); + return IHlink_AddRef(&This->IHlink_iface); } static ULONG WINAPI IDataObject_fnRelease (IDataObject* iface) { - HlinkImpl *This = HlinkImpl_from_IDataObject(iface); + HlinkImpl *This = impl_from_IDataObject(iface); TRACE("%p\n", This); - return IHlink_Release((IHlink*)This); + return IHlink_Release(&This->IHlink_iface); } static HRESULT WINAPI IDataObject_fnGetData(IDataObject* iface, @@ -667,29 +652,29 @@ static HRESULT WINAPI IPersistStream_fnQueryInterface(IPersistStream* iface, REFIID riid, LPVOID *ppvObj) { - HlinkImpl *This = HlinkImpl_from_IPersistStream(iface); + HlinkImpl *This = impl_from_IPersistStream(iface); TRACE("(%p)\n", This); - return IHlink_QueryInterface((IHlink*)This, riid, ppvObj); + return IHlink_QueryInterface(&This->IHlink_iface, riid, ppvObj); } static ULONG WINAPI IPersistStream_fnAddRef (IPersistStream* iface) { - HlinkImpl *This = HlinkImpl_from_IPersistStream(iface); + HlinkImpl *This = impl_from_IPersistStream(iface); TRACE("(%p)\n", This); - return IHlink_AddRef((IHlink*)This); + return IHlink_AddRef(&This->IHlink_iface); } static ULONG WINAPI IPersistStream_fnRelease (IPersistStream* iface) { - HlinkImpl *This = HlinkImpl_from_IPersistStream(iface); + HlinkImpl *This = impl_from_IPersistStream(iface); TRACE("(%p)\n", This); - return IHlink_Release((IHlink*)This); + return IHlink_Release(&This->IHlink_iface); } static HRESULT WINAPI IPersistStream_fnGetClassID(IPersistStream* iface, CLSID* pClassID) { - HlinkImpl *This = HlinkImpl_from_IPersistStream(iface); + HlinkImpl *This = impl_from_IPersistStream(iface); TRACE("(%p)\n", This); *pClassID = CLSID_StdHlink; return S_OK; @@ -763,7 +748,7 @@ HRESULT r; DWORD hdr[2]; DWORD read; - HlinkImpl *This = HlinkImpl_from_IPersistStream(iface); + HlinkImpl *This = impl_from_IPersistStream(iface); r = IStream_Read(pStm, hdr, sizeof(hdr), &read); if (read != sizeof(hdr) || (hdr[0] != HLINK_SAVE_MAGIC)) @@ -816,7 +801,7 @@ IStream* pStm, BOOL fClearDirty) { HRESULT r; - HlinkImpl *This = HlinkImpl_from_IPersistStream(iface); + HlinkImpl *This = impl_from_IPersistStream(iface); DWORD hdr[2]; IMoniker *moniker; @@ -887,7 +872,7 @@ ULARGE_INTEGER* pcbSize) { HRESULT r; - HlinkImpl *This = HlinkImpl_from_IPersistStream(iface); + HlinkImpl *This = impl_from_IPersistStream(iface); IMoniker *moniker; TRACE("(%p) Moniker(%p)\n", This, This->Moniker); @@ -937,3 +922,26 @@ IPersistStream_fnSave, IPersistStream_fnGetSizeMax, }; + +HRESULT HLink_Constructor(IUnknown *pUnkOuter, REFIID riid, void **ppv) +{ + HlinkImpl * hl; + + TRACE("unkOut=%p riid=%s\n", pUnkOuter, debugstr_guid(riid)); + *ppv = NULL; + + if (pUnkOuter) + return CLASS_E_NOAGGREGATION; + + hl = heap_alloc_zero(sizeof(HlinkImpl)); + if (!hl) + return E_OUTOFMEMORY; + + hl->ref = 1; + hl->IHlink_iface.lpVtbl = &hlvt; + hl->IPersistStream_iface.lpVtbl = &psvt; + hl->IDataObject_iface.lpVtbl = &dovt; + + *ppv = hl; + return S_OK; +} 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] Fri Jan 27 12:14:01 2012 @@ -63,7 +63,7 @@ reactos/dll/win32/fusion # Synced to Wine-1.3.37 reactos/dll/win32/gdiplus # Autosync reactos/dll/win32/hhctrl.ocx # Autosync -reactos/dll/win32/hlink # Autosync +reactos/dll/win32/hlink # Synced to Wine-1.3.37 reactos/dll/win32/hnetcfg # Autosync reactos/dll/win32/httpapi # Synced to Wine-1.3.37 reactos/dll/win32/iccvid # Autosync
12 years, 11 months
1
0
0
0
[akhaldi] 55235: [MSCMS_WINETEST] * Sync to Wine 1.3.37.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Jan 27 11:01:09 2012 New Revision: 55235 URL:
http://svn.reactos.org/svn/reactos?rev=55235&view=rev
Log: [MSCMS_WINETEST] * Sync to Wine 1.3.37. Modified: trunk/rostests/winetests/mscms/profile.c Modified: trunk/rostests/winetests/mscms/profile.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mscms/profile.c…
============================================================================== --- trunk/rostests/winetests/mscms/profile.c [iso-8859-1] (original) +++ trunk/rostests/winetests/mscms/profile.c [iso-8859-1] Fri Jan 27 11:01:09 2012 @@ -30,8 +30,8 @@ #include "wine/test.h" -HMODULE hmscms; -HMODULE huser32; +static HMODULE hmscms; +static HMODULE huser32; static BOOL (WINAPI *pAssociateColorProfileWithDeviceA)(PCSTR,PCSTR,PCSTR); static BOOL (WINAPI *pCloseColorProfile)(HPROFILE); @@ -459,39 +459,42 @@ DWORD size; CHAR oldprofile[MAX_PATH]; CHAR newprofile[MAX_PATH]; - const CHAR emptyA[] = ""; - DWORD zero = 0; - DWORD sizeP = sizeof(newprofile); /* Parameter checks */ /* Single invalid parameter checks: */ + size = sizeof(newprofile); SetLastError(0xfaceabee); /* 1st param, */ - ret = pGetStandardColorSpaceProfileA(machine, LCS_sRGB, newprofile, &sizeP); + ret = pGetStandardColorSpaceProfileA(machine, LCS_sRGB, newprofile, &size); ok( !ret && GetLastError() == ERROR_NOT_SUPPORTED, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); + size = sizeof(newprofile); SetLastError(0xfaceabee); /* 2nd param, */ - ret = pGetStandardColorSpaceProfileA(NULL, (DWORD)-1, newprofile, &sizeP); + ret = pGetStandardColorSpaceProfileA(NULL, (DWORD)-1, newprofile, &size); ok( !ret && GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); + size = sizeof(newprofile); SetLastError(0xfaceabee); /* 4th param, */ ret = pGetStandardColorSpaceProfileA(NULL, LCS_sRGB, newprofile, NULL); ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); + size = sizeof(newprofile); SetLastError(0xfaceabee); /* 3rd param, */ - ret = pGetStandardColorSpaceProfileA(NULL, LCS_sRGB, NULL, &sizeP); + ret = pGetStandardColorSpaceProfileA(NULL, LCS_sRGB, NULL, &size); ok( !ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); + size = 0; SetLastError(0xfaceabee); /* dereferenced 4th param, */ - ret = pGetStandardColorSpaceProfileA(NULL, LCS_sRGB, newprofile, &zero); + ret = pGetStandardColorSpaceProfileA(NULL, LCS_sRGB, newprofile, &size); ok( !ret && (GetLastError() == ERROR_MORE_DATA || GetLastError() == ERROR_INSUFFICIENT_BUFFER), "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); /* Several invalid parameter checks: */ + size = 0; SetLastError(0xfaceabee); /* 1st, maybe 2nd and then dereferenced 4th param, */ - ret = pGetStandardColorSpaceProfileA(machine, 0, newprofile, &zero); + ret = pGetStandardColorSpaceProfileA(machine, 0, newprofile, &size); ok( !ret && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_NOT_SUPPORTED), "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); @@ -499,15 +502,17 @@ ret = pGetStandardColorSpaceProfileA(NULL, 0, newprofile, NULL); ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); + size = 0; SetLastError(0xfaceabee); /* maybe 2nd, then 3rd and dereferenced 4th param, */ - ret = pGetStandardColorSpaceProfileA(NULL, 0, NULL, &zero); + ret = pGetStandardColorSpaceProfileA(NULL, 0, NULL, &size); ok( !ret && (GetLastError() == ERROR_INSUFFICIENT_BUFFER || GetLastError() == ERROR_FILE_NOT_FOUND), "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); + size = sizeof(newprofile); SetLastError(0xfaceabee); /* maybe 2nd param. */ - ret = pGetStandardColorSpaceProfileA(NULL, 0, newprofile, &sizeP); + ret = pGetStandardColorSpaceProfileA(NULL, 0, newprofile, &size); if (!ret) ok( GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); - else ok( !lstrcmpiA( newprofile, emptyA ) && GetLastError() == 0xfaceabee, + else ok( !lstrcmpiA( newprofile, "" ) && GetLastError() == 0xfaceabee, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); /* Functional checks */ @@ -540,45 +545,55 @@ WCHAR oldprofile[MAX_PATH]; WCHAR newprofile[MAX_PATH]; CHAR newprofileA[MAX_PATH]; - const CHAR empty[] = ""; - DWORD zero = 0; - DWORD sizeP = sizeof(newprofile); /* Parameter checks */ /* Single invalid parameter checks: */ + size = sizeof(newprofile); SetLastError(0xfaceabee); /* 1st param, */ - ret = pGetStandardColorSpaceProfileW(machineW, LCS_sRGB, newprofile, &sizeP); + ret = pGetStandardColorSpaceProfileW(machineW, LCS_sRGB, newprofile, &size); ok( !ret && GetLastError() == ERROR_NOT_SUPPORTED, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); + size = sizeof(newprofile); SetLastError(0xfaceabee); /* 2nd param, */ - ret = pGetStandardColorSpaceProfileW(NULL, (DWORD)-1, newprofile, &sizeP); + ret = pGetStandardColorSpaceProfileW(NULL, (DWORD)-1, newprofile, &size); ok( !ret && GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); + size = sizeof(newprofile); SetLastError(0xfaceabee); /* 2nd param, */ - ret = pGetStandardColorSpaceProfileW(NULL, 0, newprofile, &sizeP); + ret = pGetStandardColorSpaceProfileW(NULL, 0, newprofile, &size); ok( (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) || broken(ret), /* Win98 and WinME */ "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); + size = sizeof(newprofile); SetLastError(0xfaceabee); /* 3rd param, */ - ret = pGetStandardColorSpaceProfileW(NULL, LCS_sRGB, NULL, &sizeP); - ok( !ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); - + ret = pGetStandardColorSpaceProfileW(NULL, LCS_sRGB, NULL, &size); + ok( !ret || broken(ret) /* win98 */, "GetStandardColorSpaceProfileW succeeded\n" ); + ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER || + broken(GetLastError() == 0xfaceabee) /* win98 */, + "GetStandardColorSpaceProfileW() returns GLE=%u\n", GetLastError() ); + + size = sizeof(newprofile); SetLastError(0xfaceabee); /* 4th param, */ ret = pGetStandardColorSpaceProfileW(NULL, LCS_sRGB, newprofile, NULL); ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); + size = 0; SetLastError(0xfaceabee); /* dereferenced 4th param. */ - ret = pGetStandardColorSpaceProfileW(NULL, LCS_sRGB, newprofile, &zero); - ok( !ret && (GetLastError() == ERROR_MORE_DATA || GetLastError() == ERROR_INSUFFICIENT_BUFFER), - "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); + ret = pGetStandardColorSpaceProfileW(NULL, LCS_sRGB, newprofile, &size); + ok( !ret || broken(ret) /* win98 */, "GetStandardColorSpaceProfileW succeeded\n" ); + ok( GetLastError() == ERROR_MORE_DATA || + GetLastError() == ERROR_INSUFFICIENT_BUFFER || + broken(GetLastError() == 0xfaceabee) /* win98 */, + "GetStandardColorSpaceProfileW() returns GLE=%u\n", GetLastError() ); /* Several invalid parameter checks: */ + size = 0; SetLastError(0xfaceabee); /* 1st, maybe 2nd and then dereferenced 4th param, */ - ret = pGetStandardColorSpaceProfileW(machineW, 0, newprofile, &zero); + ret = pGetStandardColorSpaceProfileW(machineW, 0, newprofile, &size); ok( !ret && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_NOT_SUPPORTED), "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); @@ -586,18 +601,23 @@ ret = pGetStandardColorSpaceProfileW(NULL, 0, newprofile, NULL); ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); + size = 0; SetLastError(0xfaceabee); /* maybe 2nd, then 3rd and dereferenced 4th param, */ - ret = pGetStandardColorSpaceProfileW(NULL, 0, NULL, &zero); - ok( !ret && (GetLastError() == ERROR_INSUFFICIENT_BUFFER || GetLastError() == ERROR_FILE_NOT_FOUND), - "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); - + ret = pGetStandardColorSpaceProfileW(NULL, 0, NULL, &size); + ok( !ret || broken(ret) /* win98 */, "GetStandardColorSpaceProfileW succeeded\n" ); + ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER || + GetLastError() == ERROR_FILE_NOT_FOUND || + broken(GetLastError() == 0xfaceabee) /* win98 */, + "GetStandardColorSpaceProfileW() returns GLE=%u\n", GetLastError() ); + + size = sizeof(newprofile); SetLastError(0xfaceabee); /* maybe 2nd param. */ - ret = pGetStandardColorSpaceProfileW(NULL, 0, newprofile, &sizeP); + ret = pGetStandardColorSpaceProfileW(NULL, 0, newprofile, &size); if (!ret) ok( GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); else { WideCharToMultiByte(CP_ACP, 0, newprofile, -1, newprofileA, sizeof(newprofileA), NULL, NULL); - ok( !lstrcmpiA( newprofileA, empty ) && GetLastError() == 0xfaceabee, + ok( !lstrcmpiA( newprofileA, "" ) && GetLastError() == 0xfaceabee, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); } @@ -928,6 +948,16 @@ /* Functional checks */ handle = pOpenColorProfileA( &profile, PROFILE_READ, 0, OPEN_EXISTING ); + ok( handle != NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); + + ret = pCloseColorProfile( handle ); + ok( ret, "CloseColorProfile() failed (%d)\n", GetLastError() ); + + profile.dwType = PROFILE_FILENAME; + profile.pProfileData = (void *)"sRGB Color Space Profile.icm"; + profile.cbDataSize = sizeof("sRGB Color Space Profile.icm"); + + handle = pOpenColorProfileA( &profile, PROFILE_READ, FILE_SHARE_READ, OPEN_EXISTING ); ok( handle != NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); ret = pCloseColorProfile( handle ); @@ -1328,10 +1358,10 @@ ret = GetSystemDirectoryA( profilefile1, sizeof(profilefile1) ); ok( ret > 0, "GetSystemDirectoryA() returns %d, LastError = %d\n", ret, GetLastError()); ok( lstrlenA(profilefile1) > 0 && lstrlenA(profilefile1) < MAX_PATH, - "GetSystemDirectoryA() returns %d, LastError = %d\n", ret, GetLastError()); + "Expected length between 0 and MAX_PATH, got %d\n", lstrlenA(profilefile1)); MultiByteToWideChar(CP_ACP, 0, profilefile1, -1, profilefile1W, MAX_PATH); ok( lstrlenW(profilefile1W) > 0 && lstrlenW(profilefile1W) < MAX_PATH, - "GetSystemDirectoryA() returns %d, LastError = %d\n", ret, GetLastError()); + "Expected length between 0 and MAX_PATH, got %d\n", lstrlenW(profilefile1W)); lstrcpyA(profilefile2, profilefile1); lstrcpyW(profilefile2W, profilefile1W);
12 years, 11 months
1
0
0
0
[akhaldi] 55234: [MSCMS] * Sync to Wine 1.3.37.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Jan 27 11:01:06 2012 New Revision: 55234 URL:
http://svn.reactos.org/svn/reactos?rev=55234&view=rev
Log: [MSCMS] * Sync to Wine 1.3.37. Modified: trunk/reactos/dll/win32/mscms/CMakeLists.txt trunk/reactos/dll/win32/mscms/handle.c trunk/reactos/dll/win32/mscms/icc.c trunk/reactos/dll/win32/mscms/mscms.rbuild trunk/reactos/dll/win32/mscms/mscms_priv.h trunk/reactos/dll/win32/mscms/profile.c trunk/reactos/dll/win32/mscms/stub.c trunk/reactos/dll/win32/mscms/transform.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/mscms/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mscms/CMakeLists…
============================================================================== --- trunk/reactos/dll/win32/mscms/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mscms/CMakeLists.txt [iso-8859-1] Fri Jan 27 11:01:06 2012 @@ -21,5 +21,4 @@ set_module_type(mscms win32dll) target_link_libraries(mscms wine) add_importlibs(mscms msvcrt advapi32 kernel32 ntdll) -add_pch(mscms mscms_priv.h) add_cd_file(TARGET mscms DESTINATION reactos/system32 FOR all) Modified: trunk/reactos/dll/win32/mscms/handle.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mscms/handle.c?r…
============================================================================== --- trunk/reactos/dll/win32/mscms/handle.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mscms/handle.c [iso-8859-1] Fri Jan 27 11:01:06 2012 @@ -60,6 +60,8 @@ HeapFree( GetProcessHeap(), 0, transformtable ); transformtable = NULL; num_transform_handles = 0; + + DeleteCriticalSection( &MSCMS_handle_cs ); } struct profile *grab_profile( HPROFILE handle ) Modified: trunk/reactos/dll/win32/mscms/icc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mscms/icc.c?rev=…
============================================================================== --- trunk/reactos/dll/win32/mscms/icc.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mscms/icc.c [iso-8859-1] Fri Jan 27 11:01:06 2012 @@ -33,7 +33,7 @@ #ifdef HAVE_LCMS -static inline void MSCMS_adjust_endianess32( ULONG *ptr ) +static inline void MSCMS_adjust_endianness32( ULONG *ptr ) { #ifndef WORDS_BIGENDIAN *ptr = RtlUlongByteSwap(*ptr); @@ -48,7 +48,7 @@ /* ICC format is big-endian, swap bytes if necessary */ for (i = 0; i < sizeof(PROFILEHEADER) / sizeof(ULONG); i++) - MSCMS_adjust_endianess32( (ULONG *)header + i ); + MSCMS_adjust_endianness32( (ULONG *)header + i ); } void MSCMS_set_profile_header( icProfile *iccprofile, const PROFILEHEADER *header ) @@ -60,14 +60,14 @@ /* ICC format is big-endian, swap bytes if necessary */ for (i = 0; i < sizeof(icHeader) / sizeof(ULONG); i++) - MSCMS_adjust_endianess32( (ULONG *)iccheader + i ); + MSCMS_adjust_endianness32( (ULONG *)iccheader + i ); } DWORD MSCMS_get_tag_count( const icProfile *iccprofile ) { ULONG count = iccprofile->count; - MSCMS_adjust_endianess32( &count ); + MSCMS_adjust_endianness32( &count ); return count; } @@ -79,9 +79,9 @@ tag->offset = tmp->offset; tag->size = tmp->size; - MSCMS_adjust_endianess32( &tag->sig ); - MSCMS_adjust_endianess32( &tag->offset ); - MSCMS_adjust_endianess32( &tag->size ); + MSCMS_adjust_endianness32( &tag->sig ); + MSCMS_adjust_endianness32( &tag->offset ); + MSCMS_adjust_endianness32( &tag->size ); } void MSCMS_get_tag_data( const icProfile *iccprofile, const icTag *tag, DWORD offset, void *buffer ) @@ -98,7 +98,7 @@ { DWORD size = ((const icHeader *)iccprofile)->size; - MSCMS_adjust_endianess32( &size ); + MSCMS_adjust_endianness32( &size ); return size; } Modified: trunk/reactos/dll/win32/mscms/mscms.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mscms/mscms.rbui…
============================================================================== --- trunk/reactos/dll/win32/mscms/mscms.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mscms/mscms.rbuild [iso-8859-1] Fri Jan 27 11:01:06 2012 @@ -10,7 +10,6 @@ <file>stub.c</file> <file>transform.c</file> <file>version.rc</file> - <pch>mscms_priv.h</pch> <library>wine</library> <library>advapi32</library> <library>ntdll</library> Modified: trunk/reactos/dll/win32/mscms/mscms_priv.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mscms/mscms_priv…
============================================================================== --- trunk/reactos/dll/win32/mscms/mscms_priv.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mscms/mscms_priv.h [iso-8859-1] Fri Jan 27 11:01:06 2012 @@ -87,28 +87,28 @@ cmsHTRANSFORM cmstransform; }; -extern HPROFILE create_profile( struct profile * ); -extern BOOL close_profile( HPROFILE ); +extern HPROFILE create_profile( struct profile * ) DECLSPEC_HIDDEN; +extern BOOL close_profile( HPROFILE ) DECLSPEC_HIDDEN; -extern HTRANSFORM create_transform( struct transform * ); -extern BOOL close_transform( HTRANSFORM ); +extern HTRANSFORM create_transform( struct transform * ) DECLSPEC_HIDDEN; +extern BOOL close_transform( HTRANSFORM ) DECLSPEC_HIDDEN; -struct profile *grab_profile( HPROFILE ); -struct transform *grab_transform( HTRANSFORM ); +struct profile *grab_profile( HPROFILE ) DECLSPEC_HIDDEN; +struct transform *grab_transform( HTRANSFORM ) DECLSPEC_HIDDEN; -void release_profile( struct profile * ); -void release_transform( struct transform * ); +void release_profile( struct profile * ) DECLSPEC_HIDDEN; +void release_transform( struct transform * ) DECLSPEC_HIDDEN; -extern void free_handle_tables( void ); +extern void free_handle_tables( void ) DECLSPEC_HIDDEN; -extern DWORD MSCMS_get_tag_count( const icProfile *iccprofile ); -extern void MSCMS_get_tag_by_index( icProfile *iccprofile, DWORD index, icTag *tag ); -extern void MSCMS_get_tag_data( const icProfile *iccprofile, const icTag *tag, DWORD offset, void *buffer ); -extern void MSCMS_set_tag_data( icProfile *iccprofile, const icTag *tag, DWORD offset, const void *buffer ); -extern void MSCMS_get_profile_header( const icProfile *iccprofile, PROFILEHEADER *header ); -extern void MSCMS_set_profile_header( icProfile *iccprofile, const PROFILEHEADER *header ); -extern DWORD MSCMS_get_profile_size( const icProfile *iccprofile ); - -extern const char *MSCMS_dbgstr_tag(DWORD); +extern DWORD MSCMS_get_tag_count( const icProfile *iccprofile ) DECLSPEC_HIDDEN; +extern void MSCMS_get_tag_by_index( icProfile *iccprofile, DWORD index, icTag *tag ) DECLSPEC_HIDDEN; +extern void MSCMS_get_tag_data( const icProfile *iccprofile, const icTag *tag, DWORD offset, void *buffer ) DECLSPEC_HIDDEN; +extern void MSCMS_set_tag_data( icProfile *iccprofile, const icTag *tag, DWORD offset, const void *buffer ) DECLSPEC_HIDDEN; +extern void MSCMS_get_profile_header( const icProfile *iccprofile, PROFILEHEADER *header ) DECLSPEC_HIDDEN; +extern void MSCMS_set_profile_header( icProfile *iccprofile, const PROFILEHEADER *header ) DECLSPEC_HIDDEN; +extern DWORD MSCMS_get_profile_size( const icProfile *iccprofile ) DECLSPEC_HIDDEN; #endif /* HAVE_LCMS */ + +extern const char *MSCMS_dbgstr_tag(DWORD) DECLSPEC_HIDDEN; Modified: trunk/reactos/dll/win32/mscms/profile.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mscms/profile.c?…
============================================================================== --- trunk/reactos/dll/win32/mscms/profile.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mscms/profile.c [iso-8859-1] Fri Jan 27 11:01:06 2012 @@ -30,6 +30,7 @@ #include "wingdi.h" #include "winuser.h" #include "winreg.h" +#include "shlwapi.h" #include "icm.h" #include "mscms_priv.h" @@ -497,7 +498,7 @@ * Failure: FALSE * * NOTES - * The profile header returned will be adjusted for endianess. + * The profile header returned will be adjusted for endianness. */ BOOL WINAPI GetColorProfileHeader( HPROFILE handle, PPROFILEHEADER header ) { @@ -660,9 +661,9 @@ GetColorDirectoryW( machine, rgbprofile, &len ); switch (id) + { case LCS_sRGB: case LCS_WINDOWS_COLOR_SPACE: /* FIXME */ - { lstrcatW( rgbprofile, rgbprofilefile ); len = lstrlenW( rgbprofile ) * sizeof(WCHAR); @@ -1470,7 +1471,25 @@ if (!flags) return NULL; if (!sharing) sharing = FILE_SHARE_READ; - handle = CreateFileW( profile->pProfileData, flags, sharing, NULL, creation, 0, NULL ); + if (!PathIsRelativeW( profile->pProfileData )) + handle = CreateFileW( profile->pProfileData, flags, sharing, NULL, creation, 0, NULL ); + else + { + DWORD size; + WCHAR *path; + + if (!GetColorDirectoryW( NULL, NULL, &size ) && GetLastError() == ERROR_MORE_DATA) + { + size += (strlenW( profile->pProfileData ) + 2) * sizeof(WCHAR); + if (!(path = HeapAlloc( GetProcessHeap(), 0, size ))) return NULL; + GetColorDirectoryW( NULL, path, &size ); + PathAddBackslashW( path ); + strcatW( path, profile->pProfileData ); + } + else return NULL; + handle = CreateFileW( path, flags, sharing, NULL, creation, 0, NULL ); + HeapFree( GetProcessHeap(), 0, path ); + } if (handle == INVALID_HANDLE_VALUE) { WARN( "Unable to open color profile %u\n", GetLastError() ); Modified: trunk/reactos/dll/win32/mscms/stub.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mscms/stub.c?rev…
============================================================================== --- trunk/reactos/dll/win32/mscms/stub.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mscms/stub.c [iso-8859-1] Fri Jan 27 11:01:06 2012 @@ -137,21 +137,21 @@ BOOL WINAPI RegisterCMMA( PCSTR machine, DWORD id, PCSTR dll ) { - FIXME( "( %p, 0x%08x, %p ) stub\n", machine, id, dll ); + FIXME( "( %p, %s, %p ) stub\n", machine, MSCMS_dbgstr_tag(id), dll ); return TRUE; } BOOL WINAPI RegisterCMMW( PCWSTR machine, DWORD id, PCWSTR dll ) { - FIXME( "( %p, 0x%08x, %p ) stub\n", machine, id, dll ); + FIXME( "( %p, %s, %p ) stub\n", machine, MSCMS_dbgstr_tag(id), dll ); return TRUE; } BOOL WINAPI SelectCMM( DWORD id ) { - FIXME( "(%x) stub\n", id ); + FIXME( "(%s) stub\n", MSCMS_dbgstr_tag(id) ); return TRUE; } @@ -190,14 +190,14 @@ BOOL WINAPI UnregisterCMMA( PCSTR machine, DWORD id ) { - FIXME( "( %p, 0x%08x ) stub\n", machine, id ); + FIXME( "( %p, %s ) stub\n", machine, MSCMS_dbgstr_tag(id) ); return TRUE; } BOOL WINAPI UnregisterCMMW( PCWSTR machine, DWORD id ) { - FIXME( "( %p, 0x%08x ) stub\n", machine, id ); - - return TRUE; -} + FIXME( "( %p, %s ) stub\n", machine, MSCMS_dbgstr_tag(id) ); + + return TRUE; +} Modified: trunk/reactos/dll/win32/mscms/transform.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mscms/transform.…
============================================================================== --- trunk/reactos/dll/win32/mscms/transform.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mscms/transform.c [iso-8859-1] Fri Jan 27 11:01:06 2012 @@ -238,7 +238,7 @@ if (out_format == TYPE_Lab_16) cmsconvert = cmsCreateLabProfile( NULL ); } - cmsprofiles = HeapAlloc( GetProcessHeap(), 0, (nprofiles + 1) * sizeof(cmsHPROFILE *) ); + cmsprofiles = HeapAlloc( GetProcessHeap(), 0, (nprofiles + 1) * sizeof(cmsHPROFILE) ); if (cmsprofiles) { cmsprofiles[0] = profile0->cmsprofile; @@ -355,8 +355,8 @@ BOOL WINAPI TranslateColors( HTRANSFORM handle, PCOLOR in, DWORD count, COLORTYPE input_type, PCOLOR out, COLORTYPE output_type ) { - BOOL ret = FALSE; -#ifdef HAVE_LCMS +#ifdef HAVE_LCMS + BOOL ret = TRUE; struct transform *transform = grab_transform( handle ); cmsHTRANSFORM xfrm; unsigned int i; @@ -374,78 +374,93 @@ { switch (output_type) { - case COLOR_RGB: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].rgb, &out[i].rgb, 1 ); return TRUE; - case COLOR_Lab: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].rgb, &out[i].Lab, 1 ); return TRUE; - case COLOR_GRAY: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].rgb, &out[i].gray, 1 ); return TRUE; - case COLOR_CMYK: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].rgb, &out[i].cmyk, 1 ); return TRUE; - case COLOR_XYZ: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].rgb, &out[i].XYZ, 1 ); return TRUE; + case COLOR_RGB: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].rgb, &out[i].rgb, 1 ); goto done; + case COLOR_Lab: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].rgb, &out[i].Lab, 1 ); goto done; + case COLOR_GRAY: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].rgb, &out[i].gray, 1 ); goto done; + case COLOR_CMYK: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].rgb, &out[i].cmyk, 1 ); goto done; + case COLOR_XYZ: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].rgb, &out[i].XYZ, 1 ); goto done; default: FIXME("unhandled input/output pair: %d/%d\n", input_type, output_type); - return FALSE; - } + ret = FALSE; + break; + } + break; } case COLOR_Lab: { switch (output_type) { - case COLOR_RGB: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].Lab, &out[i].rgb, 1 ); return TRUE; - case COLOR_Lab: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].Lab, &out[i].Lab, 1 ); return TRUE; - case COLOR_GRAY: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].Lab, &out[i].gray, 1 ); return TRUE; - case COLOR_CMYK: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].Lab, &out[i].cmyk, 1 ); return TRUE; - case COLOR_XYZ: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].Lab, &out[i].XYZ, 1 ); return TRUE; + case COLOR_RGB: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].Lab, &out[i].rgb, 1 ); goto done; + case COLOR_Lab: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].Lab, &out[i].Lab, 1 ); goto done; + case COLOR_GRAY: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].Lab, &out[i].gray, 1 ); goto done; + case COLOR_CMYK: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].Lab, &out[i].cmyk, 1 ); goto done; + case COLOR_XYZ: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].Lab, &out[i].XYZ, 1 ); goto done; default: FIXME("unhandled input/output pair: %d/%d\n", input_type, output_type); - return FALSE; - } + ret = FALSE; + break; + } + break; } case COLOR_GRAY: { switch (output_type) { - case COLOR_RGB: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].gray, &out[i].rgb, 1 ); return TRUE; - case COLOR_Lab: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].gray, &out[i].Lab, 1 ); return TRUE; - case COLOR_GRAY: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].gray, &out[i].gray, 1 ); return TRUE; - case COLOR_CMYK: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].gray, &out[i].cmyk, 1 ); return TRUE; - case COLOR_XYZ: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].gray, &out[i].XYZ, 1 ); return TRUE; + case COLOR_RGB: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].gray, &out[i].rgb, 1 ); goto done; + case COLOR_Lab: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].gray, &out[i].Lab, 1 ); goto done; + case COLOR_GRAY: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].gray, &out[i].gray, 1 ); goto done; + case COLOR_CMYK: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].gray, &out[i].cmyk, 1 ); goto done; + case COLOR_XYZ: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].gray, &out[i].XYZ, 1 ); goto done; default: FIXME("unhandled input/output pair: %d/%d\n", input_type, output_type); - return FALSE; - } + ret = FALSE; + break; + } + break; } case COLOR_CMYK: { switch (output_type) { - case COLOR_RGB: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].cmyk, &out[i].rgb, 1 ); return TRUE; - case COLOR_Lab: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].cmyk, &out[i].Lab, 1 ); return TRUE; - case COLOR_GRAY: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].cmyk, &out[i].gray, 1 ); return TRUE; - case COLOR_CMYK: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].cmyk, &out[i].cmyk, 1 ); return TRUE; - case COLOR_XYZ: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].cmyk, &out[i].XYZ, 1 ); return TRUE; + case COLOR_RGB: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].cmyk, &out[i].rgb, 1 ); goto done; + case COLOR_Lab: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].cmyk, &out[i].Lab, 1 ); goto done; + case COLOR_GRAY: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].cmyk, &out[i].gray, 1 ); goto done; + case COLOR_CMYK: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].cmyk, &out[i].cmyk, 1 ); goto done; + case COLOR_XYZ: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].cmyk, &out[i].XYZ, 1 ); goto done; default: FIXME("unhandled input/output pair: %d/%d\n", input_type, output_type); - return FALSE; - } + ret = FALSE; + break; + } + break; } case COLOR_XYZ: { switch (output_type) { - case COLOR_RGB: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].XYZ, &out[i].rgb, 1 ); return TRUE; - case COLOR_Lab: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].XYZ, &out[i].Lab, 1 ); return TRUE; - case COLOR_GRAY: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].XYZ, &out[i].gray, 1 ); return TRUE; - case COLOR_CMYK: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].XYZ, &out[i].cmyk, 1 ); return TRUE; - case COLOR_XYZ: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].XYZ, &out[i].XYZ, 1 ); return TRUE; + case COLOR_RGB: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].XYZ, &out[i].rgb, 1 ); goto done; + case COLOR_Lab: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].XYZ, &out[i].Lab, 1 ); goto done; + case COLOR_GRAY: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].XYZ, &out[i].gray, 1 ); goto done; + case COLOR_CMYK: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].XYZ, &out[i].cmyk, 1 ); goto done; + case COLOR_XYZ: for (i = 0; i < count; i++) cmsDoTransform( xfrm, &in[i].XYZ, &out[i].XYZ, 1 ); goto done; default: FIXME("unhandled input/output pair: %d/%d\n", input_type, output_type); - return FALSE; - } + ret = FALSE; + break; + } + break; } default: FIXME("unhandled input/output pair: %d/%d\n", input_type, output_type); - break; - } + ret = FALSE; + break; + } + +done: release_transform( transform ); - -#endif /* HAVE_LCMS */ return ret; -} + +#else /* HAVE_LCMS */ + return FALSE; +#endif /* HAVE_LCMS */ +} 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] Fri Jan 27 11:01:06 2012 @@ -94,7 +94,7 @@ reactos/dll/win32/msacm32 # Autosync reactos/dll/win32/msadp32.acm # Synced to Wine-1.3.37 reactos/dll/win32/mscat32 # Autosync -reactos/dll/win32/mscms # Autosync +reactos/dll/win32/mscms # Synced to Wine-1.3.37 reactos/dll/win32/mscoree # Autosync reactos/dll/win32/msctf # Autosync reactos/dll/win32/msftedit # Synced to Wine-1.3.37
12 years, 11 months
1
0
0
0
[akhaldi] 55233: [MSFTEDIT] * Sync to Wine 1.3.37.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Jan 27 10:32:23 2012 New Revision: 55233 URL:
http://svn.reactos.org/svn/reactos?rev=55233&view=rev
Log: [MSFTEDIT] * Sync to Wine 1.3.37. Modified: trunk/reactos/dll/win32/msftedit/msftedit.spec trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/msftedit/msftedit.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msftedit/msftedi…
============================================================================== --- trunk/reactos/dll/win32/msftedit/msftedit.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msftedit/msftedit.spec [iso-8859-1] Fri Jan 27 10:32:23 2012 @@ -1,9 +1,9 @@ 2 extern IID_IRichEditOle 3 extern IID_IRichEditOleCallback 4 stdcall CreateTextServices(ptr ptr ptr) riched20.CreateTextServices -5 extern IID_ITextServices -6 extern IID_ITextHost -7 extern IID_ITextHost2 +5 extern IID_ITextServices riched20.IID_ITextServices +6 extern IID_ITextHost riched20.IID_ITextHost +7 extern IID_ITextHost2 riched20.IID_ITextHost2 8 stdcall REExtendedRegisterClass() riched20.REExtendedRegisterClass 9 stdcall RichEdit10ANSIWndProc(ptr long long long) riched20.RichEdit10ANSIWndProc 10 stdcall RichEditANSIWndProc(ptr long long long) riched20.RichEditANSIWndProc 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] Fri Jan 27 10:32:23 2012 @@ -97,7 +97,7 @@ reactos/dll/win32/mscms # Autosync reactos/dll/win32/mscoree # Autosync reactos/dll/win32/msctf # Autosync -reactos/dll/win32/msftedit # Autosync +reactos/dll/win32/msftedit # Synced to Wine-1.3.37 reactos/dll/win32/msg711.acm # Autosync reactos/dll/win32/msgsm32.acm # Autosync reactos/dll/win32/mshtml # Autosync
12 years, 11 months
1
0
0
0
[cgutman] 55232: [USBEHCI] - Fix initialization bugs for EHCI controllers - Try again to release ownership of low-speed devices after reset - Wait for the port reset to complete
by cgutman@svn.reactos.org
Author: cgutman Date: Fri Jan 27 06:27:12 2012 New Revision: 55232 URL:
http://svn.reactos.org/svn/reactos?rev=55232&view=rev
Log: [USBEHCI] - Fix initialization bugs for EHCI controllers - Try again to release ownership of low-speed devices after reset - Wait for the port reset to complete Modified: branches/usb-bringup-trunk/drivers/usb/usbehci_new/hardware.cpp Modified: branches/usb-bringup-trunk/drivers/usb/usbehci_new/hardware.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbehci_new/hardware.cpp [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbehci_new/hardware.cpp [iso-8859-1] Fri Jan 27 06:27:12 2012 @@ -525,39 +525,10 @@ StopController(); // - // Reset the device. Bit is set to 0 on completion. - // - GetCommandRegister(&UsbCmd); - UsbCmd.HCReset = TRUE; - SetCommandRegister(&UsbCmd); - - // - // Check that the controller reset - // - for (FailSafe = 100; FailSafe > 1; FailSafe--) - { - KeStallExecutionProcessor(10); - GetCommandRegister(&UsbCmd); - if (!UsbCmd.HCReset) - { - break; - } - } - - // - // If the controller did not reset then fail - // - if (UsbCmd.HCReset) - { - DPRINT1("EHCI ERROR: Controller failed to reset. Hardware problem!\n"); - return STATUS_UNSUCCESSFUL; - } - - // - // Disable Interrupts and clear status - // - EHCI_WRITE_REGISTER_ULONG(EHCI_USBINTR, 0); - EHCI_WRITE_REGISTER_ULONG(EHCI_USBSTS, 0x0000001f); + // Enable Interrupts and start execution + // + EHCI_WRITE_REGISTER_ULONG(EHCI_USBINTR, EHCI_USBINTR_INTE | EHCI_USBINTR_ERR | EHCI_USBINTR_ASYNC | EHCI_USBINTR_HSERR + /*| EHCI_USBINTR_FLROVR*/ | EHCI_USBINTR_PC); // // Assign the AsyncList Register @@ -574,18 +545,10 @@ // GetCommandRegister(&UsbCmd); UsbCmd.PeriodicEnable = TRUE; - UsbCmd.AsyncEnable = TRUE; //FIXME: Need USB Memory Manager - UsbCmd.IntThreshold = 1; - // FIXME: Set framelistsize when periodic is implemented. SetCommandRegister(&UsbCmd); - // - // Enable Interrupts and start execution - // - EHCI_WRITE_REGISTER_ULONG(EHCI_USBINTR, EHCI_USBINTR_INTE | EHCI_USBINTR_ERR | EHCI_USBINTR_ASYNC | EHCI_USBINTR_HSERR - /*| EHCI_USBINTR_FLROVR*/ | EHCI_USBINTR_PC); - + GetCommandRegister(&UsbCmd); UsbCmd.Run = TRUE; SetCommandRegister(&UsbCmd); @@ -613,6 +576,14 @@ // Set port routing to EHCI controller // EHCI_WRITE_REGISTER_ULONG(EHCI_CONFIGFLAG, 1); + + // + // Enable async + // + GetCommandRegister(&UsbCmd); + UsbCmd.AsyncEnable = TRUE; //FIXME: Need USB Memory Manager + // FIXME: Set framelistsize when periodic is implemented. + SetCommandRegister(&UsbCmd); DPRINT1("EHCI Started!\n"); return STATUS_SUCCESS; @@ -669,6 +640,9 @@ return STATUS_UNSUCCESSFUL; PortStatus = EHCI_READ_REGISTER_ULONG(EHCI_PORTSC + (4 * PortIndex)); + // + // check slow speed line before reset + // if (PortStatus & EHCI_PRT_SLOWSPEEDLINE) { DPRINT1("Non HighSpeed device. Releasing Ownership\n"); @@ -676,6 +650,8 @@ return STATUS_DEVICE_NOT_CONNECTED; } + ASSERT(PortStatus & EHCI_PRT_CONNECTED); + // // Reset and clean enable // @@ -692,17 +668,35 @@ PortStatus &= ~EHCI_PRT_RESET; EHCI_WRITE_REGISTER_ULONG(EHCI_PORTSC + (4 * PortIndex), PortStatus); - KeStallExecutionProcessor(100); - - // - // Check that the port reset - // - PortStatus = EHCI_READ_REGISTER_ULONG(EHCI_PORTSC + (4 * PortIndex)); - if (PortStatus & EHCI_PRT_RESET) - { - DPRINT1("Port did not reset\n"); - return STATUS_RETRY; - } + do + { + // + // wait + // + KeStallExecutionProcessor(100); + + // + // Check that the port reset + // + PortStatus = EHCI_READ_REGISTER_ULONG(EHCI_PORTSC + (4 * PortIndex)); + if (!(PortStatus & EHCI_PRT_RESET)) + break; + } while (TRUE); + + // + // check slow speed line after reset + // + if (PortStatus & EHCI_PRT_SLOWSPEEDLINE) + { + DPRINT1("Non HighSpeed device. Releasing Ownership\n"); + EHCI_WRITE_REGISTER_ULONG(EHCI_PORTSC + (4 * PortIndex), EHCI_PRT_RELEASEOWNERSHIP); + return STATUS_DEVICE_NOT_CONNECTED; + } + + // + // this must be enabled now + // + ASSERT(PortStatus & EHCI_PRT_ENABLED); return STATUS_SUCCESS; } @@ -739,15 +733,17 @@ } } - // Get Speed. If SlowSpeedLine flag is there then its a slow speed device - if (Value & EHCI_PRT_SLOWSPEEDLINE) - Status |= USB_PORT_STATUS_LOW_SPEED; - else - Status |= USB_PORT_STATUS_HIGH_SPEED; - // Get Connected Status if (Value & EHCI_PRT_CONNECTED) + { Status |= USB_PORT_STATUS_CONNECT; + + // Get Speed. If SlowSpeedLine flag is there then its a slow speed device + if (Value & EHCI_PRT_SLOWSPEEDLINE) + Status |= USB_PORT_STATUS_LOW_SPEED; + else + Status |= USB_PORT_STATUS_HIGH_SPEED; + } // Get Enabled Status if (Value & EHCI_PRT_ENABLED) @@ -795,30 +791,17 @@ if (PortId > m_Capabilities.HCSParams.PortCount) return STATUS_UNSUCCESSFUL; - Value = EHCI_READ_REGISTER_ULONG(EHCI_PORTSC + (4 * PortId)); - if (Status == C_PORT_RESET) { - if (Value & EHCI_PRT_RESET) - { - Value &= ~EHCI_PRT_RESET; - EHCI_WRITE_REGISTER_ULONG(EHCI_PORTSC + (4 * PortId), Value); - KeStallExecutionProcessor(100); - } - + // + // update port status + // + m_ResetInProgress[PortId] = FALSE; + } + + if (Status == C_PORT_CONNECTION) + { Value = EHCI_READ_REGISTER_ULONG(EHCI_PORTSC + (4 * PortId)); - // - // update port status - // - m_ResetInProgress[PortId] = FALSE; - if (!(Value & EHCI_PRT_ENABLED)) - { - DPRINT1("Port is not enabled.\n"); - } - } - - if (Status == C_PORT_CONNECTION) - { Value |= EHCI_PRT_CONNECTSTATUSCHANGE | EHCI_PRT_ENABLEDSTATUSCHANGE; EHCI_WRITE_REGISTER_ULONG(EHCI_PORTSC + (4 * PortId), Value); } @@ -851,11 +834,6 @@ if (Feature == PORT_RESET) { - if (Value & EHCI_PRT_SLOWSPEEDLINE) - { - DPRINT1("Non HighSpeed device. Releasing Ownership\n"); - } - ResetPort(PortId); //
12 years, 11 months
1
0
0
0
[cgutman] 55231: [USBOHCI] - Attempt to fix reset race conditions
by cgutman@svn.reactos.org
Author: cgutman Date: Fri Jan 27 05:20:37 2012 New Revision: 55231 URL:
http://svn.reactos.org/svn/reactos?rev=55231&view=rev
Log: [USBOHCI] - Attempt to fix reset race conditions Modified: branches/usb-bringup-trunk/drivers/usb/usbohci/hardware.cpp Modified: branches/usb-bringup-trunk/drivers/usb/usbohci/hardware.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbohci/hardware.cpp [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbohci/hardware.cpp [iso-8859-1] Fri Jan 27 05:20:37 2012 @@ -1172,6 +1172,119 @@ if (Status == C_PORT_RESET) { + // + // sanity checks + // + ASSERT((Value & OHCI_RH_PORTSTATUS_PRSC)); + + // + // clear reset bit complete + // + WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_RH_PORT_STATUS(PortId)), OHCI_RH_PORTSTATUS_PRSC); + + // + // sanity check + // + ASSERT((Value & OHCI_RH_PORTSTATUS_PES)); + } + + if (Status == C_PORT_CONNECTION || Status == C_PORT_ENABLE) + { + // + // clear bits + // + WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_RH_PORT_STATUS(PortId)), OHCI_RH_PORTSTATUS_CSC | OHCI_RH_PORTSTATUS_PESC); + } + + // + // re-enable root hub change + // + WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_INTERRUPT_ENABLE_OFFSET), OHCI_ROOT_HUB_STATUS_CHANGE); + + return STATUS_SUCCESS; +} + + +NTSTATUS +CUSBHardwareDevice::SetPortFeature( + ULONG PortId, + ULONG Feature) +{ + ULONG Value; + + DPRINT1("CUSBHardwareDevice::SetPortFeature PortId %x Feature %x\n", PortId, Feature); + + // + // read port status + // + Value = READ_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_RH_PORT_STATUS(PortId))); + + + if (Feature == PORT_ENABLE) + { + // + // enable port + // + WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_RH_PORT_STATUS(PortId)), OHCI_RH_PORTSTATUS_PES); + return STATUS_SUCCESS; + } + else if (Feature == PORT_POWER) + { + LARGE_INTEGER Timeout; + + // + // enable power + // + WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_RH_PORT_STATUS(PortId)), OHCI_RH_PORTSTATUS_PPS); + + // + // read descriptor A for the delay data + // + Value = READ_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_RH_DESCRIPTOR_A_OFFSET)); + + // + // compute the delay + // + Timeout.QuadPart = OHCI_RH_GET_POWER_ON_TO_POWER_GOOD_TIME(Value); + + // + // delay is multiplied by 2 ms + // + Timeout.QuadPart *= 2; + DPRINT1("Waiting %d milliseconds for port power up\n", Timeout.LowPart); + + // + // convert to 100 ns units (absolute) + // + Timeout.QuadPart *= -10000; + + // + // perform the wait + // + KeDelayExecutionThread(KernelMode, FALSE, &Timeout); + + return STATUS_SUCCESS; + } + else if (Feature == PORT_SUSPEND) + { + // + // enable port + // + WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_RH_PORT_STATUS(PortId)), OHCI_RH_PORTSTATUS_PSS); + return STATUS_SUCCESS; + } + else if (Feature == PORT_RESET) + { + // + // assert + // + ASSERT((Value & OHCI_RH_PORTSTATUS_CCS)); + + // + // reset port + // + WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_RH_PORT_STATUS(PortId)), OHCI_RH_PORTSTATUS_PRS); + do { // @@ -1191,151 +1304,14 @@ // wait a bit // KeStallExecutionProcessor(100); - - //DPRINT1("Value %x Index %lu\n", Value, Index); - }while(TRUE); // - // check if reset bit is still set - // - if (Value & OHCI_RH_PORTSTATUS_PRS) - { - // - // reset failed - // - DPRINT1("PortId %lu Reset failed\n", PortId); - return STATUS_UNSUCCESSFUL; - } - - // - // sanity checks - // - ASSERT((Value & OHCI_RH_PORTSTATUS_PRSC)); - - // - // clear reset bit complete - // - WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_RH_PORT_STATUS(PortId)), OHCI_RH_PORTSTATUS_PRSC); - - // - // sanity check - // - ASSERT((Value & OHCI_RH_PORTSTATUS_PES)); - } - - if (Status == C_PORT_CONNECTION || Status == C_PORT_ENABLE) - { - // - // clear bits - // - WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_RH_PORT_STATUS(PortId)), OHCI_RH_PORTSTATUS_CSC | OHCI_RH_PORTSTATUS_PESC); - } - - // - // re-enable root hub change - // - WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_INTERRUPT_ENABLE_OFFSET), OHCI_ROOT_HUB_STATUS_CHANGE); - - return STATUS_SUCCESS; -} - - -NTSTATUS -CUSBHardwareDevice::SetPortFeature( - ULONG PortId, - ULONG Feature) -{ - ULONG Value; - - DPRINT1("CUSBHardwareDevice::SetPortFeature PortId %x Feature %x\n", PortId, Feature); - - // - // read port status - // - Value = READ_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_RH_PORT_STATUS(PortId))); - - - if (Feature == PORT_ENABLE) - { - // - // enable port - // - WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_RH_PORT_STATUS(PortId)), OHCI_RH_PORTSTATUS_PES); + // trigger the status change interrupt + // + WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_INTERRUPT_ENABLE_OFFSET), OHCI_ROOT_HUB_STATUS_CHANGE); + return STATUS_SUCCESS; - } - else if (Feature == PORT_POWER) - { - LARGE_INTEGER Timeout; - - // - // enable power - // - WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_RH_PORT_STATUS(PortId)), OHCI_RH_PORTSTATUS_PPS); - - // - // read descriptor A for the delay data - // - Value = READ_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_RH_DESCRIPTOR_A_OFFSET)); - - // - // compute the delay - // - Timeout.QuadPart = OHCI_RH_GET_POWER_ON_TO_POWER_GOOD_TIME(Value); - - // - // delay is multiplied by 2 ms - // - Timeout.QuadPart *= 2; - DPRINT1("Waiting %d milliseconds for port power up\n", Timeout.LowPart); - - // - // convert to 100 ns units (absolute) - // - Timeout.QuadPart *= -10000; - - // - // perform the wait - // - KeDelayExecutionThread(KernelMode, FALSE, &Timeout); - - return STATUS_SUCCESS; - } - else if (Feature == PORT_SUSPEND) - { - // - // enable port - // - WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_RH_PORT_STATUS(PortId)), OHCI_RH_PORTSTATUS_PSS); - return STATUS_SUCCESS; - } - else if (Feature == PORT_RESET) - { - // - // assert - // - ASSERT((Value & OHCI_RH_PORTSTATUS_CCS)); - - // - // reset port - // - WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_RH_PORT_STATUS(PortId)), OHCI_RH_PORTSTATUS_PRS); - - // - // wait - // - KeStallExecutionProcessor(100); - - // - // is there a status change callback - // - if (m_SCECallBack != NULL) - { - // - // issue callback - // - m_SCECallBack(m_SCEContext); - } } return STATUS_SUCCESS; }
12 years, 11 months
1
0
0
0
[janderwald] 55230: [USBOHCI] - Revert previous revision
by janderwald@svn.reactos.org
Author: janderwald Date: Fri Jan 27 02:12:32 2012 New Revision: 55230 URL:
http://svn.reactos.org/svn/reactos?rev=55230&view=rev
Log: [USBOHCI] - Revert previous revision Modified: branches/usb-bringup-trunk/drivers/usb/usbohci/usb_device.cpp Modified: branches/usb-bringup-trunk/drivers/usb/usbohci/usb_device.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbohci/usb_device.cpp [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbohci/usb_device.cpp [iso-8859-1] Fri Jan 27 02:12:32 2012 @@ -315,7 +315,6 @@ // // initialize request // - CtrlSetup->bmRequestType.B = 0xB; CtrlSetup->bRequest = USB_REQUEST_SET_ADDRESS; CtrlSetup->wValue.W = (USHORT)DeviceAddress;
12 years, 11 months
1
0
0
0
[janderwald] 55229: [USBOHCI] - Fix setting device address
by janderwald@svn.reactos.org
Author: janderwald Date: Fri Jan 27 02:09:18 2012 New Revision: 55229 URL:
http://svn.reactos.org/svn/reactos?rev=55229&view=rev
Log: [USBOHCI] - Fix setting device address Modified: branches/usb-bringup-trunk/drivers/usb/usbohci/usb_device.cpp Modified: branches/usb-bringup-trunk/drivers/usb/usbohci/usb_device.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbohci/usb_device.cpp [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbohci/usb_device.cpp [iso-8859-1] Fri Jan 27 02:09:18 2012 @@ -315,6 +315,7 @@ // // initialize request // + CtrlSetup->bmRequestType.B = 0xB; CtrlSetup->bRequest = USB_REQUEST_SET_ADDRESS; CtrlSetup->wValue.W = (USHORT)DeviceAddress;
12 years, 11 months
1
0
0
0
[cgutman] 55228: [USBHUB_NEW] - Fix buffer overflow for composite devices
by cgutman@svn.reactos.org
Author: cgutman Date: Fri Jan 27 02:02:11 2012 New Revision: 55228 URL:
http://svn.reactos.org/svn/reactos?rev=55228&view=rev
Log: [USBHUB_NEW] - Fix buffer overflow for composite devices Modified: branches/usb-bringup-trunk/drivers/usb/usbhub_new/fdo.c Modified: branches/usb-bringup-trunk/drivers/usb/usbhub_new/fdo.c URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbhub_new/fdo.c [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbhub_new/fdo.c [iso-8859-1] Fri Jan 27 02:02:11 2012 @@ -868,7 +868,7 @@ // // Initialize the CompatibleIds String // - UsbChildExtension->usCompatibleIds.Length = 144; //FIXME + UsbChildExtension->usCompatibleIds.Length = 188; //FIXME UsbChildExtension->usCompatibleIds.MaximumLength = UsbChildExtension->usCompatibleIds.Length; //
12 years, 11 months
1
0
0
0
← Newer
1
...
10
11
12
13
14
15
16
...
56
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Results per page:
10
25
50
100
200