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
April 2014
----- 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
15 participants
492 discussions
Start a n
N
ew thread
[akhaldi] 62938: [OLE32] * Sync with Wine 1.7.17. CORE-8080
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Apr 24 12:14:13 2014 New Revision: 62938 URL:
http://svn.reactos.org/svn/reactos?rev=62938&view=rev
Log: [OLE32] * Sync with Wine 1.7.17. CORE-8080 Modified: trunk/reactos/dll/win32/ole32/antimoniker.c trunk/reactos/dll/win32/ole32/bindctx.c trunk/reactos/dll/win32/ole32/classmoniker.c trunk/reactos/dll/win32/ole32/comcat.c trunk/reactos/dll/win32/ole32/compobj.c trunk/reactos/dll/win32/ole32/compobj_private.h trunk/reactos/dll/win32/ole32/compositemoniker.c trunk/reactos/dll/win32/ole32/dcom.idl trunk/reactos/dll/win32/ole32/filemoniker.c trunk/reactos/dll/win32/ole32/ifs.c trunk/reactos/dll/win32/ole32/irot.idl trunk/reactos/dll/win32/ole32/itemmoniker.c trunk/reactos/dll/win32/ole32/marshal.c trunk/reactos/dll/win32/ole32/moniker.c trunk/reactos/dll/win32/ole32/ole2.c trunk/reactos/dll/win32/ole32/ole32.spec trunk/reactos/dll/win32/ole32/ole32_objidl.idl trunk/reactos/dll/win32/ole32/ole32_oleidl.idl trunk/reactos/dll/win32/ole32/ole32_unknwn.idl trunk/reactos/dll/win32/ole32/stg_prop.c trunk/reactos/dll/win32/ole32/storage32.c trunk/reactos/dll/win32/ole32/storage32.h trunk/reactos/dll/win32/ole32/stubmanager.c trunk/reactos/include/psdk/objbase.h trunk/reactos/media/doc/README.WINE [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/dll/win32/ole32/antimoniker.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/antimonike…
Modified: trunk/reactos/dll/win32/ole32/bindctx.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/bindctx.c?…
Modified: trunk/reactos/dll/win32/ole32/classmoniker.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/classmonik…
Modified: trunk/reactos/dll/win32/ole32/comcat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/comcat.c?r…
Modified: trunk/reactos/dll/win32/ole32/compobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/compobj.c?…
Modified: trunk/reactos/dll/win32/ole32/compobj_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/compobj_pr…
Modified: trunk/reactos/dll/win32/ole32/compositemoniker.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/compositem…
Modified: trunk/reactos/dll/win32/ole32/dcom.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/dcom.idl?r…
Modified: trunk/reactos/dll/win32/ole32/filemoniker.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/filemonike…
Modified: trunk/reactos/dll/win32/ole32/ifs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ifs.c?rev=…
Modified: trunk/reactos/dll/win32/ole32/irot.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/irot.idl?r…
Modified: trunk/reactos/dll/win32/ole32/itemmoniker.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/itemmonike…
Modified: trunk/reactos/dll/win32/ole32/marshal.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/marshal.c?…
Modified: trunk/reactos/dll/win32/ole32/moniker.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/moniker.c?…
Modified: trunk/reactos/dll/win32/ole32/ole2.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ole2.c?rev…
Modified: trunk/reactos/dll/win32/ole32/ole32.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ole32.spec…
Modified: trunk/reactos/dll/win32/ole32/ole32_objidl.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ole32_obji…
Modified: trunk/reactos/dll/win32/ole32/ole32_oleidl.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ole32_olei…
Modified: trunk/reactos/dll/win32/ole32/ole32_unknwn.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/ole32_unkn…
Modified: trunk/reactos/dll/win32/ole32/stg_prop.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/stg_prop.c…
Modified: trunk/reactos/dll/win32/ole32/storage32.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/storage32.…
Modified: trunk/reactos/dll/win32/ole32/storage32.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/storage32.…
Modified: trunk/reactos/dll/win32/ole32/stubmanager.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ole32/stubmanage…
Modified: trunk/reactos/include/psdk/objbase.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/objbase.h?rev…
Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
10 years, 8 months
1
0
0
0
[akhaldi] 62937: [WINDOWSCODECS_WINETEST] * Sync with Wine 1.7.17. CORE-8080
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Apr 24 12:13:18 2014 New Revision: 62937 URL:
http://svn.reactos.org/svn/reactos?rev=62937&view=rev
Log: [WINDOWSCODECS_WINETEST] * Sync with Wine 1.7.17. CORE-8080 Modified: trunk/rostests/winetests/windowscodecs/CMakeLists.txt trunk/rostests/winetests/windowscodecs/bitmap.c trunk/rostests/winetests/windowscodecs/converter.c trunk/rostests/winetests/windowscodecs/gifformat.c trunk/rostests/winetests/windowscodecs/info.c trunk/rostests/winetests/windowscodecs/metadata.c trunk/rostests/winetests/windowscodecs/pngformat.c trunk/rostests/winetests/windowscodecs/testlist.c trunk/rostests/winetests/windowscodecs/tiffformat.c Modified: trunk/rostests/winetests/windowscodecs/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/windowscodecs/C…
============================================================================== --- trunk/rostests/winetests/windowscodecs/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/winetests/windowscodecs/CMakeLists.txt [iso-8859-1] Thu Apr 24 12:13:18 2014 @@ -18,5 +18,8 @@ add_executable(windowscodecs_winetest ${SOURCE}) set_module_type(windowscodecs_winetest win32cui) -add_importlibs(windowscodecs_winetest windowscodecs oleaut32 ole32 user32 gdi32 msvcrt kernel32 ntdll) +add_importlibs(windowscodecs_winetest windowscodecs oleaut32 ole32 user32 gdi32 msvcrt kernel32) +if(MSVC) + add_importlibs(windowscodecs_winetest ntdll) +endif() add_cd_file(TARGET windowscodecs_winetest DESTINATION reactos/bin FOR all) Modified: trunk/rostests/winetests/windowscodecs/bitmap.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/windowscodecs/b…
============================================================================== --- trunk/rostests/winetests/windowscodecs/bitmap.c [iso-8859-1] (original) +++ trunk/rostests/winetests/windowscodecs/bitmap.c [iso-8859-1] Thu Apr 24 12:13:18 2014 @@ -38,18 +38,6 @@ static IWICImagingFactory *factory; -static const char *debugstr_guid(const GUID *guid) -{ - static char buf[50]; - - if (!guid) return "(null)"; - sprintf(buf, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", - guid->Data1, guid->Data2, guid->Data3, guid->Data4[0], - guid->Data4[1], guid->Data4[2], guid->Data4[3], guid->Data4[4], - guid->Data4[5], guid->Data4[6], guid->Data4[7]); - return buf; -} - static HRESULT WINAPI bitmapsource_QueryInterface(IWICBitmapSource *iface, REFIID iid, void **ppv) { if (IsEqualIID(&IID_IUnknown, iid) || @@ -158,7 +146,7 @@ hdib = CreateDIBSection(0, bmi, DIB_RGB_COLORS, &bits, NULL, 0); ok(hdib != 0, "CreateDIBSection(%dx%d,%d bpp) failed\n", width, height, bpp); - GetObject(hdib, sizeof(bm), &bm); + GetObjectW(hdib, sizeof(bm), &bm); ok(bm.bmWidth == width, "expected %d, got %d\n", width, bm.bmWidth); ok(bm.bmHeight == height, "expected %d, got %d\n", height, bm.bmHeight); ok(bm.bmPlanes == 1, "expected 1, got %d\n", bm.bmPlanes); @@ -671,7 +659,7 @@ IWICBitmap_GetPixelFormat(bitmap, &format); ok(IsEqualGUID(&format, &GUID_WICPixelFormat32bppBGRA), - "unexpected pixel format %s\n", debugstr_guid(&format)); + "unexpected pixel format %s\n", wine_dbgstr_guid(&format)); IWICBitmap_GetSize(bitmap, &width, &height); ok(hr == S_OK, "IWICBitmap_GetSize error %#x\n", hr); @@ -699,7 +687,7 @@ IWICBitmap_GetPixelFormat(bitmap, &format); ok(IsEqualGUID(&format, &GUID_WICPixelFormat32bppBGRA), - "unexpected pixel format %s\n", debugstr_guid(&format)); + "unexpected pixel format %s\n", wine_dbgstr_guid(&format)); IWICBitmap_GetSize(bitmap, &width, &height); ok(hr == S_OK, "IWICBitmap_GetSize error %#x\n", hr); @@ -733,21 +721,17 @@ ok(hbmp != 0, "failed to create bitmap\n"); hr = IWICImagingFactory_CreateBitmapFromHBITMAP(factory, 0, 0, WICBitmapIgnoreAlpha, &bitmap); -todo_wine ok(hr == WINCODEC_ERR_WIN32ERROR || hr == 0x88980003 /*XP*/, "expected WINCODEC_ERR_WIN32ERROR, got %#x\n", hr); hr = IWICImagingFactory_CreateBitmapFromHBITMAP(factory, hbmp, 0, WICBitmapIgnoreAlpha, NULL); -todo_wine ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr); hr = IWICImagingFactory_CreateBitmapFromHBITMAP(factory, hbmp, 0, WICBitmapIgnoreAlpha, &bitmap); -todo_wine ok(hr == S_OK, "CreateBitmapFromHBITMAP error %#x\n", hr); - if (hr != S_OK) return; IWICBitmap_GetPixelFormat(bitmap, &format); ok(IsEqualGUID(&format, &GUID_WICPixelFormat8bppIndexed), - "unexpected pixel format %s\n", debugstr_guid(&format)); + "unexpected pixel format %s\n", wine_dbgstr_guid(&format)); hr = IWICBitmap_GetSize(bitmap, &width, &height); ok(hr == S_OK, "IWICBitmap_GetSize error %#x\n", hr); @@ -776,8 +760,9 @@ ok(hr == S_OK, "CreateBitmapFromHBITMAP error %#x\n", hr); IWICBitmap_GetPixelFormat(bitmap, &format); +todo_wine ok(IsEqualGUID(&format, &GUID_WICPixelFormat4bppIndexed), - "unexpected pixel format %s\n", debugstr_guid(&format)); + "unexpected pixel format %s\n", wine_dbgstr_guid(&format)); hr = IWICBitmap_GetSize(bitmap, &width, &height); ok(hr == S_OK, "IWICBitmap_GetSize error %#x\n", hr); @@ -795,6 +780,7 @@ hr = IWICPalette_GetColorCount(palette, &count); ok(hr == S_OK, "GetColorCount error %#x\n", hr); +todo_wine ok(count == 16, "expected 16, got %u\n", count); IWICPalette_Release(palette); @@ -817,7 +803,7 @@ IWICBitmap_GetPixelFormat(bitmap, &format); ok(IsEqualGUID(&format, &GUID_WICPixelFormat8bppIndexed), - "unexpected pixel format %s\n", debugstr_guid(&format)); + "unexpected pixel format %s\n", wine_dbgstr_guid(&format)); hr = IWICBitmap_GetSize(bitmap, &width, &height); ok(hr == S_OK, "IWICBitmap_GetSize error %#x\n", hr); @@ -843,11 +829,52 @@ hr = IWICBitmap_CopyPixels(bitmap, NULL, 4, sizeof(data), data); ok(hr == S_OK, "IWICBitmap_CopyPixels error %#x\n", hr); for (i = 0; i < sizeof(data); i++) - ok(data[i] == data_8bpp_pal_wic[i], "%u: expected %#x, got %#x\n", i, data_8bpp_pal_wic[i], data[i]); + { + if (data[i] != data_8bpp_pal_wic[i]) +todo_wine + ok(data[i] == data_8bpp_pal_wic[i], "%u: expected %#x, got %#x\n", i, data_8bpp_pal_wic[i], data[i]); + else + ok(data[i] == data_8bpp_pal_wic[i], "%u: expected %#x, got %#x\n", i, data_8bpp_pal_wic[i], data[i]); + } IWICBitmap_Release(bitmap); DeleteObject(hbmp); DeleteObject(hpal); + + /* 32bpp alpha */ + hbmp = create_dib(2, 2, 32, NULL, NULL); + hr = IWICImagingFactory_CreateBitmapFromHBITMAP(factory, hbmp, NULL, WICBitmapUseAlpha, &bitmap); + ok(hr == S_OK, "CreateBitmapFromHBITMAP error %#x\n", hr); + + hr = IWICBitmap_GetPixelFormat(bitmap, &format); + ok(hr == S_OK, "GetPixelFormat error %#x\n", hr); + ok(IsEqualGUID(&format, &GUID_WICPixelFormat32bppBGRA), + "unexpected pixel format %s\n", wine_dbgstr_guid(&format)); + + IWICBitmap_Release(bitmap); + + /* 32bpp pre-multiplied alpha */ + hr = IWICImagingFactory_CreateBitmapFromHBITMAP(factory, hbmp, NULL, WICBitmapUsePremultipliedAlpha, &bitmap); + ok(hr == S_OK, "CreateBitmapFromHBITMAP error %#x\n", hr); + + hr = IWICBitmap_GetPixelFormat(bitmap, &format); + ok(hr == S_OK, "GetPixelFormat error %#x\n", hr); + ok(IsEqualGUID(&format, &GUID_WICPixelFormat32bppPBGRA), + "unexpected pixel format %s\n", wine_dbgstr_guid(&format)); + + IWICBitmap_Release(bitmap); + + /* 32bpp no alpha */ + hr = IWICImagingFactory_CreateBitmapFromHBITMAP(factory, hbmp, NULL, WICBitmapIgnoreAlpha, &bitmap); + ok(hr == S_OK, "CreateBitmapFromHBITMAP error %#x\n", hr); + + hr = IWICBitmap_GetPixelFormat(bitmap, &format); + ok(hr == S_OK, "GetPixelFormat error %#x\n", hr); + ok(IsEqualGUID(&format, &GUID_WICPixelFormat32bppBGR), + "unexpected pixel format %s\n", wine_dbgstr_guid(&format)); + + IWICBitmap_Release(bitmap); + DeleteObject(hbmp); } static void test_clipper(void) Modified: trunk/rostests/winetests/windowscodecs/converter.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/windowscodecs/c…
============================================================================== --- trunk/rostests/winetests/windowscodecs/converter.c [iso-8859-1] (original) +++ trunk/rostests/winetests/windowscodecs/converter.c [iso-8859-1] Thu Apr 24 12:13:18 2014 @@ -343,7 +343,7 @@ { BitmapTestSrc *src_obj; IWICFormatConverter *converter; - BOOL can_convert=1; + BOOL can_convert = TRUE; HRESULT hr; CreateTestBitmap(&testdata_32bppBGRA, &src_obj); @@ -652,18 +652,18 @@ { CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - test_conversion(&testdata_32bppBGRA, &testdata_32bppBGR, "BGRA -> BGR", 0); - test_conversion(&testdata_32bppBGR, &testdata_32bppBGRA, "BGR -> BGRA", 0); - test_conversion(&testdata_32bppBGRA, &testdata_32bppBGRA, "BGRA -> BGRA", 0); - - test_conversion(&testdata_24bppBGR, &testdata_24bppBGR, "24bppBGR -> 24bppBGR", 0); - test_conversion(&testdata_24bppBGR, &testdata_24bppRGB, "24bppBGR -> 24bppRGB", 0); - - test_conversion(&testdata_24bppRGB, &testdata_24bppRGB, "24bppRGB -> 24bppRGB", 0); - test_conversion(&testdata_24bppRGB, &testdata_24bppBGR, "24bppRGB -> 24bppBGR", 0); - - test_conversion(&testdata_32bppBGR, &testdata_24bppRGB, "32bppBGR -> 24bppRGB", 0); - test_conversion(&testdata_24bppRGB, &testdata_32bppBGR, "24bppRGB -> 32bppBGR", 0); + test_conversion(&testdata_32bppBGRA, &testdata_32bppBGR, "BGRA -> BGR", FALSE); + test_conversion(&testdata_32bppBGR, &testdata_32bppBGRA, "BGR -> BGRA", FALSE); + test_conversion(&testdata_32bppBGRA, &testdata_32bppBGRA, "BGRA -> BGRA", FALSE); + + test_conversion(&testdata_24bppBGR, &testdata_24bppBGR, "24bppBGR -> 24bppBGR", FALSE); + test_conversion(&testdata_24bppBGR, &testdata_24bppRGB, "24bppBGR -> 24bppRGB", FALSE); + + test_conversion(&testdata_24bppRGB, &testdata_24bppRGB, "24bppRGB -> 24bppRGB", FALSE); + test_conversion(&testdata_24bppRGB, &testdata_24bppBGR, "24bppRGB -> 24bppBGR", FALSE); + + test_conversion(&testdata_32bppBGR, &testdata_24bppRGB, "32bppBGR -> 24bppRGB", FALSE); + test_conversion(&testdata_24bppRGB, &testdata_32bppBGR, "24bppRGB -> 32bppBGR", FALSE); test_invalid_conversion(); test_default_converter(); Modified: trunk/rostests/winetests/windowscodecs/gifformat.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/windowscodecs/g…
============================================================================== --- trunk/rostests/winetests/windowscodecs/gifformat.c [iso-8859-1] (original) +++ trunk/rostests/winetests/windowscodecs/gifformat.c [iso-8859-1] Thu Apr 24 12:13:18 2014 @@ -63,18 +63,6 @@ static IWICImagingFactory *factory; -static const char *debugstr_guid(const GUID *guid) -{ - static char buf[50]; - - if (!guid) return "(null)"; - sprintf(buf, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", - guid->Data1, guid->Data2, guid->Data3, guid->Data4[0], - guid->Data4[1], guid->Data4[2], guid->Data4[3], guid->Data4[4], - guid->Data4[5], guid->Data4[6], guid->Data4[7]); - return buf; -} - static IWICBitmapDecoder *create_decoder(const void *image_data, UINT image_size) { HGLOBAL hmem; @@ -98,7 +86,7 @@ hr = IWICBitmapDecoder_GetContainerFormat(decoder, &format); ok(hr == S_OK, "GetContainerFormat error %#x\n", hr); ok(IsEqualGUID(&format, &GUID_ContainerFormatGif), - "wrong container format %s\n", debugstr_guid(&format)); + "wrong container format %s\n", wine_dbgstr_guid(&format)); IStream_Release(stream); @@ -144,7 +132,7 @@ hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &format); ok(hr == S_OK, "GetPixelFormat error %#x\n", hr); ok(IsEqualGUID(&format, &GUID_WICPixelFormat8bppIndexed), - "wrong pixel format %s\n", debugstr_guid(&format)); + "wrong pixel format %s\n", wine_dbgstr_guid(&format)); hr = IWICBitmapFrameDecode_CopyPalette(frame, palette); ok(hr == S_OK, "CopyPalette error %#x\n", hr); @@ -206,7 +194,7 @@ hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &format); ok(hr == S_OK, "GetPixelFormat error %#x\n", hr); ok(IsEqualGUID(&format, &GUID_WICPixelFormat8bppIndexed), - "wrong pixel format %s\n", debugstr_guid(&format)); + "wrong pixel format %s\n", wine_dbgstr_guid(&format)); hr = IWICBitmapFrameDecode_CopyPalette(frame, palette); ok(hr == S_OK, "CopyPalette error %#x\n", hr); @@ -249,7 +237,7 @@ hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &format); ok(hr == S_OK, "GetPixelFormat error %#x\n", hr); ok(IsEqualGUID(&format, &GUID_WICPixelFormat8bppIndexed), - "wrong pixel format %s\n", debugstr_guid(&format)); + "wrong pixel format %s\n", wine_dbgstr_guid(&format)); hr = IWICBitmapFrameDecode_CopyPalette(frame, palette); ok(hr == S_OK, "CopyPalette error %#x\n", hr); @@ -319,7 +307,7 @@ hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &format); ok(hr == S_OK, "GetPixelFormat error %#x\n", hr); ok(IsEqualGUID(&format, &GUID_WICPixelFormat8bppIndexed), - "wrong pixel format %s\n", debugstr_guid(&format)); + "wrong pixel format %s\n", wine_dbgstr_guid(&format)); hr = IWICBitmapFrameDecode_CopyPalette(frame, palette); ok(hr == S_OK, "CopyPalette error %#x\n", hr); Modified: trunk/rostests/winetests/windowscodecs/info.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/windowscodecs/i…
============================================================================== --- trunk/rostests/winetests/windowscodecs/info.c [iso-8859-1] (original) +++ trunk/rostests/winetests/windowscodecs/info.c [iso-8859-1] Thu Apr 24 12:13:18 2014 @@ -36,21 +36,6 @@ #include <initguid.h> DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); -static const char *debugstr_guid(GUID *guid) -{ - static char buf[50]; - - if(!guid) - return "(null)"; - - sprintf(buf, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", - guid->Data1, guid->Data2, guid->Data3, guid->Data4[0], - guid->Data4[1], guid->Data4[2], guid->Data4[3], guid->Data4[4], - guid->Data4[5], guid->Data4[6], guid->Data4[7]); - - return buf; -} - static HRESULT get_component_info(const GUID *clsid, IWICComponentInfo **result) { IWICImagingFactory *factory; @@ -68,7 +53,7 @@ return hr; } -static int is_pixelformat(GUID *format) +static BOOL is_pixelformat(GUID *format) { IWICComponentInfo *info; HRESULT hr; @@ -275,7 +260,7 @@ memset(&guid, 0xaa, sizeof(guid)); hr = IWICComponentInfo_GetCLSID(info, &guid); ok(hr == S_OK, "GetCLSID failed, hr=%x\n", hr); - ok(IsEqualGUID(&guid, &GUID_WICPixelFormat32bppBGRA), "unexpected CLSID %s\n", debugstr_guid(&guid)); + ok(IsEqualGUID(&guid, &GUID_WICPixelFormat32bppBGRA), "unexpected CLSID %s\n", wine_dbgstr_guid(&guid)); hr = IWICComponentInfo_GetComponentType(info, NULL); ok(hr == E_INVALIDARG, "GetComponentType failed, hr=%x\n", hr); @@ -305,7 +290,7 @@ hr = IWICComponentInfo_GetVendorGUID(info, &guid); ok(hr == S_OK, "GetVendorGUID failed, hr=%x\n", hr); ok(IsEqualGUID(&guid, &GUID_VendorMicrosoft) || - broken(IsEqualGUID(&guid, &GUID_NULL)) /* XP */, "unexpected GUID %s\n", debugstr_guid(&guid)); + broken(IsEqualGUID(&guid, &GUID_NULL)) /* XP */, "unexpected GUID %s\n", wine_dbgstr_guid(&guid)); len = 0xdeadbeef; hr = IWICComponentInfo_GetVersion(info, 0, NULL, &len); @@ -364,7 +349,7 @@ memset(&guid, 0xaa, sizeof(guid)); hr = IWICPixelFormatInfo_GetFormatGUID(pixelformat_info, &guid); ok(hr == S_OK, "GetFormatGUID failed, hr=%x\n", hr); - ok(IsEqualGUID(&guid, &GUID_WICPixelFormat32bppBGRA), "unexpected GUID %s\n", debugstr_guid(&guid)); + ok(IsEqualGUID(&guid, &GUID_WICPixelFormat32bppBGRA), "unexpected GUID %s\n", wine_dbgstr_guid(&guid)); IWICPixelFormatInfo_Release(pixelformat_info); } Modified: trunk/rostests/winetests/windowscodecs/metadata.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/windowscodecs/m…
============================================================================== --- trunk/rostests/winetests/windowscodecs/metadata.c [iso-8859-1] (original) +++ trunk/rostests/winetests/windowscodecs/metadata.c [iso-8859-1] Thu Apr 24 12:13:18 2014 @@ -182,21 +182,6 @@ 0x21,0x01,0x0C,'p','l','a','i','n','t','e','x','t',' ','#','2',0x00,0x3B }; -static const char *debugstr_guid(REFIID riid) -{ - static char buf[50]; - - if(!riid) - return "(null)"; - - sprintf(buf, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", - riid->Data1, riid->Data2, riid->Data3, riid->Data4[0], - riid->Data4[1], riid->Data4[2], riid->Data4[3], riid->Data4[4], - riid->Data4[5], riid->Data4[6], riid->Data4[7]); - - return buf; -} - static IStream *create_stream(const char *data, int data_size) { HRESULT hr; @@ -372,7 +357,7 @@ hr = IWICMetadataReader_GetMetadataFormat(reader, &format); ok(hr == S_OK, "GetMetadataFormat failed, hr=%x\n", hr); - ok(IsEqualGUID(&format, &GUID_MetadataFormatChunktEXt), "unexpected format %s\n", debugstr_guid(&format)); + ok(IsEqualGUID(&format, &GUID_MetadataFormatChunktEXt), "unexpected format %s\n", wine_dbgstr_guid(&format)); hr = IWICMetadataReader_GetMetadataFormat(reader, NULL); ok(hr == E_INVALIDARG, "GetMetadataFormat failed, hr=%x\n", hr); @@ -731,7 +716,7 @@ hr = IWICMetadataReader_GetMetadataFormat(reader, &format); ok(hr == S_OK, "GetMetadataFormat error %#x\n", hr); - ok(IsEqualGUID(&format, &GUID_MetadataFormatIfd), "unexpected format %s\n", debugstr_guid(&format)); + ok(IsEqualGUID(&format, &GUID_MetadataFormatIfd), "unexpected format %s\n", wine_dbgstr_guid(&format)); hr = IWICMetadataReader_GetMetadataFormat(reader, NULL); ok(hr == E_INVALIDARG, "GetMetadataFormat should fail\n"); @@ -875,7 +860,7 @@ hr = IWICMetadataReader_GetMetadataFormat(reader, &format); ok(hr == S_OK, "GetMetadataFormat failed, hr=%x\n", hr); - ok(IsEqualGUID(&format, &GUID_MetadataFormatChunktEXt), "unexpected format %s\n", debugstr_guid(&format)); + ok(IsEqualGUID(&format, &GUID_MetadataFormatChunktEXt), "unexpected format %s\n", wine_dbgstr_guid(&format)); IWICMetadataReader_Release(reader); } @@ -893,7 +878,7 @@ hr = IWICMetadataReader_GetMetadataFormat(reader, &format); ok(hr == S_OK, "GetMetadataFormat failed, hr=%x\n", hr); - ok(IsEqualGUID(&format, &GUID_MetadataFormatUnknown), "unexpected format %s\n", debugstr_guid(&format)); + ok(IsEqualGUID(&format, &GUID_MetadataFormatUnknown), "unexpected format %s\n", wine_dbgstr_guid(&format)); IWICMetadataReader_Release(reader); } @@ -1104,7 +1089,7 @@ hr = IWICMetadataBlockReader_GetContainerFormat(blockreader, &format); ok(hr == S_OK, "GetContainerFormat error %#x\n", hr); ok(IsEqualGUID(&format, &GUID_ContainerFormatGif), - "wrong container format %s\n", debugstr_guid(&format)); + "wrong container format %s\n", wine_dbgstr_guid(&format)); hr = IWICMetadataBlockReader_GetCount(blockreader, &count); ok(hr == S_OK, "GetCount error %#x\n", hr); @@ -1117,7 +1102,7 @@ { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); ok(IsEqualGUID(&format, &GUID_MetadataFormatLSD), /* Logical Screen Descriptor */ - "wrong metadata format %s\n", debugstr_guid(&format)); + "wrong metadata format %s\n", wine_dbgstr_guid(&format)); hr = IWICMetadataReader_GetCount(reader, &count); ok(hr == S_OK, "GetCount error %#x\n", hr); @@ -1149,7 +1134,7 @@ hr = IWICMetadataBlockReader_GetContainerFormat(blockreader, &format); ok(hr == S_OK, "GetContainerFormat error %#x\n", hr); ok(IsEqualGUID(&format, &GUID_ContainerFormatGif), - "wrong container format %s\n", debugstr_guid(&format)); + "wrong container format %s\n", wine_dbgstr_guid(&format)); hr = IWICMetadataBlockReader_GetCount(blockreader, NULL); ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr); @@ -1165,7 +1150,7 @@ { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); ok(IsEqualGUID(&format, &GUID_MetadataFormatIMD), /* Image Descriptor */ - "wrong metadata format %s\n", debugstr_guid(&format)); + "wrong metadata format %s\n", wine_dbgstr_guid(&format)); hr = IWICMetadataReader_GetCount(reader, &count); ok(hr == S_OK, "GetCount error %#x\n", hr); @@ -1205,7 +1190,7 @@ hr = IWICMetadataBlockReader_GetContainerFormat(blockreader, &format); ok(hr == S_OK, "GetContainerFormat error %#x\n", hr); ok(IsEqualGUID(&format, &GUID_ContainerFormatGif), - "wrong container format %s\n", debugstr_guid(&format)); + "wrong container format %s\n", wine_dbgstr_guid(&format)); hr = IWICMetadataBlockReader_GetCount(blockreader, &count); ok(hr == S_OK, "GetCount error %#x\n", hr); @@ -1218,7 +1203,7 @@ { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); ok(IsEqualGUID(&format, &GUID_MetadataFormatLSD), /* Logical Screen Descriptor */ - "wrong metadata format %s\n", debugstr_guid(&format)); + "wrong metadata format %s\n", wine_dbgstr_guid(&format)); hr = IWICMetadataReader_GetCount(reader, &count); ok(hr == S_OK, "GetCount error %#x\n", hr); @@ -1236,7 +1221,7 @@ { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); ok(IsEqualGUID(&format, &GUID_MetadataFormatAPE), /* Application Extension */ - "wrong metadata format %s\n", debugstr_guid(&format)); + "wrong metadata format %s\n", wine_dbgstr_guid(&format)); hr = IWICMetadataReader_GetCount(reader, &count); ok(hr == S_OK, "GetCount error %#x\n", hr); @@ -1254,7 +1239,7 @@ { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); ok(IsEqualGUID(&format, &GUID_MetadataFormatGifComment), /* Comment Extension */ - "wrong metadata format %s\n", debugstr_guid(&format)); + "wrong metadata format %s\n", wine_dbgstr_guid(&format)); hr = IWICMetadataReader_GetCount(reader, &count); ok(hr == S_OK, "GetCount error %#x\n", hr); @@ -1272,7 +1257,7 @@ { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); ok(IsEqualGUID(&format, &GUID_MetadataFormatUnknown), - "wrong metadata format %s\n", debugstr_guid(&format)); + "wrong metadata format %s\n", wine_dbgstr_guid(&format)); hr = IWICMetadataReader_GetCount(reader, &count); ok(hr == S_OK, "GetCount error %#x\n", hr); @@ -1304,7 +1289,7 @@ hr = IWICMetadataBlockReader_GetContainerFormat(blockreader, &format); ok(hr == S_OK, "GetContainerFormat error %#x\n", hr); ok(IsEqualGUID(&format, &GUID_ContainerFormatGif), - "wrong container format %s\n", debugstr_guid(&format)); + "wrong container format %s\n", wine_dbgstr_guid(&format)); hr = IWICMetadataBlockReader_GetCount(blockreader, NULL); ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr); @@ -1320,7 +1305,7 @@ { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); ok(IsEqualGUID(&format, &GUID_MetadataFormatIMD), /* Image Descriptor */ - "wrong metadata format %s\n", debugstr_guid(&format)); + "wrong metadata format %s\n", wine_dbgstr_guid(&format)); hr = IWICMetadataReader_GetCount(reader, &count); ok(hr == S_OK, "GetCount error %#x\n", hr); @@ -1338,7 +1323,7 @@ { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); ok(IsEqualGUID(&format, &GUID_MetadataFormatGifComment), /* Comment Extension */ - "wrong metadata format %s\n", debugstr_guid(&format)); + "wrong metadata format %s\n", wine_dbgstr_guid(&format)); hr = IWICMetadataReader_GetCount(reader, &count); ok(hr == S_OK, "GetCount error %#x\n", hr); @@ -1357,7 +1342,7 @@ { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); ok(IsEqualGUID(&format, &GUID_MetadataFormatUnknown), - "wrong metadata format %s\n", debugstr_guid(&format)); + "wrong metadata format %s\n", wine_dbgstr_guid(&format)); hr = IWICMetadataReader_GetCount(reader, &count); ok(hr == S_OK, "GetCount error %#x\n", hr); @@ -1375,7 +1360,7 @@ { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); ok(IsEqualGUID(&format, &GUID_MetadataFormatGCE), /* Graphic Control Extension */ - "wrong metadata format %s\n", debugstr_guid(&format)); + "wrong metadata format %s\n", wine_dbgstr_guid(&format)); hr = IWICMetadataReader_GetCount(reader, &count); ok(hr == S_OK, "GetCount error %#x\n", hr); @@ -1455,14 +1440,14 @@ hr = IWICMetadataReader_GetMetadataFormat(reader, &format); ok(hr == S_OK, "GetMetadataFormat error %#x\n", hr); - ok(IsEqualGUID(&format, &GUID_MetadataFormatLSD), "wrong format %s\n", debugstr_guid(&format)); + ok(IsEqualGUID(&format, &GUID_MetadataFormatLSD), "wrong format %s\n", wine_dbgstr_guid(&format)); hr = IWICMetadataReader_GetMetadataHandlerInfo(reader, &info); ok(hr == S_OK, "GetMetadataHandlerInfo error %#x\n", hr); hr = IWICMetadataHandlerInfo_GetCLSID(info, &id); ok(hr == S_OK, "GetCLSID error %#x\n", hr); - ok(IsEqualGUID(&id, &CLSID_WICLSDMetadataReader), "wrong CLSID %s\n", debugstr_guid(&id)); + ok(IsEqualGUID(&id, &CLSID_WICLSDMetadataReader), "wrong CLSID %s\n", wine_dbgstr_guid(&id)); hr = IWICMetadataHandlerInfo_GetFriendlyName(info, 64, name, &dummy); ok(hr == S_OK, "GetFriendlyName error %#x\n", hr); @@ -1533,14 +1518,14 @@ hr = IWICMetadataReader_GetMetadataFormat(reader, &format); ok(hr == S_OK, "GetMetadataFormat error %#x\n", hr); - ok(IsEqualGUID(&format, &GUID_MetadataFormatIMD), "wrong format %s\n", debugstr_guid(&format)); + ok(IsEqualGUID(&format, &GUID_MetadataFormatIMD), "wrong format %s\n", wine_dbgstr_guid(&format)); hr = IWICMetadataReader_GetMetadataHandlerInfo(reader, &info); ok(hr == S_OK, "GetMetadataHandlerInfo error %#x\n", hr); hr = IWICMetadataHandlerInfo_GetCLSID(info, &id); ok(hr == S_OK, "GetCLSID error %#x\n", hr); - ok(IsEqualGUID(&id, &CLSID_WICIMDMetadataReader), "wrong CLSID %s\n", debugstr_guid(&id)); + ok(IsEqualGUID(&id, &CLSID_WICIMDMetadataReader), "wrong CLSID %s\n", wine_dbgstr_guid(&id)); hr = IWICMetadataHandlerInfo_GetFriendlyName(info, 64, name, &dummy); ok(hr == S_OK, "GetFriendlyName error %#x\n", hr); @@ -1608,14 +1593,14 @@ hr = IWICMetadataReader_GetMetadataFormat(reader, &format); ok(hr == S_OK, "GetMetadataFormat error %#x\n", hr); - ok(IsEqualGUID(&format, &GUID_MetadataFormatGCE), "wrong format %s\n", debugstr_guid(&format)); + ok(IsEqualGUID(&format, &GUID_MetadataFormatGCE), "wrong format %s\n", wine_dbgstr_guid(&format)); hr = IWICMetadataReader_GetMetadataHandlerInfo(reader, &info); ok(hr == S_OK, "GetMetadataHandlerInfo error %#x\n", hr); hr = IWICMetadataHandlerInfo_GetCLSID(info, &id); ok(hr == S_OK, "GetCLSID error %#x\n", hr); - ok(IsEqualGUID(&id, &CLSID_WICGCEMetadataReader), "wrong CLSID %s\n", debugstr_guid(&id)); + ok(IsEqualGUID(&id, &CLSID_WICGCEMetadataReader), "wrong CLSID %s\n", wine_dbgstr_guid(&id)); hr = IWICMetadataHandlerInfo_GetFriendlyName(info, 64, name, &dummy); ok(hr == S_OK, "GetFriendlyName error %#x\n", hr); @@ -1681,7 +1666,7 @@ hr = IWICMetadataReader_GetMetadataFormat(reader, &format); ok(hr == S_OK, "GetMetadataFormat error %#x\n", hr); - ok(IsEqualGUID(&format, &GUID_MetadataFormatAPE), "wrong format %s\n", debugstr_guid(&format)); + ok(IsEqualGUID(&format, &GUID_MetadataFormatAPE), "wrong format %s\n", wine_dbgstr_guid(&format)); PropVariantInit(&value); id.vt = VT_LPWSTR; @@ -1700,7 +1685,7 @@ hr = IWICMetadataHandlerInfo_GetCLSID(info, &clsid); ok(hr == S_OK, "GetCLSID error %#x\n", hr); - ok(IsEqualGUID(&clsid, &CLSID_WICAPEMetadataReader), "wrong CLSID %s\n", debugstr_guid(&clsid)); + ok(IsEqualGUID(&clsid, &CLSID_WICAPEMetadataReader), "wrong CLSID %s\n", wine_dbgstr_guid(&clsid)); hr = IWICMetadataHandlerInfo_GetFriendlyName(info, 64, name, &dummy); ok(hr == S_OK, "GetFriendlyName error %#x\n", hr); @@ -1765,7 +1750,7 @@ hr = IWICMetadataReader_GetMetadataFormat(reader, &format); ok(hr == S_OK, "GetMetadataFormat error %#x\n", hr); - ok(IsEqualGUID(&format, &GUID_MetadataFormatGifComment), "wrong format %s\n", debugstr_guid(&format)); + ok(IsEqualGUID(&format, &GUID_MetadataFormatGifComment), "wrong format %s\n", wine_dbgstr_guid(&format)); PropVariantInit(&value); id.vt = VT_LPWSTR; @@ -1782,7 +1767,7 @@ hr = IWICMetadataHandlerInfo_GetCLSID(info, &clsid); ok(hr == S_OK, "GetCLSID error %#x\n", hr); - ok(IsEqualGUID(&clsid, &CLSID_WICGifCommentMetadataReader), "wrong CLSID %s\n", debugstr_guid(&clsid)); + ok(IsEqualGUID(&clsid, &CLSID_WICGifCommentMetadataReader), "wrong CLSID %s\n", wine_dbgstr_guid(&clsid)); hr = IWICMetadataHandlerInfo_GetFriendlyName(info, 64, name, &dummy); ok(hr == S_OK, "GetFriendlyName error %#x\n", hr); Modified: trunk/rostests/winetests/windowscodecs/pngformat.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/windowscodecs/p…
============================================================================== --- trunk/rostests/winetests/windowscodecs/pngformat.c [iso-8859-1] (original) +++ trunk/rostests/winetests/windowscodecs/pngformat.c [iso-8859-1] Thu Apr 24 12:13:18 2014 @@ -281,18 +281,6 @@ static IWICImagingFactory *factory; -static const char *debugstr_guid(const GUID *guid) -{ - static char buf[50]; - - if (!guid) return "(null)"; - sprintf(buf, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", - guid->Data1, guid->Data2, guid->Data3, guid->Data4[0], - guid->Data4[1], guid->Data4[2], guid->Data4[3], guid->Data4[4], - guid->Data4[5], guid->Data4[6], guid->Data4[7]); - return buf; -} - static IWICBitmapDecoder *create_decoder(const void *image_data, UINT image_size) { HGLOBAL hmem; @@ -316,7 +304,7 @@ hr = IWICBitmapDecoder_GetContainerFormat(decoder, &format); ok(hr == S_OK, "GetContainerFormat error %#x\n", hr); ok(IsEqualGUID(&format, &GUID_ContainerFormatPng), - "wrong container format %s\n", debugstr_guid(&format)); + "wrong container format %s\n", wine_dbgstr_guid(&format)); IStream_Release(stream); @@ -569,7 +557,7 @@ hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &format); ok(hr == S_OK, "GetPixelFormat error %#x\n", hr); ok(IsEqualGUID(&format, &GUID_WICPixelFormat1bppIndexed), - "got wrong format %s\n", debugstr_guid(&format)); + "got wrong format %s\n", wine_dbgstr_guid(&format)); hr = IWICImagingFactory_CreatePalette(factory, &palette); ok(hr == S_OK, "CreatePalette error %#x\n", hr); Modified: trunk/rostests/winetests/windowscodecs/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/windowscodecs/t…
============================================================================== --- trunk/rostests/winetests/windowscodecs/testlist.c [iso-8859-1] (original) +++ trunk/rostests/winetests/windowscodecs/testlist.c [iso-8859-1] Thu Apr 24 12:13:18 2014 @@ -1,7 +1,7 @@ /* Automatically generated file; DO NOT EDIT!! */ #define STANDALONE -#include "wine/test.h" +#include <wine/test.h> extern void func_bitmap(void); extern void func_bmpformat(void); Modified: trunk/rostests/winetests/windowscodecs/tiffformat.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/windowscodecs/t…
============================================================================== --- trunk/rostests/winetests/windowscodecs/tiffformat.c [iso-8859-1] (original) +++ trunk/rostests/winetests/windowscodecs/tiffformat.c [iso-8859-1] Thu Apr 24 12:13:18 2014 @@ -102,18 +102,6 @@ static IWICImagingFactory *factory; -static const char *debugstr_guid(const GUID *guid) -{ - static char buf[50]; - - if (!guid) return "(null)"; - sprintf(buf, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", - guid->Data1, guid->Data2, guid->Data3, guid->Data4[0], - guid->Data4[1], guid->Data4[2], guid->Data4[3], guid->Data4[4], - guid->Data4[5], guid->Data4[6], guid->Data4[7]); - return buf; -} - static IStream *create_stream(const void *data, int data_size) { HRESULT hr; @@ -173,7 +161,7 @@ hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &format); ok(hr == S_OK, "GetPixelFormat error %#x\n", hr); ok(IsEqualGUID(&format, &GUID_WICPixelFormatBlackWhite), - "got wrong format %s\n", debugstr_guid(&format)); + "got wrong format %s\n", wine_dbgstr_guid(&format)); hr = IWICImagingFactory_CreatePalette(factory, &palette); ok(hr == S_OK, "CreatePalette error %#x\n", hr);
10 years, 8 months
1
0
0
0
[akhaldi] 62936: [WINDOWSCODECS] * Sync with Wine 1.7.17. CORE-8080
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Apr 24 12:12:56 2014 New Revision: 62936 URL:
http://svn.reactos.org/svn/reactos?rev=62936&view=rev
Log: [WINDOWSCODECS] * Sync with Wine 1.7.17. CORE-8080 Modified: trunk/reactos/dll/win32/windowscodecs/bitmap.c trunk/reactos/dll/win32/windowscodecs/bmpdecode.c trunk/reactos/dll/win32/windowscodecs/bmpencode.c trunk/reactos/dll/win32/windowscodecs/clsfactory.c trunk/reactos/dll/win32/windowscodecs/converter.c trunk/reactos/dll/win32/windowscodecs/gifformat.c trunk/reactos/dll/win32/windowscodecs/guid.c trunk/reactos/dll/win32/windowscodecs/icnsformat.c trunk/reactos/dll/win32/windowscodecs/icoformat.c trunk/reactos/dll/win32/windowscodecs/imgfactory.c trunk/reactos/dll/win32/windowscodecs/info.c trunk/reactos/dll/win32/windowscodecs/jpegformat.c trunk/reactos/dll/win32/windowscodecs/metadatahandler.c trunk/reactos/dll/win32/windowscodecs/pngformat.c trunk/reactos/dll/win32/windowscodecs/proxy.c trunk/reactos/dll/win32/windowscodecs/regsvr.c trunk/reactos/dll/win32/windowscodecs/tgaformat.c trunk/reactos/dll/win32/windowscodecs/tiffformat.c trunk/reactos/dll/win32/windowscodecs/wincodecs_private.h trunk/reactos/dll/win32/windowscodecs/windowscodecs.spec trunk/reactos/dll/win32/windowscodecs/windowscodecs_wincodec.idl trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/windowscodecs/bitmap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/bi…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/bitmap.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/bitmap.c [iso-8859-1] Thu Apr 24 12:12:56 2014 @@ -18,9 +18,15 @@ #include "wincodecs_private.h" +/* WARNING: .NET Media Integration Layer (MIL) directly dereferences + * BitmapImpl members and depends on its exact layout. + */ typedef struct BitmapImpl { + IMILUnknown1 IMILUnknown1_iface; + LONG ref; + IMILBitmapSource IMILBitmapSource_iface; IWICBitmap IWICBitmap_iface; - LONG ref; + IMILUnknown2 IMILUnknown2_iface; IWICPalette *palette; int palette_set; LONG lock; /* 0 if not locked, -1 if locked for writing, count if locked for reading */ @@ -46,6 +52,21 @@ return CONTAINING_RECORD(iface, BitmapImpl, IWICBitmap_iface); } +static inline BitmapImpl *impl_from_IMILBitmapSource(IMILBitmapSource *iface) +{ + return CONTAINING_RECORD(iface, BitmapImpl, IMILBitmapSource_iface); +} + +static inline BitmapImpl *impl_from_IMILUnknown1(IMILUnknown1 *iface) +{ + return CONTAINING_RECORD(iface, BitmapImpl, IMILUnknown1_iface); +} + +static inline BitmapImpl *impl_from_IMILUnknown2(IMILUnknown2 *iface) +{ + return CONTAINING_RECORD(iface, BitmapImpl, IMILUnknown2_iface); +} + static inline BitmapLockImpl *impl_from_IWICBitmapLock(IWICBitmapLock *iface) { return CONTAINING_RECORD(iface, BitmapLockImpl, IWICBitmapLock_iface); @@ -212,6 +233,10 @@ IsEqualIID(&IID_IWICBitmap, iid)) { *ppv = &This->IWICBitmap_iface; + } + else if (IsEqualIID(&IID_IMILBitmapSource, iid)) + { + *ppv = &This->IMILBitmapSource_iface; } else { @@ -431,6 +456,229 @@ BitmapImpl_SetResolution }; +static HRESULT WINAPI IMILBitmapImpl_QueryInterface(IMILBitmapSource *iface, REFIID iid, + void **ppv) +{ + BitmapImpl *This = impl_from_IMILBitmapSource(iface); + TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv); + + if (!ppv) return E_INVALIDARG; + + if (IsEqualIID(&IID_IUnknown, iid) || + IsEqualIID(&IID_IMILBitmapSource, iid)) + { + IUnknown_AddRef(&This->IMILBitmapSource_iface); + *ppv = &This->IMILBitmapSource_iface; + return S_OK; + } + + *ppv = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI IMILBitmapImpl_AddRef(IMILBitmapSource *iface) +{ + BitmapImpl *This = impl_from_IMILBitmapSource(iface); + return IWICBitmap_AddRef(&This->IWICBitmap_iface); +} + +static ULONG WINAPI IMILBitmapImpl_Release(IMILBitmapSource *iface) +{ + BitmapImpl *This = impl_from_IMILBitmapSource(iface); + return IWICBitmap_Release(&This->IWICBitmap_iface); +} + +static HRESULT WINAPI IMILBitmapImpl_GetSize(IMILBitmapSource *iface, + UINT *width, UINT *height) +{ + BitmapImpl *This = impl_from_IMILBitmapSource(iface); + return IWICBitmap_GetSize(&This->IWICBitmap_iface, width, height); +} + +static const struct +{ + const GUID *WIC_format; + int enum_format; +} pixel_fmt_map[] = +{ + { &GUID_WICPixelFormatDontCare, 0 }, + { &GUID_WICPixelFormat1bppIndexed, 1 }, + { &GUID_WICPixelFormat2bppIndexed, 2 }, + { &GUID_WICPixelFormat4bppIndexed, 3 }, + { &GUID_WICPixelFormat8bppIndexed, 4 }, + { &GUID_WICPixelFormatBlackWhite, 5 }, + { &GUID_WICPixelFormat2bppGray, 6 }, + { &GUID_WICPixelFormat4bppGray, 7 }, + { &GUID_WICPixelFormat8bppGray, 8 }, + { &GUID_WICPixelFormat16bppBGR555, 9 }, + { &GUID_WICPixelFormat16bppBGR565, 0x0a }, + { &GUID_WICPixelFormat16bppGray, 0x0b }, + { &GUID_WICPixelFormat24bppBGR, 0x0c }, + { &GUID_WICPixelFormat24bppRGB, 0x0d }, + { &GUID_WICPixelFormat32bppBGR, 0x0e }, + { &GUID_WICPixelFormat32bppBGRA, 0x0f }, + { &GUID_WICPixelFormat32bppPBGRA, 0x10 }, + { &GUID_WICPixelFormat48bppRGB, 0x15 }, + { &GUID_WICPixelFormat64bppRGBA, 0x16 }, + { &GUID_WICPixelFormat64bppPRGBA, 0x17 }, + { &GUID_WICPixelFormat32bppCMYK, 0x1c } +}; + +static HRESULT WINAPI IMILBitmapImpl_GetPixelFormat(IMILBitmapSource *iface, + int *format) +{ + BitmapImpl *This = impl_from_IMILBitmapSource(iface); + int i; + + TRACE("(%p,%p)\n", iface, format); + + if (!format) return E_INVALIDARG; + + *format = 0; + + for (i = 0; i < sizeof(pixel_fmt_map)/sizeof(pixel_fmt_map[0]); i++) + { + if (IsEqualGUID(pixel_fmt_map[i].WIC_format, &This->pixelformat)) + { + *format = pixel_fmt_map[i].enum_format; + break; + } + } + + return S_OK; +} + +static HRESULT WINAPI IMILBitmapImpl_GetResolution(IMILBitmapSource *iface, + double *dpix, double *dpiy) +{ + BitmapImpl *This = impl_from_IMILBitmapSource(iface); + return IWICBitmap_GetResolution(&This->IWICBitmap_iface, dpix, dpiy); +} + +static HRESULT WINAPI IMILBitmapImpl_CopyPalette(IMILBitmapSource *iface, + IWICPalette *palette) +{ + BitmapImpl *This = impl_from_IMILBitmapSource(iface); + return IWICBitmap_CopyPalette(&This->IWICBitmap_iface, palette); +} + +static HRESULT WINAPI IMILBitmapImpl_CopyPixels(IMILBitmapSource *iface, + const WICRect *rc, UINT stride, UINT size, BYTE *buffer) +{ + BitmapImpl *This = impl_from_IMILBitmapSource(iface); + return IWICBitmap_CopyPixels(&This->IWICBitmap_iface, rc, stride, size, buffer); +} + +static HRESULT WINAPI IMILBitmapImpl_UnknownMethod1(IMILBitmapSource *iface, void **ppv) +{ + BitmapImpl *This = impl_from_IMILBitmapSource(iface); + + TRACE("(%p,%p)\n", iface, ppv); + + if (!ppv) return E_INVALIDARG; + + IUnknown_AddRef(&This->IMILUnknown1_iface); + *ppv = &This->IMILUnknown1_iface; + + return S_OK; +} + +static const IMILBitmapSourceVtbl IMILBitmapImpl_Vtbl = +{ + IMILBitmapImpl_QueryInterface, + IMILBitmapImpl_AddRef, + IMILBitmapImpl_Release, + IMILBitmapImpl_GetSize, + IMILBitmapImpl_GetPixelFormat, + IMILBitmapImpl_GetResolution, + IMILBitmapImpl_CopyPalette, + IMILBitmapImpl_CopyPixels, + IMILBitmapImpl_UnknownMethod1, +}; + +static HRESULT WINAPI IMILUnknown1Impl_QueryInterface(IMILUnknown1 *iface, REFIID iid, + void **ppv) +{ + BitmapImpl *This = impl_from_IMILUnknown1(iface); + + TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv); + + if (!ppv) return E_INVALIDARG; + + if (IsEqualIID(&IID_IUnknown, iid)) + { + IUnknown_AddRef(&This->IMILUnknown1_iface); + *ppv = iface; + return S_OK; + } + + return IWICBitmap_QueryInterface(&This->IWICBitmap_iface, iid, ppv); +} + +static ULONG WINAPI IMILUnknown1Impl_AddRef(IMILUnknown1 *iface) +{ + BitmapImpl *This = impl_from_IMILUnknown1(iface); + return IWICBitmap_AddRef(&This->IWICBitmap_iface); +} + +static ULONG WINAPI IMILUnknown1Impl_Release(IMILUnknown1 *iface) +{ + BitmapImpl *This = impl_from_IMILUnknown1(iface); + return IWICBitmap_Release(&This->IWICBitmap_iface); +} + +static const IMILUnknown1Vtbl IMILUnknown1Impl_Vtbl = +{ + IMILUnknown1Impl_QueryInterface, + IMILUnknown1Impl_AddRef, + IMILUnknown1Impl_Release, +}; + +static HRESULT WINAPI IMILUnknown2Impl_QueryInterface(IMILUnknown2 *iface, REFIID iid, + void **ppv) +{ + BitmapImpl *This = impl_from_IMILUnknown2(iface); + + TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv); + + if (!ppv) return E_INVALIDARG; + + if (IsEqualIID(&IID_IUnknown, iid)) + { + IUnknown_AddRef(&This->IMILUnknown2_iface); + *ppv = iface; + return S_OK; + } + + return IWICBitmap_QueryInterface(&This->IWICBitmap_iface, iid, ppv); +} + +static ULONG WINAPI IMILUnknown2Impl_AddRef(IMILUnknown2 *iface) +{ + BitmapImpl *This = impl_from_IMILUnknown2(iface); + return IWICBitmap_AddRef(&This->IWICBitmap_iface); +} + +static ULONG WINAPI IMILUnknown2Impl_Release(IMILUnknown2 *iface) +{ + BitmapImpl *This = impl_from_IMILUnknown2(iface); + return IWICBitmap_Release(&This->IWICBitmap_iface); +} + +static HRESULT WINAPI IMILUnknown2Impl_UnknownMethod1(IMILUnknown2 *iface, void *arg1, void *arg2) +{ + FIXME("(%p,%p,%p): stub\n", iface, arg1, arg2); + return E_NOTIMPL; +} + +static const IMILUnknown2Vtbl IMILUnknown2Impl_Vtbl = +{ + IMILUnknown2Impl_QueryInterface, + IMILUnknown2Impl_AddRef, + IMILUnknown2Impl_Release, + IMILUnknown2Impl_UnknownMethod1, +}; + HRESULT BitmapImpl_Create(UINT uiWidth, UINT uiHeight, UINT stride, UINT datasize, BYTE *bits, REFWICPixelFormatGUID pixelFormat, WICBitmapCreateCacheOption option, @@ -461,6 +709,9 @@ if (bits) memcpy(data, bits, datasize); This->IWICBitmap_iface.lpVtbl = &BitmapImpl_Vtbl; + This->IMILBitmapSource_iface.lpVtbl = &IMILBitmapImpl_Vtbl; + This->IMILUnknown1_iface.lpVtbl = &IMILUnknown1Impl_Vtbl; + This->IMILUnknown2_iface.lpVtbl = &IMILUnknown2Impl_Vtbl; This->ref = 1; This->palette = NULL; This->palette_set = 0; Modified: trunk/reactos/dll/win32/windowscodecs/bmpdecode.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/bm…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/bmpdecode.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/bmpdecode.c [iso-8859-1] Thu Apr 24 12:12:56 2014 @@ -1169,16 +1169,14 @@ return S_OK; } -static HRESULT BmpDecoder_Construct(int packed, int icoframe, IUnknown *pUnkOuter, REFIID iid, void** ppv) +static HRESULT BmpDecoder_Construct(int packed, int icoframe, REFIID iid, void** ppv) { BmpDecoder *This; HRESULT ret; - TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv); + TRACE("(%s,%p)\n", debugstr_guid(iid), ppv); *ppv = NULL; - - if (pUnkOuter) return CLASS_E_NOAGGREGATION; ret = BmpDecoder_Create(packed, icoframe, &This); if (FAILED(ret)) return ret; @@ -1189,14 +1187,14 @@ return ret; } -HRESULT BmpDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) -{ - return BmpDecoder_Construct(FALSE, FALSE, pUnkOuter, iid, ppv); -} - -HRESULT DibDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) -{ - return BmpDecoder_Construct(TRUE, FALSE, pUnkOuter, iid, ppv); +HRESULT BmpDecoder_CreateInstance(REFIID iid, void** ppv) +{ + return BmpDecoder_Construct(FALSE, FALSE, iid, ppv); +} + +HRESULT DibDecoder_CreateInstance(REFIID iid, void** ppv) +{ + return BmpDecoder_Construct(TRUE, FALSE, iid, ppv); } HRESULT IcoDibDecoder_CreateInstance(BmpDecoder **ppDecoder) Modified: trunk/reactos/dll/win32/windowscodecs/bmpencode.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/bm…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/bmpencode.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/bmpencode.c [iso-8859-1] Thu Apr 24 12:12:56 2014 @@ -586,16 +586,14 @@ BmpEncoder_GetMetadataQueryWriter }; -HRESULT BmpEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) +HRESULT BmpEncoder_CreateInstance(REFIID iid, void** ppv) { BmpEncoder *This; HRESULT ret; - TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv); + TRACE("(%s,%p)\n", debugstr_guid(iid), ppv); *ppv = NULL; - - if (pUnkOuter) return CLASS_E_NOAGGREGATION; This = HeapAlloc(GetProcessHeap(), 0, sizeof(BmpEncoder)); if (!This) return E_OUTOFMEMORY; Modified: trunk/reactos/dll/win32/windowscodecs/clsfactory.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/cl…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/clsfactory.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/clsfactory.c [iso-8859-1] Thu Apr 24 12:12:56 2014 @@ -22,7 +22,7 @@ typedef struct { REFCLSID classid; - HRESULT (*constructor)(IUnknown*,REFIID,void**); + HRESULT (*constructor)(REFIID,void**); } classinfo; static const classinfo wic_classes[] = { @@ -112,7 +112,11 @@ { ClassFactoryImpl *This = impl_from_IClassFactory(iface); - return This->info->constructor(pUnkOuter, riid, ppv); + *ppv = NULL; + + if (pUnkOuter) return CLASS_E_NOAGGREGATION; + + return This->info->constructor(riid, ppv); } static HRESULT WINAPI ClassFactoryImpl_LockServer(IClassFactory *iface, BOOL lock) Modified: trunk/reactos/dll/win32/windowscodecs/converter.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/co…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/converter.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/converter.c [iso-8859-1] Thu Apr 24 12:12:56 2014 @@ -1256,16 +1256,14 @@ FormatConverter_CanConvert }; -HRESULT FormatConverter_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) +HRESULT FormatConverter_CreateInstance(REFIID iid, void** ppv) { FormatConverter *This; HRESULT ret; - TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv); + TRACE("(%s,%p)\n", debugstr_guid(iid), ppv); *ppv = NULL; - - if (pUnkOuter) return CLASS_E_NOAGGREGATION; This = HeapAlloc(GetProcessHeap(), 0, sizeof(FormatConverter)); if (!This) return E_OUTOFMEMORY; Modified: trunk/reactos/dll/win32/windowscodecs/gifformat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/gi…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/gifformat.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/gifformat.c [iso-8859-1] Thu Apr 24 12:12:56 2014 @@ -129,9 +129,9 @@ load_LSD_metadata }; -HRESULT LSDReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) -{ - return MetadataReader_Create(&LSDReader_Vtbl, pUnkOuter, iid, ppv); +HRESULT LSDReader_CreateInstance(REFIID iid, void **ppv) +{ + return MetadataReader_Create(&LSDReader_Vtbl, iid, ppv); } #include "pshpack1.h" @@ -227,9 +227,9 @@ load_IMD_metadata }; -HRESULT IMDReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) -{ - return MetadataReader_Create(&IMDReader_Vtbl, pUnkOuter, iid, ppv); +HRESULT IMDReader_CreateInstance(REFIID iid, void **ppv) +{ + return MetadataReader_Create(&IMDReader_Vtbl, iid, ppv); } static HRESULT load_GCE_metadata(IStream *stream, const GUID *vendor, DWORD options, @@ -305,9 +305,9 @@ load_GCE_metadata }; -HRESULT GCEReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) -{ - return MetadataReader_Create(&GCEReader_Vtbl, pUnkOuter, iid, ppv); +HRESULT GCEReader_CreateInstance(REFIID iid, void **ppv) +{ + return MetadataReader_Create(&GCEReader_Vtbl, iid, ppv); } static HRESULT load_APE_metadata(IStream *stream, const GUID *vendor, DWORD options, @@ -412,9 +412,9 @@ load_APE_metadata }; -HRESULT APEReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) -{ - return MetadataReader_Create(&APEReader_Vtbl, pUnkOuter, iid, ppv); +HRESULT APEReader_CreateInstance(REFIID iid, void **ppv) +{ + return MetadataReader_Create(&APEReader_Vtbl, iid, ppv); } static HRESULT load_GifComment_metadata(IStream *stream, const GUID *vendor, DWORD options, @@ -506,9 +506,9 @@ load_GifComment_metadata }; -HRESULT GifCommentReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) -{ - return MetadataReader_Create(&GifCommentReader_Vtbl, pUnkOuter, iid, ppv); +HRESULT GifCommentReader_CreateInstance(REFIID iid, void **ppv) +{ + return MetadataReader_Create(&GifCommentReader_Vtbl, iid, ppv); } static IStream *create_stream(const void *data, int data_size) @@ -1079,7 +1079,7 @@ } hr = IStream_Read(stream, data, len, &bytesread); - if (hr != S_OK) bytesread = 0; + if (FAILED(hr)) bytesread = 0; return bytesread; } @@ -1402,16 +1402,14 @@ GifDecoder_Block_GetEnumerator }; -HRESULT GifDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) +HRESULT GifDecoder_CreateInstance(REFIID iid, void** ppv) { GifDecoder *This; HRESULT ret; - TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv); + TRACE("(%s,%p)\n", debugstr_guid(iid), ppv); *ppv = NULL; - - if (pUnkOuter) return CLASS_E_NOAGGREGATION; This = HeapAlloc(GetProcessHeap(), 0, sizeof(GifDecoder)); if (!This) return E_OUTOFMEMORY; Modified: trunk/reactos/dll/win32/windowscodecs/guid.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/gu…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/guid.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/guid.c [iso-8859-1] Thu Apr 24 12:12:56 2014 @@ -16,5 +16,6 @@ DEFINE_GUID(CLSID_WICIcnsEncoder, 0x312fb6f1,0xb767,0x409d,0x8a,0x6d,0x0f,0xc1,0x54,0xd4,0xf0,0x5c); DEFINE_GUID(GUID_WineContainerFormatTga, 0x0c44fda1,0xa5c5,0x4298,0x96,0x85,0x47,0x3f,0xc1,0x7c,0xd3,0x22); DEFINE_GUID(GUID_VendorWine, 0xddf46da1,0x7dc1,0x404e,0x98,0xf2,0xef,0xa4,0x8d,0xfc,0x95,0x0a); +DEFINE_GUID(IID_IMILBitmapSource,0x7543696a,0xbc8d,0x46b0,0x5f,0x81,0x8d,0x95,0x72,0x89,0x72,0xbe); /* NO CODE HERE, THIS IS JUST REQUIRED FOR THE GUID DEFINITIONS */ Modified: trunk/reactos/dll/win32/windowscodecs/icnsformat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/ic…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/icnsformat.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/icnsformat.c [iso-8859-1] Thu Apr 24 12:12:56 2014 @@ -730,16 +730,14 @@ IcnsEncoder_GetMetadataQueryWriter }; -HRESULT IcnsEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) +HRESULT IcnsEncoder_CreateInstance(REFIID iid, void** ppv) { IcnsEncoder *This; HRESULT ret; - TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv); + TRACE("(%s,%p)\n", debugstr_guid(iid), ppv); *ppv = NULL; - - if (pUnkOuter) return CLASS_E_NOAGGREGATION; This = HeapAlloc(GetProcessHeap(), 0, sizeof(IcnsEncoder)); if (!This) return E_OUTOFMEMORY; @@ -763,7 +761,7 @@ #else /* !defined(HAVE_APPLICATIONSERVICES_APPLICATIONSERVICES_H) || MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4 */ -HRESULT IcnsEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) +HRESULT IcnsEncoder_CreateInstance(REFIID iid, void** ppv) { ERR("Trying to save ICNS picture, but ICNS support is not compiled in.\n"); return E_FAIL; Modified: trunk/reactos/dll/win32/windowscodecs/icoformat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/ic…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/icoformat.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/icoformat.c [iso-8859-1] Thu Apr 24 12:12:56 2014 @@ -216,7 +216,7 @@ IWICBitmapFrameDecode *framedecode; WICPixelFormatGUID pixelformat; IWICBitmapSource *source; - int has_alpha=FALSE; /* if TRUE, alpha data might be in the image data */ + BOOL has_alpha=FALSE; /* if TRUE, alpha data might be in the image data */ WICRect rc; hr = IcoDibDecoder_CreateInstance(&bmp_decoder); @@ -381,7 +381,7 @@ WICRect rect; HRESULT hr; - hr = PngDecoder_CreateInstance(NULL, &IID_IWICBitmapDecoder, (void**)&decoder); + hr = PngDecoder_CreateInstance(&IID_IWICBitmapDecoder, (void**)&decoder); if (FAILED(hr)) goto end; hr = IWICBitmapDecoder_Initialize(decoder, stream, WICDecodeMetadataCacheOnLoad); @@ -722,16 +722,14 @@ IcoDecoder_GetFrame }; -HRESULT IcoDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) +HRESULT IcoDecoder_CreateInstance(REFIID iid, void** ppv) { IcoDecoder *This; HRESULT ret; - TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv); + TRACE("(%s,%p)\n", debugstr_guid(iid), ppv); *ppv = NULL; - - if (pUnkOuter) return CLASS_E_NOAGGREGATION; This = HeapAlloc(GetProcessHeap(), 0, sizeof(IcoDecoder)); if (!This) return E_OUTOFMEMORY; Modified: trunk/reactos/dll/win32/windowscodecs/imgfactory.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/im…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/imgfactory.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/imgfactory.c [iso-8859-1] Thu Apr 24 12:12:56 2014 @@ -405,7 +405,7 @@ static HRESULT WINAPI ComponentFactory_CreateFormatConverter(IWICComponentFactory *iface, IWICFormatConverter **ppIFormatConverter) { - return FormatConverter_CreateInstance(NULL, &IID_IWICFormatConverter, (void**)ppIFormatConverter); + return FormatConverter_CreateInstance(&IID_IWICFormatConverter, (void**)ppIFormatConverter); } static HRESULT WINAPI ComponentFactory_CreateBitmapScaler(IWICComponentFactory *iface, @@ -585,12 +585,166 @@ return BitmapImpl_Create(width, height, stride, size, buffer, format, WICBitmapCacheOnLoad, bitmap); } +static BOOL get_16bpp_format(HBITMAP hbm, WICPixelFormatGUID *format) +{ + BOOL ret = TRUE; + BITMAPV4HEADER bmh; + HDC hdc; + + hdc = CreateCompatibleDC(0); + + memset(&bmh, 0, sizeof(bmh)); + bmh.bV4Size = sizeof(bmh); + bmh.bV4Width = 1; + bmh.bV4Height = 1; + bmh.bV4V4Compression = BI_BITFIELDS; + bmh.bV4BitCount = 16; + + GetDIBits(hdc, hbm, 0, 0, NULL, (BITMAPINFO *)&bmh, DIB_RGB_COLORS); + + if (bmh.bV4RedMask == 0x7c00 && + bmh.bV4GreenMask == 0x3e0 && + bmh.bV4BlueMask == 0x1f) + { + *format = GUID_WICPixelFormat16bppBGR555; + } + else if (bmh.bV4RedMask == 0xf800 && + bmh.bV4GreenMask == 0x7e0 && + bmh.bV4BlueMask == 0x1f) + { + *format = GUID_WICPixelFormat16bppBGR565; + } + else + { + FIXME("unrecognized bitfields %x,%x,%x\n", bmh.bV4RedMask, + bmh.bV4GreenMask, bmh.bV4BlueMask); + ret = FALSE; + } + + DeleteDC(hdc); + return ret; +} + static HRESULT WINAPI ComponentFactory_CreateBitmapFromHBITMAP(IWICComponentFactory *iface, - HBITMAP hBitmap, HPALETTE hPalette, WICBitmapAlphaChannelOption options, - IWICBitmap **ppIBitmap) -{ - FIXME("(%p,%p,%p,%u,%p): stub\n", iface, hBitmap, hPalette, options, ppIBitmap); - return E_NOTIMPL; + HBITMAP hbm, HPALETTE hpal, WICBitmapAlphaChannelOption option, IWICBitmap **bitmap) +{ + BITMAP bm; + HRESULT hr; + WICPixelFormatGUID format; + IWICBitmapLock *lock; + UINT size, num_palette_entries = 0; + PALETTEENTRY entry[256]; + + TRACE("(%p,%p,%p,%u,%p)\n", iface, hbm, hpal, option, bitmap); + + if (!bitmap) return E_INVALIDARG; + + if (GetObjectW(hbm, sizeof(bm), &bm) != sizeof(bm)) + return WINCODEC_ERR_WIN32ERROR; + + if (hpal) + { + num_palette_entries = GetPaletteEntries(hpal, 0, 256, entry); + if (!num_palette_entries) + return WINCODEC_ERR_WIN32ERROR; + } + + /* TODO: Figure out the correct format for 16, 32, 64 bpp */ + switch(bm.bmBitsPixel) + { + case 1: + format = GUID_WICPixelFormat1bppIndexed; + break; + case 4: + format = GUID_WICPixelFormat4bppIndexed; + break; + case 8: + format = GUID_WICPixelFormat8bppIndexed; + break; + case 16: + if (!get_16bpp_format(hbm, &format)) + return E_INVALIDARG; + break; + case 24: + format = GUID_WICPixelFormat24bppBGR; + break; + case 32: + switch (option) + { + case WICBitmapUseAlpha: + format = GUID_WICPixelFormat32bppBGRA; + break; + case WICBitmapUsePremultipliedAlpha: + format = GUID_WICPixelFormat32bppPBGRA; + break; + case WICBitmapIgnoreAlpha: + format = GUID_WICPixelFormat32bppBGR; + break; + default: + return E_INVALIDARG; + } + break; + case 48: + format = GUID_WICPixelFormat48bppRGB; + break; + default: + FIXME("unsupported %d bpp\n", bm.bmBitsPixel); + return E_INVALIDARG; + } + + hr = BitmapImpl_Create(bm.bmWidth, bm.bmHeight, bm.bmWidthBytes, 0, NULL, &format, option, bitmap); + if (hr != S_OK) return hr; + + hr = IWICBitmap_Lock(*bitmap, NULL, WICBitmapLockWrite, &lock); + if (hr == S_OK) + { + BYTE *buffer; + HDC hdc; + char bmibuf[FIELD_OFFSET(BITMAPINFO, bmiColors) + 256 * sizeof(RGBQUAD)]; + BITMAPINFO *bmi = (BITMAPINFO *)bmibuf; + + IWICBitmapLock_GetDataPointer(lock, &size, &buffer); + + hdc = CreateCompatibleDC(0); + + bmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + bmi->bmiHeader.biBitCount = 0; + GetDIBits(hdc, hbm, 0, 0, NULL, bmi, DIB_RGB_COLORS); + bmi->bmiHeader.biHeight = -bm.bmHeight; + GetDIBits(hdc, hbm, 0, bm.bmHeight, buffer, bmi, DIB_RGB_COLORS); + + DeleteDC(hdc); + IWICBitmapLock_Release(lock); + + if (num_palette_entries) + { + IWICPalette *palette; + WICColor colors[256]; + UINT i; + + hr = PaletteImpl_Create(&palette); + if (hr == S_OK) + { + for (i = 0; i < num_palette_entries; i++) + colors[i] = 0xff000000 | entry[i].peRed << 16 | + entry[i].peGreen << 8 | entry[i].peBlue; + + hr = IWICPalette_InitializeCustom(palette, colors, num_palette_entries); + if (hr == S_OK) + hr = IWICBitmap_SetPalette(*bitmap, palette); + + IWICPalette_Release(palette); + } + } + } + + if (hr != S_OK) + { + IWICBitmap_Release(*bitmap); + *bitmap = NULL; + } + + return hr; } static HRESULT WINAPI ComponentFactory_CreateBitmapFromHICON(IWICComponentFactory *iface, @@ -860,16 +1014,14 @@ ComponentFactory_CreateEncoderPropertyBag }; -HRESULT ComponentFactory_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) +HRESULT ComponentFactory_CreateInstance(REFIID iid, void** ppv) { ComponentFactory *This; HRESULT ret; - TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv); + TRACE("(%s,%p)\n", debugstr_guid(iid), ppv); *ppv = NULL; - - if (pUnkOuter) return CLASS_E_NOAGGREGATION; This = HeapAlloc(GetProcessHeap(), 0, sizeof(ComponentFactory)); if (!This) return E_OUTOFMEMORY; Modified: trunk/reactos/dll/win32/windowscodecs/info.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/in…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/info.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/info.c [iso-8859-1] Thu Apr 24 12:12:56 2014 @@ -1754,7 +1754,7 @@ WCHAR guidstring[39]; LONG res; const struct category *category; - int found=0; + BOOL found = FALSE; HRESULT hr; res = RegOpenKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, KEY_READ, &clsidkey); @@ -1775,7 +1775,7 @@ if (res == ERROR_SUCCESS) { RegCloseKey(classkey); - found = 1; + found = TRUE; } RegCloseKey(instancekey); } Modified: trunk/reactos/dll/win32/windowscodecs/jpegformat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/jp…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/jpegformat.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/jpegformat.c [iso-8859-1] Thu Apr 24 12:12:56 2014 @@ -231,7 +231,7 @@ hr = IStream_Read(This->stream, This->source_buffer, 1024, &bytesread); - if (hr != S_OK || bytesread == 0) + if (FAILED(hr) || bytesread == 0) { return FALSE; } @@ -696,12 +696,12 @@ JpegDecoder_Frame_GetThumbnail }; -HRESULT JpegDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) +HRESULT JpegDecoder_CreateInstance(REFIID iid, void** ppv) { JpegDecoder *This; HRESULT ret; - TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv); + TRACE("(%s,%p)\n", debugstr_guid(iid), ppv); if (!libjpeg_handle && !load_libjpeg()) { @@ -710,8 +710,6 @@ } *ppv = NULL; - - if (pUnkOuter) return CLASS_E_NOAGGREGATION; This = HeapAlloc(GetProcessHeap(), 0, sizeof(JpegDecoder)); if (!This) return E_OUTOFMEMORY; @@ -754,13 +752,13 @@ struct jpeg_compress_struct cinfo; struct jpeg_error_mgr jerr; struct jpeg_destination_mgr dest_mgr; - int initialized; + BOOL initialized; int frame_count; - int frame_initialized; - int started_compress; + BOOL frame_initialized; + BOOL started_compress; int lines_written; - int frame_committed; - int committed; + BOOL frame_committed; + BOOL committed; UINT width, height; double xres, yres; const jpeg_compress_format *format; @@ -1031,7 +1029,7 @@ pjpeg_start_compress(&This->cinfo, TRUE); - This->started_compress = 1; + This->started_compress = TRUE; } row_size = This->format->bpp / 8 * This->width; @@ -1438,16 +1436,14 @@ JpegEncoder_GetMetadataQueryWriter }; -HRESULT JpegEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) +HRESULT JpegEncoder_CreateInstance(REFIID iid, void** ppv) { JpegEncoder *This; HRESULT ret; - TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv); + TRACE("(%s,%p)\n", debugstr_guid(iid), ppv); *ppv = NULL; - - if (pUnkOuter) return CLASS_E_NOAGGREGATION; if (!libjpeg_handle && !load_libjpeg()) { @@ -1461,13 +1457,13 @@ This->IWICBitmapEncoder_iface.lpVtbl = &JpegEncoder_Vtbl; This->IWICBitmapFrameEncode_iface.lpVtbl = &JpegEncoder_FrameVtbl; This->ref = 1; - This->initialized = 0; + This->initialized = FALSE; This->frame_count = 0; - This->frame_initialized = 0; - This->started_compress = 0; + This->frame_initialized = FALSE; + This->started_compress = FALSE; This->lines_written = 0; - This->frame_committed = 0; - This->committed = 0; + This->frame_committed = FALSE; + This->committed = FALSE; This->width = This->height = 0; This->xres = This->yres = 0.0; This->format = NULL; @@ -1483,13 +1479,13 @@ #else /* !defined(SONAME_LIBJPEG) */ -HRESULT JpegDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) +HRESULT JpegDecoder_CreateInstance(REFIID iid, void** ppv) { ERR("Trying to load JPEG picture, but JPEG support is not compiled in.\n"); return E_FAIL; } -HRESULT JpegEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) +HRESULT JpegEncoder_CreateInstance(REFIID iid, void** ppv) { ERR("Trying to save JPEG picture, but JPEG support is not compiled in.\n"); return E_FAIL; Modified: trunk/reactos/dll/win32/windowscodecs/metadatahandler.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/me…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/metadatahandler.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/metadatahandler.c [iso-8859-1] Thu Apr 24 12:12:56 2014 @@ -440,7 +440,7 @@ MetadataHandler_SaveEx }; -HRESULT MetadataReader_Create(const MetadataHandlerVtbl *vtable, IUnknown *pUnkOuter, REFIID iid, void** ppv) +HRESULT MetadataReader_Create(const MetadataHandlerVtbl *vtable, REFIID iid, void** ppv) { MetadataHandler *This; HRESULT hr; @@ -448,8 +448,6 @@ TRACE("%s\n", debugstr_guid(vtable->clsid)); *ppv = NULL; - - if (pUnkOuter) return CLASS_E_NOAGGREGATION; This = HeapAlloc(GetProcessHeap(), 0, sizeof(MetadataHandler)); if (!This) return E_OUTOFMEMORY; @@ -709,9 +707,9 @@ LoadUnknownMetadata }; -HRESULT UnknownMetadataReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) -{ - return MetadataReader_Create(&UnknownMetadataReader_Vtbl, pUnkOuter, iid, ppv); +HRESULT UnknownMetadataReader_CreateInstance(REFIID iid, void** ppv) +{ + return MetadataReader_Create(&UnknownMetadataReader_Vtbl, iid, ppv); } #define SWAP_USHORT(x) do { if (!native_byte_order) (x) = RtlUshortByteSwap(x); } while(0) @@ -1144,7 +1142,7 @@ LoadIfdMetadata }; -HRESULT IfdMetadataReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) -{ - return MetadataReader_Create(&IfdMetadataReader_Vtbl, pUnkOuter, iid, ppv); -} +HRESULT IfdMetadataReader_CreateInstance(REFIID iid, void **ppv) +{ + return MetadataReader_Create(&IfdMetadataReader_Vtbl, iid, ppv); +} Modified: trunk/reactos/dll/win32/windowscodecs/pngformat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/pn…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/pngformat.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/pngformat.c [iso-8859-1] Thu Apr 24 12:12:56 2014 @@ -129,9 +129,9 @@ LoadTextMetadata }; -HRESULT PngTextReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) -{ - return MetadataReader_Create(&TextReader_Vtbl, pUnkOuter, iid, ppv); +HRESULT PngTextReader_CreateInstance(REFIID iid, void** ppv) +{ + return MetadataReader_Create(&TextReader_Vtbl, iid, ppv); } #ifdef SONAME_LIBPNG @@ -935,7 +935,9 @@ static HRESULT WINAPI PngDecoder_Block_GetCount(IWICMetadataBlockReader *iface, UINT *pcCount) { - FIXME("%p,%p: stub\n", iface, pcCount); + static int once; + TRACE("%p,%p\n", iface, pcCount); + if (!once++) FIXME("stub\n"); return E_NOTIMPL; } @@ -963,16 +965,14 @@ PngDecoder_Block_GetEnumerator, }; -HRESULT PngDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) +HRESULT PngDecoder_CreateInstance(REFIID iid, void** ppv) { PngDecoder *This; HRESULT ret; - TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv); + TRACE("(%s,%p)\n", debugstr_guid(iid), ppv); *ppv = NULL; - - if (pUnkOuter) return CLASS_E_NOAGGREGATION; if (!libpng_handle && !load_libpng()) { @@ -1655,16 +1655,14 @@ PngEncoder_GetMetadataQueryWriter }; -HRESULT PngEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) +HRESULT PngEncoder_CreateInstance(REFIID iid, void** ppv) { PngEncoder *This; HRESULT ret; - TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv); + TRACE("(%s,%p)\n", debugstr_guid(iid), ppv); *ppv = NULL; - - if (pUnkOuter) return CLASS_E_NOAGGREGATION; if (!libpng_handle && !load_libpng()) { @@ -1703,13 +1701,13 @@ #else /* !HAVE_PNG_H */ -HRESULT PngDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) +HRESULT PngDecoder_CreateInstance(REFIID iid, void** ppv) { ERR("Trying to load PNG picture, but PNG support is not compiled in.\n"); return E_FAIL; } -HRESULT PngEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) +HRESULT PngEncoder_CreateInstance(REFIID iid, void** ppv) { ERR("Trying to save PNG picture, but PNG support is not compiled in.\n"); return E_FAIL; Modified: trunk/reactos/dll/win32/windowscodecs/proxy.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/pr…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/proxy.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/proxy.c [iso-8859-1] Thu Apr 24 12:12:56 2014 @@ -20,6 +20,12 @@ #include "wincodecs_private.h" +HRESULT WINAPI IPropertyBag2_Write_Proxy(IPropertyBag2 *iface, + ULONG cProperties, PROPBAG2 *ppropbag, VARIANT *pvarValue) +{ + return IPropertyBag2_Write(iface, cProperties, ppropbag, pvarValue); +} + HRESULT WINAPI IWICBitmapClipper_Initialize_Proxy_W(IWICBitmapClipper *iface, IWICBitmapSource *pISource, const WICRect *prc) { @@ -614,5 +620,45 @@ { TRACE("%x, %p\n", SDKVersion, ppIImagingFactory); - return ComponentFactory_CreateInstance(NULL, &IID_IWICImagingFactory, (void**)ppIImagingFactory); -} + return ComponentFactory_CreateInstance(&IID_IWICImagingFactory, (void**)ppIImagingFactory); +} + +HRESULT WINAPI WICSetEncoderFormat_Proxy(IWICBitmapSource *pSourceIn, + IWICPalette *pIPalette, IWICBitmapFrameEncode *pIFrameEncode, + IWICBitmapSource **ppSourceOut) +{ + HRESULT hr; + WICPixelFormatGUID pixelformat, framepixelformat; + + TRACE("%p,%p,%p,%p\n", pSourceIn, pIPalette, pIFrameEncode, ppSourceOut); + + if (pIPalette) FIXME("ignoring palette\n"); + + if (!pSourceIn || !pIFrameEncode || !ppSourceOut) + return E_INVALIDARG; + + *ppSourceOut = NULL; + + hr = IWICBitmapSource_GetPixelFormat(pSourceIn, &pixelformat); + + if (SUCCEEDED(hr)) + { + framepixelformat = pixelformat; + hr = IWICBitmapFrameEncode_SetPixelFormat(pIFrameEncode, &framepixelformat); + } + + if (SUCCEEDED(hr)) + { + if (IsEqualGUID(&pixelformat, &framepixelformat)) + { + *ppSourceOut = pSourceIn; + IWICBitmapSource_AddRef(pSourceIn); + } + else + { + hr = WICConvertBitmapSource(&framepixelformat, pSourceIn, ppSourceOut); + } + } + + return hr; +} Modified: trunk/reactos/dll/win32/windowscodecs/regsvr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/re…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/regsvr.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/regsvr.c [iso-8859-1] Thu Apr 24 12:12:56 2014 @@ -218,21 +218,21 @@ KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL); if (res == ERROR_SUCCESS) { res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ, - (CONST BYTE*)(buf), 78); + (const BYTE*)buf, 78); RegCloseKey(instance_clsid_key); } if (res != ERROR_SUCCESS) goto error_close_clsid_key; if (list->author) { res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ, - (CONST BYTE*)(list->author), + (const BYTE*)list->author, strlen(list->author) + 1); if (res != ERROR_SUCCESS) goto error_close_clsid_key; } if (list->friendlyname) { res = RegSetValueExA(clsid_key, friendlyname_valuename, 0, REG_SZ, - (CONST BYTE*)(list->friendlyname), + (const BYTE*)list->friendlyname, strlen(list->friendlyname) + 1); if (res != ERROR_SUCCESS) goto error_close_clsid_key; } @@ -240,34 +240,34 @@ if (list->vendor) { StringFromGUID2(list->vendor, buf, 39); res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ, - (CONST BYTE*)(buf), 78); + (const BYTE*)buf, 78); if (res != ERROR_SUCCESS) goto error_close_clsid_key; } if (list->container_format) { StringFromGUID2(list->container_format, buf, 39); res = RegSetValueExW(clsid_key, containerformat_valuename, 0, REG_SZ, - (CONST BYTE*)(buf), 78); + (const BYTE*)buf, 78); if (res != ERROR_SUCCESS) goto error_close_clsid_key; } if (list->version) { res = RegSetValueExA(clsid_key, version_valuename, 0, REG_SZ, - (CONST BYTE*)(list->version), + (const BYTE*)list->version, strlen(list->version) + 1); if (res != ERROR_SUCCESS) goto error_close_clsid_key; } if (list->mimetypes) { res = RegSetValueExA(clsid_key, mimetypes_valuename, 0, REG_SZ, - (CONST BYTE*)(list->mimetypes), + (const BYTE*)list->mimetypes, strlen(list->mimetypes) + 1); if (res != ERROR_SUCCESS) goto error_close_clsid_key; } if (list->extensions) { res = RegSetValueExA(clsid_key, extensions_valuename, 0, REG_SZ, - (CONST BYTE*)(list->extensions), + (const BYTE*)list->extensions, strlen(list->extensions) + 1); if (res != ERROR_SUCCESS) goto error_close_clsid_key; } @@ -308,10 +308,10 @@ KEY_READ | KEY_WRITE, NULL, &pattern_key, NULL); if (res != ERROR_SUCCESS) break; res = RegSetValueExA(pattern_key, length_valuename, 0, REG_DWORD, - (CONST BYTE*)(&list->patterns[i].length), 4); + (const BYTE*)&list->patterns[i].length, 4); if (res == ERROR_SUCCESS) res = RegSetValueExA(pattern_key, position_valuename, 0, REG_DWORD, - (CONST BYTE*)(&list->patterns[i].position), 4); + (const BYTE*)&list->patterns[i].position, 4); if (res == ERROR_SUCCESS) res = RegSetValueExA(pattern_key, pattern_valuename, 0, REG_BINARY, list->patterns[i].pattern, @@ -322,7 +322,7 @@ list->patterns[i].length); if (res == ERROR_SUCCESS) res = RegSetValueExA(pattern_key, endofstream_valuename, 0, REG_DWORD, - (CONST BYTE*)&(list->patterns[i].endofstream), 4); + (const BYTE*)&list->patterns[i].endofstream, 4); RegCloseKey(pattern_key); } RegCloseKey(patterns_key); @@ -433,21 +433,21 @@ KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL); if (res == ERROR_SUCCESS) { res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ, - (CONST BYTE*)(buf), 78); + (const BYTE*)buf, 78); RegCloseKey(instance_clsid_key); } if (res != ERROR_SUCCESS) goto error_close_clsid_key; if (list->author) { res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ, - (CONST BYTE*)(list->author), + (const BYTE*)list->author, strlen(list->author) + 1); if (res != ERROR_SUCCESS) goto error_close_clsid_key; } if (list->friendlyname) { res = RegSetValueExA(clsid_key, friendlyname_valuename, 0, REG_SZ, - (CONST BYTE*)(list->friendlyname), + (const BYTE*)list->friendlyname, strlen(list->friendlyname) + 1); if (res != ERROR_SUCCESS) goto error_close_clsid_key; } @@ -455,34 +455,34 @@ if (list->vendor) { StringFromGUID2(list->vendor, buf, 39); res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ, - (CONST BYTE*)(buf), 78); + (const BYTE*)buf, 78); if (res != ERROR_SUCCESS) goto error_close_clsid_key; } if (list->container_format) { StringFromGUID2(list->container_format, buf, 39); res = RegSetValueExW(clsid_key, containerformat_valuename, 0, REG_SZ, - (CONST BYTE*)(buf), 78); + (const BYTE*)buf, 78); if (res != ERROR_SUCCESS) goto error_close_clsid_key; } if (list->version) { res = RegSetValueExA(clsid_key, version_valuename, 0, REG_SZ, - (CONST BYTE*)(list->version), + (const BYTE*)list->version, strlen(list->version) + 1); if (res != ERROR_SUCCESS) goto error_close_clsid_key; } if (list->mimetypes) { res = RegSetValueExA(clsid_key, mimetypes_valuename, 0, REG_SZ, - (CONST BYTE*)(list->mimetypes), + (const BYTE*)list->mimetypes, strlen(list->mimetypes) + 1); if (res != ERROR_SUCCESS) goto error_close_clsid_key; } if (list->extensions) { res = RegSetValueExA(clsid_key, extensions_valuename, 0, REG_SZ, - (CONST BYTE*)(list->extensions), + (const BYTE*)list->extensions, strlen(list->extensions) + 1); if (res != ERROR_SUCCESS) goto error_close_clsid_key; } @@ -611,21 +611,21 @@ KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL); if (res == ERROR_SUCCESS) { res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ, - (CONST BYTE*)(buf), 78); + (const BYTE*)buf, 78); RegCloseKey(instance_clsid_key); } if (res != ERROR_SUCCESS) goto error_close_clsid_key; if (list->author) { res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ, - (CONST BYTE*)(list->author), + (const BYTE*)list->author, strlen(list->author) + 1); if (res != ERROR_SUCCESS) goto error_close_clsid_key; } if (list->friendlyname) { res = RegSetValueExA(clsid_key, friendlyname_valuename, 0, REG_SZ, - (CONST BYTE*)(list->friendlyname), + (const BYTE*)list->friendlyname, strlen(list->friendlyname) + 1); if (res != ERROR_SUCCESS) goto error_close_clsid_key; } @@ -633,13 +633,13 @@ if (list->vendor) { StringFromGUID2(list->vendor, buf, 39); res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ, - (CONST BYTE*)(buf), 78); + (const BYTE*)buf, 78); if (res != ERROR_SUCCESS) goto error_close_clsid_key; } if (list->version) { res = RegSetValueExA(clsid_key, version_valuename, 0, REG_SZ, - (CONST BYTE*)(list->version), + (const BYTE*)list->version, strlen(list->version) + 1); if (res != ERROR_SUCCESS) goto error_close_clsid_key; } @@ -768,21 +768,21 @@ KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL); if (res == ERROR_SUCCESS) { res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ, - (CONST BYTE*)(buf), 78); + (const BYTE*)buf, 78); RegCloseKey(instance_clsid_key); } if (res != ERROR_SUCCESS) goto error_close_clsid_key; if (list->author) { res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ, - (CONST BYTE*)(list->author), + (const BYTE*)list->author, strlen(list->author) + 1); if (res != ERROR_SUCCESS) goto error_close_clsid_key; } if (list->friendlyname) { res = RegSetValueExA(clsid_key, friendlyname_valuename, 0, REG_SZ, - (CONST BYTE*)(list->friendlyname), + (const BYTE*)list->friendlyname, strlen(list->friendlyname) + 1); if (res != ERROR_SUCCESS) goto error_close_clsid_key; } @@ -790,42 +790,42 @@ if (list->vendor) { StringFromGUID2(list->vendor, buf, 39); res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ, - (CONST BYTE*)(buf), 78); + (const BYTE*)buf, 78); if (res != ERROR_SUCCESS) goto error_close_clsid_key; } if (list->metadata_format) { StringFromGUID2(list->metadata_format, buf, 39); res = RegSetValueExW(clsid_key, metadataformat_valuename, 0, REG_SZ, - (CONST BYTE*)(buf), 78); + (const BYTE*)buf, 78); if (res != ERROR_SUCCESS) goto error_close_clsid_key; } if (list->version) { res = RegSetValueExA(clsid_key, version_valuename, 0, REG_SZ, - (CONST BYTE*)(list->version), + (const BYTE*)list->version, strlen(list->version) + 1); if (res != ERROR_SUCCESS) goto error_close_clsid_key; } if (list->specversion) { res = RegSetValueExA(clsid_key, specversion_valuename, 0, REG_SZ, - (CONST BYTE*)(list->version), + (const BYTE*)list->version, strlen(list->version) + 1); if (res != ERROR_SUCCESS) goto error_close_clsid_key; } res = RegSetValueExA(clsid_key, requiresfullstream_valuename, 0, REG_DWORD, - (CONST BYTE*)(&list->requires_fullstream), 4); + (const BYTE*)&list->requires_fullstream, 4); if (res != ERROR_SUCCESS) goto error_close_clsid_key; res = RegSetValueExA(clsid_key, supportspadding_valuename, 0, REG_DWORD, - (CONST BYTE*)(&list->supports_padding), 4); + (const BYTE*)&list->supports_padding, 4); if (res != ERROR_SUCCESS) goto error_close_clsid_key; if (list->requires_fixedsize) { res = RegSetValueExA(clsid_key, requiresfixedsize_valuename, 0, REG_DWORD, - (CONST BYTE*)(&list->requires_fixedsize), 4); + (const BYTE*)&list->requires_fixedsize, 4); if (res != ERROR_SUCCESS) goto error_close_clsid_key; } @@ -854,7 +854,7 @@ KEY_READ | KEY_WRITE, NULL, &pattern_key, NULL); if (res != ERROR_SUCCESS) break; res = RegSetValueExA(pattern_key, position_valuename, 0, REG_DWORD, - (CONST BYTE*)(&container->patterns[i].position), 4); + (const BYTE*)&container->patterns[i].position, 4); if (res == ERROR_SUCCESS) res = RegSetValueExA(pattern_key, pattern_valuename, 0, REG_BINARY, container->patterns[i].pattern, @@ -865,7 +865,7 @@ container->patterns[i].length); if (res == ERROR_SUCCESS && container->patterns[i].data_offset) res = RegSetValueExA(pattern_key, dataoffset_valuename, 0, REG_DWORD, - (CONST BYTE*)&(container->patterns[i].data_offset), 4); + (const BYTE*)&container->patterns[i].data_offset, 4); RegCloseKey(pattern_key); } @@ -978,21 +978,21 @@ KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL); if (res == ERROR_SUCCESS) { res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ, - (CONST BYTE*)(buf), 78); + (const BYTE*)buf, 78); RegCloseKey(instance_clsid_key); } if (res != ERROR_SUCCESS) goto error_close_clsid_key; if (list->author) { res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ, - (CONST BYTE*)(list->author), + (const BYTE*)list->author, strlen(list->author) + 1); if (res != ERROR_SUCCESS) goto error_close_clsid_key; } if (list->friendlyname) { res = RegSetValueExA(clsid_key, friendlyname_valuename, 0, REG_SZ, - (CONST BYTE*)(list->friendlyname), + (const BYTE*)list->friendlyname, strlen(list->friendlyname) + 1); if (res != ERROR_SUCCESS) goto error_close_clsid_key; } @@ -1000,31 +1000,31 @@ if (list->vendor) { StringFromGUID2(list->vendor, buf, 39); res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ, - (CONST BYTE*)(buf), 78); + (const BYTE*)buf, 78); if (res != ERROR_SUCCESS) goto error_close_clsid_key; } if (list->version) { res = RegSetValueExA(clsid_key, version_valuename, 0, REG_SZ, - (CONST BYTE*)(list->version), + (const BYTE*)list->version, strlen(list->version) + 1); if (res != ERROR_SUCCESS) goto error_close_clsid_key; } res = RegSetValueExA(clsid_key, bitsperpixel_valuename, 0, REG_DWORD, - (CONST BYTE*)(&list->bitsperpixel), 4); + (const BYTE*)&list->bitsperpixel, 4); if (res != ERROR_SUCCESS) goto error_close_clsid_key; res = RegSetValueExA(clsid_key, channelcount_valuename, 0, REG_DWORD, - (CONST BYTE*)(&list->channelcount), 4); + (const BYTE*)&list->channelcount, 4); if (res != ERROR_SUCCESS) goto error_close_clsid_key; res = RegSetValueExA(clsid_key, numericrepresentation_valuename, 0, REG_DWORD, - (CONST BYTE*)(&list->numericrepresentation), 4); + (const BYTE*)&list->numericrepresentation, 4); if (res != ERROR_SUCCESS) goto error_close_clsid_key; res = RegSetValueExA(clsid_key, supportstransparency_valuename, 0, REG_DWORD, - (CONST BYTE*)(&list->supportsalpha), 4); + (const BYTE*)&list->supportsalpha, 4); if (res != ERROR_SUCCESS) goto error_close_clsid_key; if (list->channelmasks) { Modified: trunk/reactos/dll/win32/windowscodecs/tgaformat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/tg…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/tgaformat.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/tgaformat.c [iso-8859-1] Thu Apr 24 12:12:56 2014 @@ -934,16 +934,14 @@ TgaDecoder_Frame_GetThumbnail }; -HRESULT TgaDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) +HRESULT TgaDecoder_CreateInstance(REFIID iid, void** ppv) { TgaDecoder *This; HRESULT ret; - TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv); + TRACE("(%s,%p)\n", debugstr_guid(iid), ppv); *ppv = NULL; - - if (pUnkOuter) return CLASS_E_NOAGGREGATION; This = HeapAlloc(GetProcessHeap(), 0, sizeof(TgaDecoder)); if (!This) return E_OUTOFMEMORY; Modified: trunk/reactos/dll/win32/windowscodecs/tiffformat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/ti…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/tiffformat.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/tiffformat.c [iso-8859-1] Thu Apr 24 12:12:56 2014 @@ -1279,16 +1279,14 @@ TiffFrameDecode_Block_GetEnumerator }; -HRESULT TiffDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) +HRESULT TiffDecoder_CreateInstance(REFIID iid, void** ppv) { HRESULT ret; TiffDecoder *This; - TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv); + TRACE("(%s,%p)\n", debugstr_guid(iid), ppv); *ppv = NULL; - - if (pUnkOuter) return CLASS_E_NOAGGREGATION; if (!load_libtiff()) { @@ -2023,16 +2021,14 @@ TiffEncoder_GetMetadataQueryWriter }; -HRESULT TiffEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) +HRESULT TiffEncoder_CreateInstance(REFIID iid, void** ppv) { TiffEncoder *This; HRESULT ret; - TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv); + TRACE("(%s,%p)\n", debugstr_guid(iid), ppv); *ppv = NULL; - - if (pUnkOuter) return CLASS_E_NOAGGREGATION; if (!load_libtiff()) { @@ -2062,13 +2058,13 @@ #else /* !SONAME_LIBTIFF */ -HRESULT TiffDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) +HRESULT TiffDecoder_CreateInstance(REFIID iid, void** ppv) { ERR("Trying to load TIFF picture, but Wine was compiled without TIFF support.\n"); return E_FAIL; } -HRESULT TiffEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) +HRESULT TiffEncoder_CreateInstance(REFIID iid, void** ppv) { ERR("Trying to save TIFF picture, but Wine was compiled without TIFF support.\n"); return E_FAIL; Modified: trunk/reactos/dll/win32/windowscodecs/wincodecs_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/wi…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/wincodecs_private.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/wincodecs_private.h [iso-8859-1] Thu Apr 24 12:12:56 2014 @@ -54,22 +54,61 @@ DEFINE_GUID(GUID_VendorWine, 0xddf46da1,0x7dc1,0x404e,0x98,0xf2,0xef,0xa4,0x8d,0xfc,0x95,0x0a); -extern HRESULT FormatConverter_CreateInstance(IUnknown *pUnkOuter, REFIID riid, void** ppv) DECLSPEC_HIDDEN; -extern HRESULT ComponentFactory_CreateInstance(IUnknown *pUnkOuter, REFIID riid, void** ppv) DECLSPEC_HIDDEN; -extern HRESULT BmpDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID riid, void** ppv) DECLSPEC_HIDDEN; -extern HRESULT PngDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN; -extern HRESULT PngEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN; -extern HRESULT BmpEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN; -extern HRESULT DibDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN; -extern HRESULT GifDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID riid, void** ppv) DECLSPEC_HIDDEN; -extern HRESULT IcoDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN; -extern HRESULT JpegDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN; -extern HRESULT JpegEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN; -extern HRESULT TiffDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN; -extern HRESULT TiffEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN; -extern HRESULT IcnsEncoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN; +DEFINE_GUID(IID_IMILBitmapSource,0x7543696a,0xbc8d,0x46b0,0x5f,0x81,0x8d,0x95,0x72,0x89,0x72,0xbe); +#define INTERFACE IMILBitmapSource +DECLARE_INTERFACE_(IMILBitmapSource,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID,void **) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IMILBitmapSource methods ***/ + STDMETHOD_(HRESULT,GetSize)(THIS_ UINT *,UINT *); + STDMETHOD_(HRESULT,GetPixelFormat)(THIS_ int *); + STDMETHOD_(HRESULT,GetResolution)(THIS_ double *,double *); + STDMETHOD_(HRESULT,CopyPalette)(THIS_ IWICPalette *); + STDMETHOD_(HRESULT,CopyPixels)(THIS_ const WICRect *,UINT,UINT,BYTE *); + STDMETHOD_(HRESULT,UnknownMethod1)(THIS_ void **); +}; +#undef INTERFACE -extern HRESULT TgaDecoder_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN; +#define INTERFACE IMILUnknown1 +DECLARE_INTERFACE_(IMILUnknown1,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID,void **) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; +}; +#undef INTERFACE + +#define INTERFACE IMILUnknown2 +DECLARE_INTERFACE_(IMILUnknown2,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID,void **) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** unknown methods ***/ + STDMETHOD_(HRESULT,UnknownMethod1)(THIS_ void *, void *) PURE; +}; +#undef INTERFACE + +extern HRESULT FormatConverter_CreateInstance(REFIID riid, void** ppv) DECLSPEC_HIDDEN; +extern HRESULT ComponentFactory_CreateInstance(REFIID riid, void** ppv) DECLSPEC_HIDDEN; +extern HRESULT BmpDecoder_CreateInstance(REFIID riid, void** ppv) DECLSPEC_HIDDEN; +extern HRESULT PngDecoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN; +extern HRESULT PngEncoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN; +extern HRESULT BmpEncoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN; +extern HRESULT DibDecoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN; +extern HRESULT GifDecoder_CreateInstance(REFIID riid, void** ppv) DECLSPEC_HIDDEN; +extern HRESULT IcoDecoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN; +extern HRESULT JpegDecoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN; +extern HRESULT JpegEncoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN; +extern HRESULT TiffDecoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN; +extern HRESULT TiffEncoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN; +extern HRESULT IcnsEncoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN; +extern HRESULT TgaDecoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN; extern HRESULT BitmapImpl_Create(UINT uiWidth, UINT uiHeight, UINT stride, UINT datasize, BYTE *bits, @@ -122,16 +161,16 @@ ULARGE_INTEGER *size); } MetadataHandlerVtbl; -extern HRESULT MetadataReader_Create(const MetadataHandlerVtbl *vtable, IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN; +extern HRESULT MetadataReader_Create(const MetadataHandlerVtbl *vtable, REFIID iid, void** ppv) DECLSPEC_HIDDEN; -extern HRESULT UnknownMetadataReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN; -extern HRESULT IfdMetadataReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) DECLSPEC_HIDDEN; -extern HRESULT PngTextReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void** ppv) DECLSPEC_HIDDEN; -extern HRESULT LSDReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) DECLSPEC_HIDDEN; -extern HRESULT IMDReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) DECLSPEC_HIDDEN; -extern HRESULT GCEReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) DECLSPEC_HIDDEN; -extern HRESULT APEReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) DECLSPEC_HIDDEN; -extern HRESULT GifCommentReader_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void **ppv) DECLSPEC_HIDDEN; +extern HRESULT UnknownMetadataReader_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN; +extern HRESULT IfdMetadataReader_CreateInstance(REFIID iid, void **ppv) DECLSPEC_HIDDEN; +extern HRESULT PngTextReader_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN; +extern HRESULT LSDReader_CreateInstance(REFIID iid, void **ppv) DECLSPEC_HIDDEN; +extern HRESULT IMDReader_CreateInstance(REFIID iid, void **ppv) DECLSPEC_HIDDEN; +extern HRESULT GCEReader_CreateInstance(REFIID iid, void **ppv) DECLSPEC_HIDDEN; +extern HRESULT APEReader_CreateInstance(REFIID iid, void **ppv) DECLSPEC_HIDDEN; +extern HRESULT GifCommentReader_CreateInstance(REFIID iid, void **ppv) DECLSPEC_HIDDEN; extern HRESULT stream_initialize_from_filehandle(IWICStream *iface, HANDLE hfile) DECLSPEC_HIDDEN; Modified: trunk/reactos/dll/win32/windowscodecs/windowscodecs.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/wi…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/windowscodecs.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/windowscodecs.spec [iso-8859-1] Thu Apr 24 12:12:56 2014 @@ -4,7 +4,7 @@ @ stdcall -private DllUnregisterServer() @ stub IEnumString_Next_WIC_Proxy @ stub IEnumString_Reset_WIC_Proxy -@ stub IPropertyBag2_Write_Proxy +@ stdcall IPropertyBag2_Write_Proxy(ptr long ptr ptr) @ stdcall IWICBitmapClipper_Initialize_Proxy(ptr ptr ptr) IWICBitmapClipper_Initialize_Proxy_W @ stdcall IWICBitmapCodecInfo_DoesSupportAnimation_Proxy(ptr ptr) IWICBitmapCodecInfo_DoesSupportAnimation_Proxy_W @ stdcall IWICBitmapCodecInfo_DoesSupportLossless_Proxy(ptr ptr) IWICBitmapCodecInfo_DoesSupportLossless_Proxy_W @@ -114,4 +114,4 @@ @ stub WICMapShortNameToGuid @ stub WICMatchMetadataContent @ stub WICSerializeMetadataContent -@ stub WICSetEncoderFormat_Proxy +@ stdcall WICSetEncoderFormat_Proxy(ptr ptr ptr ptr) Modified: trunk/reactos/dll/win32/windowscodecs/windowscodecs_wincodec.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/wi…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/windowscodecs_wincodec.idl [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/windowscodecs_wincodec.idl [iso-8859-1] Thu Apr 24 12:12:56 2014 @@ -15,6 +15,9 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ + +#pragma makedep proxy +#pragma makedep register #include "wincodec.idl" 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] Thu Apr 24 12:12:56 2014 @@ -203,7 +203,7 @@ reactos/dll/win32/wbemdisp # Synced to Wine-1.7.17 reactos/dll/win32/wbemprox # Synced to Wine-1.7.2 reactos/dll/win32/wer # Autosync -reactos/dll/win32/windowscodecs # Synced to Wine-1.7.1 +reactos/dll/win32/windowscodecs # Synced to Wine-1.7.17 reactos/dll/win32/windowscodecsext # Synced to Wine-1.7.1 reactos/dll/win32/winemp3.acm # Synced to Wine-1.7.1 reactos/dll/win32/wing32 # Out of sync
10 years, 8 months
1
0
0
0
[dquintana] 62935: [RSHELL] * Prevent the focused window from receiving keyboard events while a shell menu is open. CORE-7586
by dquintana@svn.reactos.org
Author: dquintana Date: Thu Apr 24 11:25:46 2014 New Revision: 62935 URL:
http://svn.reactos.org/svn/reactos?rev=62935&view=rev
Log: [RSHELL] * Prevent the focused window from receiving keyboard events while a shell menu is open. CORE-7586 Modified: branches/shell-experiments/base/shell/rshell/CMenuBand.cpp branches/shell-experiments/base/shell/rshell/CMenuFocusManager.cpp branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp branches/shell-experiments/base/shell/rshell/CMenuToolbars.h Modified: branches/shell-experiments/base/shell/rshell/CMenuBand.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMenuBand.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMenuBand.cpp [iso-8859-1] Thu Apr 24 11:25:46 2014 @@ -868,6 +868,10 @@ switch (changeType) { + case MPOS_EXECUTE: + m_hotBar->ExecuteItem(m_hotItem); + break; + case MPOS_SELECTLEFT: if (m_parentBand && m_parentBand->_IsPopup()==S_FALSE) return m_parentBand->_MenuItemHotTrack(VK_LEFT); Modified: branches/shell-experiments/base/shell/rshell/CMenuFocusManager.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMenuFocusManager.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMenuFocusManager.cpp [iso-8859-1] Thu Apr 24 11:25:46 2014 @@ -442,6 +442,9 @@ case VK_RMENU: m_current->mb->_MenuItemHotTrack(MPOS_FULLCANCEL); break; + case VK_RETURN: + m_current->mb->_MenuItemHotTrack(MPOS_EXECUTE); + break; case VK_LEFT: m_current->mb->_MenuItemHotTrack(VK_LEFT); break; @@ -455,6 +458,9 @@ m_current->mb->_MenuItemHotTrack(VK_DOWN); break; } + msg->message = WM_NULL; + msg->lParam = 0; + msg->wParam = 0; } break; } Modified: branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp [iso-8859-1] Thu Apr 24 11:25:46 2014 @@ -814,9 +814,16 @@ *theResult = 0; + INT iItem = (INT)wParam; + + return ExecuteItem(iItem); +} + +HRESULT CMenuToolbarBase::ExecuteItem(INT iItem) +{ m_menuBand->_KillPopupTimers(); - if (PopupItem(wParam) == S_OK) + if (PopupItem(iItem) == S_OK) { TRACE("PopupItem returned S_OK\n"); return S_FALSE; @@ -829,7 +836,6 @@ if (FAILED_UNEXPECTEDLY(hr)) return hr; - INT iItem = wParam; INT index; DWORD_PTR data; Modified: branches/shell-experiments/base/shell/rshell/CMenuToolbars.h URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMenuToolbars.h [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMenuToolbars.h [iso-8859-1] Thu Apr 24 11:25:46 2014 @@ -76,6 +76,8 @@ HRESULT TrackContextMenu(IContextMenu* contextMenu, POINT pt); HRESULT KeyboardItemChange(DWORD changeType); + + HRESULT ExecuteItem(INT iItem); HRESULT IsTrackedItem(INT index); HRESULT ChangeTrackedItem(INT index, BOOL wasTracking, BOOL mouse);
10 years, 8 months
1
0
0
0
[pschweitzer] 62934: [KMTESTS:IO] Add tests for IoCreateFile for target directory open. They will fail on ReactOS.
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Wed Apr 23 19:44:03 2014 New Revision: 62934 URL:
http://svn.reactos.org/svn/reactos?rev=62934&view=rev
Log: [KMTESTS:IO] Add tests for IoCreateFile for target directory open. They will fail on ReactOS. Added: trunk/rostests/kmtests/ntos_io/IoCreateFile.c (with props) Modified: trunk/rostests/kmtests/CMakeLists.txt trunk/rostests/kmtests/kmtest_drv/testlist.c Modified: trunk/rostests/kmtests/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/CMakeLists.txt?re…
============================================================================== --- trunk/rostests/kmtests/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/kmtests/CMakeLists.txt [iso-8859-1] Wed Apr 23 19:44:03 2014 @@ -47,6 +47,7 @@ ntos_fsrtl/FsRtlExpression.c ntos_fsrtl/FsRtlMcb.c ntos_fsrtl/FsRtlTunnel.c + ntos_io/IoCreateFile.c ntos_io/IoDeviceInterface.c ntos_io/IoEvent.c ntos_io/IoInterrupt.c Modified: trunk/rostests/kmtests/kmtest_drv/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/kmtest_drv/testli…
============================================================================== --- trunk/rostests/kmtests/kmtest_drv/testlist.c [iso-8859-1] (original) +++ trunk/rostests/kmtests/kmtest_drv/testlist.c [iso-8859-1] Wed Apr 23 19:44:03 2014 @@ -22,6 +22,7 @@ KMT_TESTFUNC Test_FsRtlExpression; KMT_TESTFUNC Test_FsRtlMcb; KMT_TESTFUNC Test_FsRtlTunnel; +KMT_TESTFUNC Test_IoCreateFile; KMT_TESTFUNC Test_IoDeviceInterface; KMT_TESTFUNC Test_IoEvent; KMT_TESTFUNC Test_IoInterrupt; @@ -78,6 +79,7 @@ /* Skipped on testman. See ROSTESTS-106. */ { "-FsRtlMcb", Test_FsRtlMcb }, { "-FsRtlTunnel", Test_FsRtlTunnel }, + { "IoCreateFile", Test_IoCreateFile }, { "IoDeviceInterface", Test_IoDeviceInterface }, { "IoEvent", Test_IoEvent }, { "IoInterrupt", Test_IoInterrupt }, Added: trunk/rostests/kmtests/ntos_io/IoCreateFile.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/ntos_io/IoCreateF…
============================================================================== --- trunk/rostests/kmtests/ntos_io/IoCreateFile.c (added) +++ trunk/rostests/kmtests/ntos_io/IoCreateFile.c [iso-8859-1] Wed Apr 23 19:44:03 2014 @@ -0,0 +1,521 @@ +/* + * PROJECT: ReactOS kernel-mode tests + * LICENSE: LGPLv2+ - See COPYING.LIB in the top level directory + * PURPOSE: Kernel-Mode Test Suite Io Regressions KM-Test (IoCreateFile) + * PROGRAMMER: Pierre Schweitzer <pierre(a)reactos.org> + */ + +#include <kmt_test.h> + +static UNICODE_STRING SystemRoot = RTL_CONSTANT_STRING(L"\\SystemRoot\\"); +static UNICODE_STRING Regedit = RTL_CONSTANT_STRING(L"regedit.exe"); +static UNICODE_STRING Foobar = RTL_CONSTANT_STRING(L"foobar.exe"); +static UNICODE_STRING SystemRootRegedit = RTL_CONSTANT_STRING(L"\\SystemRoot\\regedit.exe"); +static UNICODE_STRING SystemRootFoobar = RTL_CONSTANT_STRING(L"\\SystemRoot\\foobar.exe"); +static UNICODE_STRING SystemRootFoobarFoobar = RTL_CONSTANT_STRING(L"\\SystemRoot\\foobar\\foobar.exe"); +static UNICODE_STRING FoobarFoobar = RTL_CONSTANT_STRING(L"foobar\\foobar.exe"); + +static +VOID +NTAPI +KernelModeTest(IN PVOID Context) +{ + NTSTATUS Status; + IO_STATUS_BLOCK IoStatusBlock; + OBJECT_ATTRIBUTES ObjectAttributes; + PFILE_OBJECT ParentFileObject, TargetFileObject; + HANDLE ParentHandle, SystemRootHandle, TargetHandle; + + UNREFERENCED_PARAMETER(Context); + + /* Kernelmode mandatory for IoCreateFile */ + ok(ExGetPreviousMode() == KernelMode, "UserMode returned!\n"); + + /* First of all, open \\SystemRoot + * We're interested in 3 pieces of information about it: + * -> Its target (it's a symlink): \Windows or \ReactOS + * -> Its associated File Object + * -> Its associated FCB + */ + TargetFileObject = NULL; + IoStatusBlock.Status = 0xFFFFFFFF; + TargetHandle = INVALID_HANDLE_VALUE; + IoStatusBlock.Information = 0xFFFFFFFF; + InitializeObjectAttributes(&ObjectAttributes, + &SystemRoot, + OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, + NULL, NULL); + Status = ZwOpenFile(&TargetHandle, + GENERIC_WRITE | GENERIC_READ | SYNCHRONIZE, + &ObjectAttributes, + &IoStatusBlock, + FILE_SHARE_READ | FILE_SHARE_WRITE, + FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT); + ok_eq_hex(Status, STATUS_SUCCESS); + ok_eq_hex(IoStatusBlock.Status, STATUS_SUCCESS); + if (Status == STATUS_SUCCESS) + { + Status = ObReferenceObjectByHandle(TargetHandle, + FILE_READ_DATA, + IoFileObjectType, + KernelMode, + (PVOID *)&TargetFileObject, + NULL); + ok_eq_hex(Status, STATUS_SUCCESS); + } + + ok(TargetFileObject != NULL, "Not target to continue!\n"); + if (TargetFileObject == NULL) + { + if (TargetHandle != INVALID_HANDLE_VALUE) + { + ObCloseHandle(TargetHandle, KernelMode); + } + return; + } + + /* Open target directory of \SystemRoot\Regedit.exe + * This must lead to \SystemRoot opening + */ + IoStatusBlock.Status = 0xFFFFFFFF; + IoStatusBlock.Information = 0xFFFFFFFF; + InitializeObjectAttributes(&ObjectAttributes, + &SystemRootRegedit, + OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, + NULL, NULL); + Status = IoCreateFile(&ParentHandle, + GENERIC_WRITE | GENERIC_READ | SYNCHRONIZE, + &ObjectAttributes, + &IoStatusBlock, + NULL, + 0, + FILE_SHARE_READ | FILE_SHARE_WRITE, + FILE_OPEN, + FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT, + NULL, + 0, + CreateFileTypeNone, + NULL, + IO_OPEN_TARGET_DIRECTORY); + ok_eq_hex(Status, STATUS_SUCCESS); + ok_eq_hex(IoStatusBlock.Status, STATUS_SUCCESS); + if (Status == STATUS_SUCCESS) + { + Status = ObReferenceObjectByHandle(ParentHandle, + FILE_READ_DATA, + IoFileObjectType, + KernelMode, + (PVOID *)&ParentFileObject, + NULL); + ok_eq_hex(Status, STATUS_SUCCESS); + if (Status == STATUS_SUCCESS) + { + /* At that point, file object must point to \SystemRoot + * But must not be the same FO than target (diverted file object) + * This means FCB & FileName are equal + * But CCB & FO are different + * CCB must be != NULL, otherwise it means open failed + */ + ok(ParentFileObject != TargetFileObject, "Diverted file object must be different\n"); + ok_eq_pointer(ParentFileObject->FsContext, TargetFileObject->FsContext); + ok(ParentFileObject->FsContext2 != 0x0, "Parent must be open!\n"); + ok(ParentFileObject->FsContext2 != TargetFileObject->FsContext2, "Parent open must have its own context!\n"); + ok_eq_long(RtlCompareUnicodeString(&ParentFileObject->FileName, &TargetFileObject->FileName, FALSE), 0); + ObDereferenceObject(ParentFileObject); + } + /* Because target exists FSD must signal it */ + ok_eq_long(IoStatusBlock.Information, FILE_EXISTS); + ObCloseHandle(ParentHandle, KernelMode); + } + + /* Do the same with relative open */ + IoStatusBlock.Status = 0xFFFFFFFF; + IoStatusBlock.Information = 0xFFFFFFFF; + InitializeObjectAttributes(&ObjectAttributes, + &SystemRoot, + OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, + NULL, NULL); + Status = ZwOpenFile(&SystemRootHandle, + GENERIC_WRITE | GENERIC_READ | SYNCHRONIZE, + &ObjectAttributes, + &IoStatusBlock, + FILE_SHARE_READ | FILE_SHARE_WRITE, + FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT); + ok_eq_hex(Status, STATUS_SUCCESS); + ok_eq_hex(IoStatusBlock.Status, STATUS_SUCCESS); + if (Status == STATUS_SUCCESS) + { + IoStatusBlock.Status = 0xFFFFFFFF; + IoStatusBlock.Information = 0xFFFFFFFF; + InitializeObjectAttributes(&ObjectAttributes, + &Regedit, + OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, + SystemRootHandle, + NULL); + Status = IoCreateFile(&ParentHandle, + GENERIC_WRITE | GENERIC_READ | SYNCHRONIZE, + &ObjectAttributes, + &IoStatusBlock, + NULL, + 0, + FILE_SHARE_READ | FILE_SHARE_WRITE, + FILE_OPEN, + FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT, + NULL, + 0, + CreateFileTypeNone, + NULL, + IO_OPEN_TARGET_DIRECTORY); + ok_eq_hex(Status, STATUS_SUCCESS); + ok_eq_hex(IoStatusBlock.Status, STATUS_SUCCESS); + if (Status == STATUS_SUCCESS) + { + Status = ObReferenceObjectByHandle(ParentHandle, + FILE_READ_DATA, + IoFileObjectType, + KernelMode, + (PVOID *)&ParentFileObject, + NULL); + ok_eq_hex(Status, STATUS_SUCCESS); + if (Status == STATUS_SUCCESS) + { + ok(ParentFileObject != TargetFileObject, "Diverted file object must be different\n"); + ok_eq_pointer(ParentFileObject->FsContext, TargetFileObject->FsContext); + ok(ParentFileObject->FsContext2 != 0x0, "Parent must be open!\n"); + ok(ParentFileObject->FsContext2 != TargetFileObject->FsContext2, "Parent open must have its own context!\n"); + ok_eq_long(RtlCompareUnicodeString(&ParentFileObject->FileName, &TargetFileObject->FileName, FALSE), 0); + ObDereferenceObject(ParentFileObject); + } + ok_eq_long(IoStatusBlock.Information, FILE_EXISTS); + ObCloseHandle(ParentHandle, KernelMode); + } + ObCloseHandle(SystemRootHandle, KernelMode); + } + + /* *** */ + + /* Now redo the same scheme, but using a target that doesn't exist + * The difference will be in IoStatusBlock.Information, the FSD will + * inform that the target doesn't exist. + * Clear for rename :-) + */ + IoStatusBlock.Status = 0xFFFFFFFF; + IoStatusBlock.Information = 0xFFFFFFFF; + InitializeObjectAttributes(&ObjectAttributes, + &SystemRootFoobar, + OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, + NULL, NULL); + Status = IoCreateFile(&ParentHandle, + GENERIC_WRITE | GENERIC_READ | SYNCHRONIZE, + &ObjectAttributes, + &IoStatusBlock, + NULL, + 0, + FILE_SHARE_READ | FILE_SHARE_WRITE, + FILE_OPEN, + FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT, + NULL, + 0, + CreateFileTypeNone, + NULL, + IO_OPEN_TARGET_DIRECTORY); + ok_eq_hex(Status, STATUS_SUCCESS); + ok_eq_hex(IoStatusBlock.Status, STATUS_SUCCESS); + if (Status == STATUS_SUCCESS) + { + Status = ObReferenceObjectByHandle(ParentHandle, + FILE_READ_DATA, + IoFileObjectType, + KernelMode, + (PVOID *)&ParentFileObject, + NULL); + ok_eq_hex(Status, STATUS_SUCCESS); + if (Status == STATUS_SUCCESS) + { + ok(ParentFileObject != TargetFileObject, "Diverted file object must be different\n"); + ok_eq_pointer(ParentFileObject->FsContext, TargetFileObject->FsContext); + ok(ParentFileObject->FsContext2 != 0x0, "Parent must be open!\n"); + ok(ParentFileObject->FsContext2 != TargetFileObject->FsContext2, "Parent open must have its own context!\n"); + ok_eq_long(RtlCompareUnicodeString(&ParentFileObject->FileName, &TargetFileObject->FileName, FALSE), 0); + ObDereferenceObject(ParentFileObject); + } + ok_eq_long(IoStatusBlock.Information, FILE_DOES_NOT_EXIST); + ObCloseHandle(ParentHandle, KernelMode); + } + + IoStatusBlock.Status = 0xFFFFFFFF; + IoStatusBlock.Information = 0xFFFFFFFF; + InitializeObjectAttributes(&ObjectAttributes, + &SystemRoot, + OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, + NULL, NULL); + Status = ZwOpenFile(&SystemRootHandle, + GENERIC_WRITE | GENERIC_READ | SYNCHRONIZE, + &ObjectAttributes, + &IoStatusBlock, + FILE_SHARE_READ | FILE_SHARE_WRITE, + FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT); + ok_eq_hex(Status, STATUS_SUCCESS); + ok_eq_hex(IoStatusBlock.Status, STATUS_SUCCESS); + if (Status == STATUS_SUCCESS) + { + IoStatusBlock.Status = 0xFFFFFFFF; + IoStatusBlock.Information = 0xFFFFFFFF; + InitializeObjectAttributes(&ObjectAttributes, + &Foobar, + OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, + SystemRootHandle, + NULL); + Status = IoCreateFile(&ParentHandle, + GENERIC_WRITE | GENERIC_READ | SYNCHRONIZE, + &ObjectAttributes, + &IoStatusBlock, + NULL, + 0, + FILE_SHARE_READ | FILE_SHARE_WRITE, + FILE_OPEN, + FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT, + NULL, + 0, + CreateFileTypeNone, + NULL, + IO_OPEN_TARGET_DIRECTORY); + ok_eq_hex(Status, STATUS_SUCCESS); + ok_eq_hex(IoStatusBlock.Status, STATUS_SUCCESS); + if (Status == STATUS_SUCCESS) + { + Status = ObReferenceObjectByHandle(ParentHandle, + FILE_READ_DATA, + IoFileObjectType, + KernelMode, + (PVOID *)&ParentFileObject, + NULL); + ok_eq_hex(Status, STATUS_SUCCESS); + if (Status == STATUS_SUCCESS) + { + ok(ParentFileObject != TargetFileObject, "Diverted file object must be different\n"); + ok_eq_pointer(ParentFileObject->FsContext, TargetFileObject->FsContext); + ok(ParentFileObject->FsContext2 != 0x0, "Parent must be open!\n"); + ok(ParentFileObject->FsContext2 != TargetFileObject->FsContext2, "Parent open must have its own context!\n"); + ok_eq_long(RtlCompareUnicodeString(&ParentFileObject->FileName, &TargetFileObject->FileName, FALSE), 0); + ObDereferenceObject(ParentFileObject); + } + ok_eq_long(IoStatusBlock.Information, FILE_DOES_NOT_EXIST); + ObCloseHandle(ParentHandle, KernelMode); + } + ObCloseHandle(SystemRootHandle, KernelMode); + } + + ObDereferenceObject(TargetFileObject); + ObCloseHandle(TargetHandle, KernelMode); + + /* *** */ + + /* Direct target open of something that doesn't exist */ + IoStatusBlock.Status = 0xFFFFFFFF; + IoStatusBlock.Information = 0xFFFFFFFF; + InitializeObjectAttributes(&ObjectAttributes, + &SystemRootFoobarFoobar, + OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, + NULL, NULL); + Status = IoCreateFile(&ParentHandle, + GENERIC_WRITE | GENERIC_READ | SYNCHRONIZE, + &ObjectAttributes, + &IoStatusBlock, + NULL, + 0, + FILE_SHARE_READ | FILE_SHARE_WRITE, + FILE_OPEN, + FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT, + NULL, + 0, + CreateFileTypeNone, + NULL, + IO_OPEN_TARGET_DIRECTORY); + ok_eq_hex(Status, STATUS_OBJECT_PATH_NOT_FOUND); + ok_eq_hex(IoStatusBlock.Status, 0xFFFFFFFF); + if (Status == STATUS_SUCCESS) + { + ObCloseHandle(ParentHandle, KernelMode); + } + + /* Relative target open of something that doesn't exist */ + IoStatusBlock.Status = 0xFFFFFFFF; + IoStatusBlock.Information = 0xFFFFFFFF; + InitializeObjectAttributes(&ObjectAttributes, + &SystemRoot, + OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, + NULL, NULL); + Status = ZwOpenFile(&SystemRootHandle, + GENERIC_WRITE | GENERIC_READ | SYNCHRONIZE, + &ObjectAttributes, + &IoStatusBlock, + FILE_SHARE_READ | FILE_SHARE_WRITE, + FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT); + ok_eq_hex(Status, STATUS_SUCCESS); + ok_eq_hex(IoStatusBlock.Status, STATUS_SUCCESS); + if (Status == STATUS_SUCCESS) + { + IoStatusBlock.Status = 0xFFFFFFFF; + IoStatusBlock.Information = 0xFFFFFFFF; + InitializeObjectAttributes(&ObjectAttributes, + &FoobarFoobar, + OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, + SystemRootHandle, + NULL); + Status = IoCreateFile(&ParentHandle, + GENERIC_WRITE | GENERIC_READ | SYNCHRONIZE, + &ObjectAttributes, + &IoStatusBlock, + NULL, + 0, + FILE_SHARE_READ | FILE_SHARE_WRITE, + FILE_OPEN, + FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT, + NULL, + 0, + CreateFileTypeNone, + NULL, + IO_OPEN_TARGET_DIRECTORY); + ok_eq_hex(Status, STATUS_OBJECT_PATH_NOT_FOUND); + ok_eq_hex(IoStatusBlock.Status, 0xFFFFFFFF); + if (Status == STATUS_SUCCESS) + { + ObCloseHandle(ParentHandle, KernelMode); + } + ObCloseHandle(SystemRootHandle, KernelMode); + } +} + +static +VOID +NTAPI +UserModeTest(VOID) +{ + NTSTATUS Status; + IO_STATUS_BLOCK IoStatusBlock; + OBJECT_ATTRIBUTES ObjectAttributes; + HANDLE ParentHandle, SystemRootHandle; + + ok(ExGetPreviousMode() == UserMode, "KernelMode returned!\n"); + + /* Attempt direct target open */ + IoStatusBlock.Status = 0xFFFFFFFF; + IoStatusBlock.Information = 0xFFFFFFFF; + InitializeObjectAttributes(&ObjectAttributes, + &SystemRootRegedit, + OBJ_CASE_INSENSITIVE, + NULL, NULL); + Status = IoCreateFile(&ParentHandle, + GENERIC_WRITE | GENERIC_READ | SYNCHRONIZE, + &ObjectAttributes, + &IoStatusBlock, + NULL, + 0, + FILE_SHARE_READ | FILE_SHARE_WRITE, + FILE_OPEN, + FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT, + NULL, + 0, + CreateFileTypeNone, + NULL, + IO_OPEN_TARGET_DIRECTORY); + ok_eq_hex(Status, STATUS_ACCESS_VIOLATION); + ok_eq_hex(IoStatusBlock.Status, 0xFFFFFFFF); + if (Status == STATUS_SUCCESS) + { + ObCloseHandle(ParentHandle, KernelMode); + } + + /* Attempt relative target open */ + IoStatusBlock.Status = 0xFFFFFFFF; + IoStatusBlock.Information = 0xFFFFFFFF; + InitializeObjectAttributes(&ObjectAttributes, + &SystemRoot, + OBJ_CASE_INSENSITIVE, + NULL, NULL); + Status = ZwOpenFile(&SystemRootHandle, + GENERIC_WRITE | GENERIC_READ | SYNCHRONIZE, + &ObjectAttributes, + &IoStatusBlock, + FILE_SHARE_READ | FILE_SHARE_WRITE, + FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT); + ok_eq_hex(Status, STATUS_SUCCESS); + ok_eq_hex(IoStatusBlock.Status, STATUS_SUCCESS); + if (Status == STATUS_SUCCESS) + { + IoStatusBlock.Status = 0xFFFFFFFF; + IoStatusBlock.Information = 0xFFFFFFFF; + InitializeObjectAttributes(&ObjectAttributes, + &Regedit, + OBJ_CASE_INSENSITIVE, + SystemRootHandle, + NULL); + Status = IoCreateFile(&ParentHandle, + GENERIC_WRITE | GENERIC_READ | SYNCHRONIZE, + &ObjectAttributes, + &IoStatusBlock, + NULL, + 0, + FILE_SHARE_READ | FILE_SHARE_WRITE, + FILE_OPEN, + FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT, + NULL, + 0, + CreateFileTypeNone, + NULL, + IO_OPEN_TARGET_DIRECTORY); + ok_eq_hex(Status, STATUS_ACCESS_VIOLATION); + ok_eq_hex(IoStatusBlock.Status, 0xFFFFFFFF); + if (Status == STATUS_SUCCESS) + { + ObCloseHandle(ParentHandle, KernelMode); + } + ObCloseHandle(SystemRootHandle, KernelMode); + } +} + +START_TEST(IoCreateFile) +{ + NTSTATUS Status; + OBJECT_ATTRIBUTES ObjectAttributes; + HANDLE ThreadHandle; + PVOID ThreadObject = NULL; + + /* Justify the next comment/statement */ + UserModeTest(); + + /* We've to be in kernel mode, so spawn a thread */ + InitializeObjectAttributes(&ObjectAttributes, + NULL, + OBJ_KERNEL_HANDLE, + NULL, + NULL); + Status = PsCreateSystemThread(&ThreadHandle, + SYNCHRONIZE, + &ObjectAttributes, + NULL, + NULL, + KernelModeTest, + NULL); + ok_eq_hex(Status, STATUS_SUCCESS); + if (Status == STATUS_SUCCESS) + { + /* Then, just wait on our thread to finish */ + Status = ObReferenceObjectByHandle(ThreadHandle, + SYNCHRONIZE, + PsThreadType, + KernelMode, + &ThreadObject, + NULL); + ObCloseHandle(ThreadHandle, KernelMode); + + Status = KeWaitForSingleObject(ThreadObject, + Executive, + KernelMode, + FALSE, + NULL); + ok_eq_hex(Status, STATUS_SUCCESS); + ObDereferenceObject(ThreadObject); + } +} Propchange: trunk/rostests/kmtests/ntos_io/IoCreateFile.c ------------------------------------------------------------------------------ svn:eol-style = native
10 years, 8 months
1
0
0
0
[spetreolle] 62933: [CMAKE] Set types for variables we pass to cmake. Specifying no type makes them UNINITIALIZED and can cause values to be ignored. See https://www.mail-archive.com/cmake@cmake.or...
by spetreolle@svn.reactos.org
Author: spetreolle Date: Wed Apr 23 18:59:30 2014 New Revision: 62933 URL:
http://svn.reactos.org/svn/reactos?rev=62933&view=rev
Log: [CMAKE] Set types for variables we pass to cmake. Specifying no type makes them UNINITIALIZED and can cause values to be ignored. See
https://www.mail-archive.com/cmake@cmake.org/msg17305.html
for details. Modified: trunk/reactos/configure.cmd trunk/reactos/configure.sh Modified: trunk/reactos/configure.cmd URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/configure.cmd?rev=62933&r1…
============================================================================== --- trunk/reactos/configure.cmd [iso-8859-1] (original) +++ trunk/reactos/configure.cmd [iso-8859-1] Wed Apr 23 18:59:30 2014 @@ -15,7 +15,7 @@ call %2 x86 :: Configure host tools for x86 - cmake -G %3 -DARCH=i386 %~dp0 + cmake -G %3 -DARCH:STRING=i386 %~dp0 exit ) @@ -148,7 +148,7 @@ :: Launch new script instance for x86 host tools configuration start "Preparing host tools for ARM cross build..." /I /B /WAIT %~dp0configure.cmd arm_hosttools "%VSINSTALLDIR%VC\vcvarsall.bat" %CMAKE_GENERATOR% ) else ( - cmake -G %CMAKE_GENERATOR% -DARCH=%ARCH% "%REACTOS_SOURCE_DIR%" + cmake -G %CMAKE_GENERATOR% -DARCH:STRING=%ARCH% "%REACTOS_SOURCE_DIR%" ) cd.. @@ -160,11 +160,11 @@ ) if "%BUILD_ENVIRONMENT%" == "MinGW" ( - cmake -G %CMAKE_GENERATOR% -DENABLE_CCACHE=0 -DCMAKE_TOOLCHAIN_FILE=toolchain-gcc.cmake -DARCH=%ARCH% -DREACTOS_BUILD_TOOLS_DIR:DIR="%REACTOS_BUILD_TOOLS_DIR%" "%REACTOS_SOURCE_DIR%" + cmake -G %CMAKE_GENERATOR% -DENABLE_CCACHE:BOOL=0 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-gcc.cmake -DARCH:STRING=%ARCH% -DREACTOS_BUILD_TOOLS_DIR:PATH="%REACTOS_BUILD_TOOLS_DIR%" "%REACTOS_SOURCE_DIR%" ) else if "%BUILD_ENVIRONMENT%" == "Clang" ( - cmake -G %CMAKE_GENERATOR% -DENABLE_CCACHE=0 -DCMAKE_TOOLCHAIN_FILE=toolchain-clang.cmake -DARCH=%ARCH% -DREACTOS_BUILD_TOOLS_DIR:DIR="%REACTOS_BUILD_TOOLS_DIR%" "%REACTOS_SOURCE_DIR%" + cmake -G %CMAKE_GENERATOR% -DENABLE_CCACHE:BOOL=0 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-clang.cmake -DARCH:STRING=%ARCH% -DREACTOS_BUILD_TOOLS_DIR:PATH="%REACTOS_BUILD_TOOLS_DIR%" "%REACTOS_SOURCE_DIR%" ) else ( - cmake -G %CMAKE_GENERATOR% -DCMAKE_TOOLCHAIN_FILE=toolchain-msvc.cmake -DARCH=%ARCH% -DREACTOS_BUILD_TOOLS_DIR:DIR="%REACTOS_BUILD_TOOLS_DIR%" "%REACTOS_SOURCE_DIR%" + cmake -G %CMAKE_GENERATOR% -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-msvc.cmake -DARCH:STRING=%ARCH% -DREACTOS_BUILD_TOOLS_DIR:PATH="%REACTOS_BUILD_TOOLS_DIR%" "%REACTOS_SOURCE_DIR%" ) cd.. Modified: trunk/reactos/configure.sh URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/configure.sh?rev=62933&r1=…
============================================================================== --- trunk/reactos/configure.sh [iso-8859-1] (original) +++ trunk/reactos/configure.sh [iso-8859-1] Wed Apr 23 18:59:30 2014 @@ -53,12 +53,12 @@ rm -f CMakeCache.txt REACTOS_BUILD_TOOLS_DIR="$PWD" -cmake -G "$CMAKE_GENERATOR" -DARCH=$ARCH $ROS_CMAKEOPTS "$REACTOS_SOURCE_DIR" +cmake -G "$CMAKE_GENERATOR" -DARCH:STRING=$ARCH $ROS_CMAKEOPTS "$REACTOS_SOURCE_DIR" echo Preparing reactos... cd ../reactos rm -f CMakeCache.txt -cmake -G "$CMAKE_GENERATOR" -DENABLE_CCACHE=0 -DCMAKE_TOOLCHAIN_FILE=toolchain-gcc.cmake -DARCH=$ARCH -DREACTOS_BUILD_TOOLS_DIR="$REACTOS_BUILD_TOOLS_DIR" $ROS_CMAKEOPTS "$REACTOS_SOURCE_DIR" +cmake -G "$CMAKE_GENERATOR" -DENABLE_CCACHE:BOOL=1 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-gcc.cmake -DARCH:STRING=$ARCH -DREACTOS_BUILD_TOOLS_DIR:PATH="$REACTOS_BUILD_TOOLS_DIR" $ROS_CMAKEOPTS "$REACTOS_SOURCE_DIR" echo Configure script complete! Enter directories and execute appropriate build commands \(ex: ninja, make, makex, etc...\).
10 years, 8 months
1
0
0
0
[akhaldi] 62932: [VBSCRIPT_WINETEST] * Sync with Wine 1.7.17. CORE-8080
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Apr 23 18:06:48 2014 New Revision: 62932 URL:
http://svn.reactos.org/svn/reactos?rev=62932&view=rev
Log: [VBSCRIPT_WINETEST] * Sync with Wine 1.7.17. CORE-8080 Added: trunk/rostests/winetests/vbscript/error.vbs (with props) Modified: trunk/rostests/winetests/vbscript/CMakeLists.txt trunk/rostests/winetests/vbscript/createobj.c trunk/rostests/winetests/vbscript/lang.vbs trunk/rostests/winetests/vbscript/regexp.vbs trunk/rostests/winetests/vbscript/rsrc.rc trunk/rostests/winetests/vbscript/run.c Modified: trunk/rostests/winetests/vbscript/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/vbscript/CMakeL…
============================================================================== --- trunk/rostests/winetests/vbscript/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/winetests/vbscript/CMakeLists.txt [iso-8859-1] Wed Apr 23 18:06:48 2014 @@ -10,6 +10,7 @@ list(APPEND vbscript_winetest_rc_deps ${CMAKE_CURRENT_SOURCE_DIR}/api.vbs + ${CMAKE_CURRENT_SOURCE_DIR}/error.vbs ${CMAKE_CURRENT_SOURCE_DIR}/lang.vbs ${CMAKE_CURRENT_SOURCE_DIR}/regexp.vbs) Modified: trunk/rostests/winetests/vbscript/createobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/vbscript/create…
============================================================================== --- trunk/rostests/winetests/vbscript/createobj.c [iso-8859-1] (original) +++ trunk/rostests/winetests/vbscript/createobj.c [iso-8859-1] Wed Apr 23 18:06:48 2014 @@ -125,18 +125,6 @@ #define VB_E_CANNOT_CREATE_OBJ 0x800a01ad -static const char *debugstr_guid(REFIID riid) -{ - static char buf[50]; - - sprintf(buf, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", - riid->Data1, riid->Data2, riid->Data3, riid->Data4[0], - riid->Data4[1], riid->Data4[2], riid->Data4[3], riid->Data4[4], - riid->Data4[5], riid->Data4[6], riid->Data4[7]); - - return buf; -} - static BSTR a2bstr(const char *str) { BSTR ret; @@ -444,7 +432,7 @@ CHECK_EXPECT(CreateInstance); ok(!outer, "outer = %p\n", outer); - ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n", debugstr_guid(riid)); + ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n", wine_dbgstr_guid(riid)); if(SUCCEEDED(CreateInstance_hres)) *ppv = &testObj; @@ -500,7 +488,7 @@ ok(cbPolicy == sizeof(DWORD), "cbPolicy = %d\n", cbPolicy); ok(pContext != NULL, "pContext == NULL\n"); ok(cbContext == sizeof(GUID), "cbContext = %d\n", cbContext); - ok(IsEqualGUID(pContext, &CLSID_TestObj), "pContext = %s\n", debugstr_guid((const IID*)pContext)); + ok(IsEqualGUID(pContext, &CLSID_TestObj), "pContext = %s\n", wine_dbgstr_guid((const IID*)pContext)); ok(!dwFlags, "dwFlags = %x\n", dwFlags); ok(!dwReserved, "dwReserved = %x\n", dwReserved); @@ -517,7 +505,7 @@ CHECK_EXPECT(QueryCustomPolicy); - ok(IsEqualGUID(&GUID_CUSTOM_CONFIRMOBJECTSAFETY, guidKey), "guidKey = %s\n", debugstr_guid(guidKey)); + ok(IsEqualGUID(&GUID_CUSTOM_CONFIRMOBJECTSAFETY, guidKey), "guidKey = %s\n", wine_dbgstr_guid(guidKey)); ok(ppPolicy != NULL, "ppPolicy == NULL\n"); ok(pcbPolicy != NULL, "pcbPolicy == NULL\n"); @@ -582,13 +570,13 @@ CHECK_EXPECT(Host_QS_SecMgr); else CHECK_EXPECT(Caller_QS_SecMgr); - ok(IsEqualGUID(&IID_IInternetHostSecurityManager, riid), "unexpected riid %s\n", debugstr_guid(riid)); + ok(IsEqualGUID(&IID_IInternetHostSecurityManager, riid), "unexpected riid %s\n", wine_dbgstr_guid(riid)); if(SUCCEEDED(QS_SecMgr_hres)) *ppv = &InternetHostSecurityManager; return QS_SecMgr_hres; } - ok(0, "unexpected service %s\n", debugstr_guid(guidService)); + ok(0, "unexpected service %s\n", wine_dbgstr_guid(guidService)); return E_NOINTERFACE; } @@ -1008,7 +996,7 @@ SET_EXPECT(SetSite); SET_EXPECT(reportSuccess); hres = parse_script_ae(parser, "Call GetObject(\"clsid:" TESTOBJINST_CLSID "\").reportSuccess()"); - if(hres == 0x8007007e) { /* Workaround for broken win2k */ + if(hres == HRESULT_FROM_WIN32(ERROR_MOD_NOT_FOUND)) { /* Workaround for broken win2k */ win_skip("got unexpected error %08x\n", hres); CLEAR_CALLED(QI_IObjectWithSite); CLEAR_CALLED(SetSite); @@ -1016,6 +1004,7 @@ IActiveScriptParse_Release(parser); return; } + ok(hres == S_OK, "hres = %08x\n", hres); CHECK_CALLED(QI_IObjectWithSite); CHECK_CALLED(SetSite); CHECK_CALLED(reportSuccess); @@ -1050,7 +1039,7 @@ DWORD res; if(!init) { - RegDeleteKey(HKEY_CLASSES_ROOT, key_name); + RegDeleteKeyA(HKEY_CLASSES_ROOT, key_name); return TRUE; } @@ -1111,12 +1100,13 @@ CoInitialize(NULL); if(check_vbscript()) { - register_activex(); - - test_CreateObject(); - test_GetObject(); - - init_registry(FALSE); + if(register_activex()) { + test_CreateObject(); + test_GetObject(); + init_registry(FALSE); + }else { + skip("Could not register ActiveX object.\n"); + } }else { win_skip("Broken engine, probably too old\n"); } Added: trunk/rostests/winetests/vbscript/error.vbs URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/vbscript/error.…
============================================================================== --- trunk/rostests/winetests/vbscript/error.vbs (added) +++ trunk/rostests/winetests/vbscript/error.vbs [iso-8859-1] Wed Apr 23 18:06:48 2014 @@ -0,0 +1,374 @@ +' +' Copyright 2014 Jacek Caban for CodeWeavers +' +' 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 +' + +Option Explicit + +const E_TESTERROR = &h80080008& + +const VB_E_FORLOOPNOTINITIALIZED = 92 +const VB_E_OBJNOTCOLLECTION = 451 + +const E_NOTIMPL = &h80004001& +const E_NOINTERFACE = &h80004002& +const DISP_E_UNKNOWNINTERFACE = &h80020001& +const DISP_E_MEMBERNOTFOUND = &h80020003& +const DISP_E_PARAMNOTFOUND = &h80020004& +const DISP_E_TYPEMISMATCH = &h80020005& +const DISP_E_UNKNOWNNAME = &h80020006& +const DISP_E_NONAMEDARGS = &h80020007& +const DISP_E_BADVARTYPE = &h80020008& +const DISP_E_OVERFLOW = &h8002000A& +const DISP_E_BADINDEX = &h8002000B& +const DISP_E_UNKNOWNLCID = &h8002000C& +const DISP_E_ARRAYISLOCKED = &h8002000D& +const DISP_E_BADPARAMCOUNT = &h8002000E& +const DISP_E_PARAMNOTOPTIONAL = &h8002000F& +const DISP_E_NOTACOLLECTION = &h80020011& +const TYPE_E_DLLFUNCTIONNOTFOUND = &h8002802F& +const TYPE_E_TYPEMISMATCH = &h80028CA0& +const TYPE_E_OUTOFBOUNDS = &h80028CA1& +const TYPE_E_IOERROR = &h80028CA2& +const TYPE_E_CANTCREATETMPFILE = &h80028CA3& +const STG_E_FILENOTFOUND = &h80030002& +const STG_E_PATHNOTFOUND = &h80030003& +const STG_E_TOOMANYOPENFILES = &h80030004& +const STG_E_ACCESSDENIED = &h80030005& +const STG_E_INSUFFICIENTMEMORY = &h80030008& +const STG_E_NOMOREFILES = &h80030012& +const STG_E_DISKISWRITEPROTECTED = &h80030013& +const STG_E_WRITEFAULT = &h8003001D& +const STG_E_READFAULT = &h8003001E& +const STG_E_SHAREVIOLATION = &h80030020& +const STG_E_LOCKVIOLATION = &h80030021& +const STG_E_FILEALREADYEXISTS = &h80030050& +const STG_E_MEDIUMFULL = &h80030070& +const STG_E_INVALIDNAME = &h800300FC& +const STG_E_INUSE = &h80030100& +const STG_E_NOTCURRENT = &h80030101& +const STG_E_CANTSAVE = &h80030103& +const REGDB_E_CLASSNOTREG = &h80040154& +const MK_E_UNAVAILABLE = &h800401E3& +const MK_E_INVALIDEXTENSION = &h800401E6& +const MK_E_CANTOPENFILE = &h800401EA& +const CO_E_CLASSSTRING = &h800401F3& +const CO_E_APPNOTFOUND = &h800401F5& +const O_E_APPDIDNTREG = &h800401FE& +const E_ACCESSDENIED = &h80070005& +const E_OUTOFMEMORY = &h8007000E& +const E_INVALIDARG = &h80070057& +const RPC_S_SERVER_UNAVAILABLE = &h800706BA& +const CO_E_SERVER_EXEC_FAILURE = &h80080005& + +call ok(Err.Number = 0, "Err.Number = " & Err.Number) + +dim calledFunc + +sub returnTrue + calledFunc = true + returnTrue = true +end sub + +sub testThrow + on error resume next + + dim x, y + + call throwInt(1000) + call ok(Err.Number = 0, "Err.Number = " & Err.Number) + + call throwInt(E_TESTERROR) + call ok(Err.Number = E_TESTERROR, "Err.Number = " & Err.Number) + + call throwInt(1000) + call ok(Err.Number = E_TESTERROR, "Err.Number = " & Err.Number) + + call Err.clear() + call ok(Err.Number = 0, "Err.Number = " & Err.Number) + + x = 6 + calledFunc = false + x = throwInt(E_TESTERROR) and returnTrue() + call ok(x = 6, "x = " & x) + call ok(not calledFunc, "calledFunc = " & calledFunc) + call ok(Err.Number = E_TESTERROR, "Err.Number = " & Err.Number) + + x = false + call Err.clear() + if false and throwInt(E_TESTERROR) then + x = true + else + call ok(false, "unexpected if else branch on throw") + end if + call ok(x, "if branch not taken") + call ok(Err.Number = E_TESTERROR, "Err.Number = " & Err.Number) + + x = false + call Err.clear() + if throwInt(E_TESTERROR) then x = true + call ok(x, "if branch not taken") + call ok(Err.Number = E_TESTERROR, "Err.Number = " & Err.Number) + + x = false + call Err.clear() + if false then + call ok(false, "unexpected if else branch on throw") + elseif throwInt(E_TESTERROR) then + x = true + else + call ok(false, "unexpected if else branch on throw") + end if + call ok(x, "elseif branch not taken") + call ok(Err.Number = E_TESTERROR, "Err.Number = " & Err.Number) + + call Err.clear() + if true then + call throwInt(E_TESTERROR) + else + call ok(false, "unexpected if else branch on throw") + end if + call ok(Err.Number = E_TESTERROR, "Err.Number = " & Err.Number) + + x = false + call Err.clear() + do while throwInt(E_TESTERROR) + call ok(Err.Number = E_TESTERROR, "Err.Number = " & Err.Number) + x = true + exit do + loop + call ok(x, "if branch not taken") + call ok(Err.Number = E_TESTERROR, "Err.Number = " & Err.Number) + + x = 0 + call Err.clear() + do + x = x+1 + call ok(Err.Number = 0, "Err.Number = " & Err.Number) + loop while throwInt(E_TESTERROR) + call ok(x = 1, "if branch not taken") + call ok(Err.Number = E_TESTERROR, "Err.Number = " & Err.Number) + + x = 0 + call Err.clear() + do + x = x+1 + call ok(Err.Number = 0, "Err.Number = " & Err.Number) + loop until throwInt(E_TESTERROR) + call ok(x = 1, "if branch not taken") + call ok(Err.Number = E_TESTERROR, "Err.Number = " & Err.Number) + + call Err.clear() + x = 0 + while x < 2 + x = x+1 + call throwInt(E_TESTERROR) + wend + call ok(x = 2, "x = " & x) + call ok(Err.Number = E_TESTERROR, "Err.Number = " & Err.Number) + + call Err.clear() + x = 2 + y = 0 + for each x in throwInt(E_TESTERROR) + call ok(Err.Number = E_TESTERROR, "Err.Number = " & Err.Number) + y = y+1 + next + call ok(x = 2, "x = " & x) + call ok(y = 1, "y = " & y) + 'todo_wine call ok(Err.Number = VB_E_OBJNOTCOLLECTION, "Err.Number = " & Err.Number) + + Err.clear() + y = 0 + x = 6 + for x = throwInt(E_TESTERROR) to 100 + call ok(Err.Number = E_TESTERROR, "Err.Number = " & Err.Number) + call ok(x = 6, "x = " & x) + y = y+1 + next + call ok(y = 1, "y = " & y) + call ok(x = 6, "x = " & x) + 'todo_wine call ok(Err.Number = VB_E_FORLOOPNOTINITIALIZED, "Err.Number = " & Err.Number) + + Err.clear() + y = 0 + x = 6 + for x = 100 to throwInt(E_TESTERROR) + call ok(Err.Number = E_TESTERROR, "Err.Number = " & Err.Number) + 'todo_wine call ok(x = 6, "x = " & x) + y = y+1 + next + call ok(y = 1, "y = " & y) + 'todo_wine call ok(x = 6, "x = " & x) + 'todo_wine call ok(Err.Number = VB_E_FORLOOPNOTINITIALIZED, "Err.Number = " & Err.Number) + + select case throwInt(E_TESTERROR) + case true + call ok(false, "unexpected case true") + case false + call ok(false, "unexpected case false") + case empty + call ok(false, "unexpected case empty") + case else + call ok(false, "unexpected case else") + end select + call ok(Err.Number = E_TESTERROR, "Err.Number = " & Err.Number) + + x = false + select case false + case true + call ok(false, "unexpected case true") + case throwInt(E_TESTERROR) + x = true + case else + call ok(false, "unexpected case else") + end select + call ok(x, "case not executed") + call ok(Err.Number = E_TESTERROR, "Err.Number = " & Err.Number) + + 'Exception in non-trivial stack context + for x = 1 to 1 + for each y in collectionObj + select case 3 + case 1 + call ok(false, "unexpected case") + case throwInt(E_TESTERROR) + exit for + case 2 + call ok(false, "unexpected case") + end select + next + next +end sub + +call testThrow + +dim x + +sub testOnError(resumeNext) + if resumeNext then + on error resume next + else + on error goto 0 + end if + x = 1 + throwInt(E_TESTERROR) + x = 2 + call ok(Err.Number = E_TESTERROR, "Err.Number = " & Err.Number) +end sub + +sub callTestOnError(resumeNext) + on error resume next + call testOnError(resumeNext) + call ok(Err.Number = E_TESTERROR, "Err.Number = " & Err.Number) +end sub + +x = 0 +call callTestOnError(true) +call ok(x = 2, "x = " & x) + +x = 0 +call callTestOnError(false) +call ok(x = 1, "x = " & x) + +sub testForEachError() + on error resume next + + dim x, y + y = false + for each x in empty + y = true + next + call ok(y, "for each not executed") + 'todo_wine call ok(Err.Number = VB_E_OBJNOTCOLLECTION, "Err.Number = " & Err.Number) +end sub + +call testForEachError() + +sub testHresMap(hres, code) + on error resume next + + call Err.Clear() + call throwInt(hres) + call ok(Err.Number = code, "throw(" & hex(hres) & ") Err.Number = " & Err.Number) +end sub + +testHresMap E_NOTIMPL, 445 +testHresMap E_NOINTERFACE, 430 +testHresMap DISP_E_UNKNOWNINTERFACE, 438 +testHresMap DISP_E_MEMBERNOTFOUND, 438 +testHresMap DISP_E_PARAMNOTFOUND, 448 +testHresMap DISP_E_TYPEMISMATCH, 13 +testHresMap DISP_E_UNKNOWNNAME, 438 +testHresMap DISP_E_NONAMEDARGS, 446 +testHresMap DISP_E_BADVARTYPE, 458 +testHresMap DISP_E_OVERFLOW, 6 +testHresMap DISP_E_BADINDEX, 9 +testHresMap DISP_E_UNKNOWNLCID, 447 +testHresMap DISP_E_ARRAYISLOCKED, 10 +testHresMap DISP_E_BADPARAMCOUNT, 450 +testHresMap DISP_E_PARAMNOTOPTIONAL, 449 +testHresMap DISP_E_NOTACOLLECTION, 451 +testHresMap TYPE_E_DLLFUNCTIONNOTFOUND, 453 +testHresMap TYPE_E_TYPEMISMATCH, 13 +testHresMap TYPE_E_OUTOFBOUNDS, 9 +testHresMap TYPE_E_IOERROR, 57 +testHresMap TYPE_E_CANTCREATETMPFILE, 322 +testHresMap STG_E_FILENOTFOUND, 432 +testHresMap STG_E_PATHNOTFOUND, 76 +testHresMap STG_E_TOOMANYOPENFILES, 67 +testHresMap STG_E_ACCESSDENIED, 70 +testHresMap STG_E_INSUFFICIENTMEMORY, 7 +testHresMap STG_E_NOMOREFILES, 67 +testHresMap STG_E_DISKISWRITEPROTECTED, 70 +testHresMap STG_E_WRITEFAULT, 57 +testHresMap STG_E_READFAULT, 57 +testHresMap STG_E_SHAREVIOLATION, 75 +testHresMap STG_E_LOCKVIOLATION, 70 +testHresMap STG_E_FILEALREADYEXISTS, 58 +testHresMap STG_E_MEDIUMFULL, 61 +testHresMap STG_E_INVALIDNAME, 53 +testHresMap STG_E_INUSE, 70 +testHresMap STG_E_NOTCURRENT, 70 +testHresMap STG_E_CANTSAVE, 57 +testHresMap REGDB_E_CLASSNOTREG, 429 +testHresMap MK_E_UNAVAILABLE, 429 +testHresMap MK_E_INVALIDEXTENSION, 432 +testHresMap MK_E_CANTOPENFILE, 432 +testHresMap CO_E_CLASSSTRING, 429 +testHresMap CO_E_APPNOTFOUND, 429 +testHresMap O_E_APPDIDNTREG, 429 +testHresMap E_ACCESSDENIED, 70 +testHresMap E_OUTOFMEMORY, 7 +testHresMap E_INVALIDARG, 5 +testHresMap RPC_S_SERVER_UNAVAILABLE, 462 +testHresMap CO_E_SERVER_EXEC_FAILURE, 429 + +sub testVBErrorCodes() + on error resume next + + Err.clear() + throwInt(&h800a00aa&) + call ok(Err.number = 170, "Err.number = " & Err.number) + + Err.clear() + throwInt(&h800a10aa&) + call ok(Err.number = 4266, "Err.number = " & Err.number) +end sub + +call testVBErrorCodes + +call reportSuccess() Propchange: trunk/rostests/winetests/vbscript/error.vbs ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rostests/winetests/vbscript/lang.vbs URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/vbscript/lang.v…
============================================================================== --- trunk/rostests/winetests/vbscript/lang.vbs [iso-8859-1] (original) +++ trunk/rostests/winetests/vbscript/lang.vbs [iso-8859-1] Wed Apr 23 18:06:48 2014 @@ -19,6 +19,7 @@ Option Explicit dim x, y, z +Dim obj call ok(true, "true is not true?") ok true, "true is not true?" @@ -224,6 +225,10 @@ if false then x=1 else x=2 end if +x = false +if false then x = true : x = true +Call ok(x = false, "x <> false") + if false then ok false, "if false called" end if @@ -481,6 +486,17 @@ next Call ok(y = 1, "y = " & y) Call ok(x = 2, "x = " & x) + +Set obj = collectionObj +Call obj.reset() +y = 0 +x = 10 +for each x in obj + y = y+1 + Call ok(x = y, "x <> y") +next +Call ok(y = 3, "y = " & y) +Call ok(getVT(x) = "VT_EMPTY*", "getVT(x) = " & getVT(x)) x = false select case 3 @@ -538,6 +554,22 @@ select case 0 end select +x = false +select case 2 + case 3,1,2,4: x = true + case 5,6,7 + Call ok(false, "unexpected case") +end select +Call ok(x, "wrong case") + +x = false +select case 2: case 5,6,7: Call ok(false, "unexpected case") + case 2,1,2,4 + x = true + case else: Call ok(false, "unexpected case else") +end select +Call ok(x, "wrong case") + if false then Sub testsub x = true @@ -747,7 +779,6 @@ set x = testObj Call ok(getVT(x) = "VT_DISPATCH*", "getVT(x=testObj) = " & getVT(x)) -Dim obj Set obj = New EmptyClass Call ok(getVT(obj) = "VT_DISPATCH*", "getVT(obj) = " & getVT(obj)) @@ -814,6 +845,9 @@ Public Sub Class_Initialize publicProp2 = 2 privateProp = true + Call ok(getVT(privateProp) = "VT_BOOL*", "getVT(privateProp) = " & getVT(privateProp)) + Call ok(getVT(publicProp2) = "VT_I2*", "getVT(publicProp2) = " & getVT(publicProp2)) + Call ok(getVT(Me.publicProp2) = "VT_I2", "getVT(Me.publicProp2) = " & getVT(Me.publicProp2)) End Sub End Class @@ -830,6 +864,7 @@ Call ok(getVT(obj.publicProp) = "VT_EMPTY", "getVT(obj.publicProp) = " & getVT(obj.publicProp)) obj.publicProp = 3 +Call ok(getVT(obj.publicProp) = "VT_I2", "getVT(obj.publicProp) = " & getVT(obj.publicProp)) Call ok(obj.publicProp = 3, "obj.publicProp = " & obj.publicProp) obj.publicProp() = 3 @@ -964,7 +999,6 @@ Function Property() End Function - Sub Test(property) End Sub @@ -972,4 +1006,142 @@ End Sub End Class +' Array tests + +Call ok(getVT(arr) = "VT_EMPTY*", "getVT(arr) = " & getVT(arr)) + +Dim arr(3) +Dim arr2(4,3), arr3(5,4,3), arr0(0), noarr() + +Call ok(getVT(arr) = "VT_ARRAY|VT_BYREF|VT_VARIANT*", "getVT(arr) = " & getVT(arr)) +Call ok(getVT(arr2) = "VT_ARRAY|VT_BYREF|VT_VARIANT*", "getVT(arr2) = " & getVT(arr2)) +Call ok(getVT(arr0) = "VT_ARRAY|VT_BYREF|VT_VARIANT*", "getVT(arr0) = " & getVT(arr0)) +Call ok(getVT(noarr) = "VT_ARRAY|VT_BYREF|VT_VARIANT*", "getVT(noarr) = " & getVT(noarr)) + +Call testArray(1, arr) +Call testArray(2, arr2) +Call testArray(3, arr3) +Call testArray(0, arr0) +Call testArray(-1, noarr) + +Call ok(getVT(arr(1)) = "VT_EMPTY*", "getVT(arr(1)) = " & getVT(arr(1))) +Call ok(getVT(arr2(1,2)) = "VT_EMPTY*", "getVT(arr2(1,2)) = " & getVT(arr2(1,2))) +Call ok(getVT(arr3(1,2,2)) = "VT_EMPTY*", "getVT(arr3(1,2,3)) = " & getVT(arr3(1,2,2))) +Call ok(getVT(arr(0)) = "VT_EMPTY*", "getVT(arr(0)) = " & getVT(arr(0))) +Call ok(getVT(arr(3)) = "VT_EMPTY*", "getVT(arr(3)) = " & getVT(arr(3))) +Call ok(getVT(arr0(0)) = "VT_EMPTY*", "getVT(arr0(0)) = " & getVT(arr0(0))) + +arr(2) = 3 +Call ok(arr(2) = 3, "arr(2) = " & arr(2)) +Call ok(getVT(arr(2)) = "VT_I2*", "getVT(arr(2)) = " & getVT(arr(2))) + +arr3(3,2,1) = 1 +arr3(1,2,3) = 2 +Call ok(arr3(3,2,1) = 1, "arr3(3,2,1) = " & arr3(3,2,1)) +Call ok(arr3(1,2,3) = 2, "arr3(1,2,3) = " & arr3(1,2,3)) + +x = arr3 +Call ok(x(3,2,1) = 1, "x(3,2,1) = " & x(3,2,1)) + +Function getarr() + Dim arr(3) + arr(2) = 2 + getarr = arr + arr(3) = 3 +End Function + +x = getarr() +Call ok(getVT(x) = "VT_ARRAY|VT_VARIANT*", "getVT(x) = " & getVT(x)) +Call ok(x(2) = 2, "x(2) = " & x(2)) +Call ok(getVT(x(3)) = "VT_EMPTY*", "getVT(x(3)) = " & getVT(x(3))) + +x(1) = 1 +Call ok(x(1) = 1, "x(1) = " & x(1)) +x = getarr() +Call ok(getVT(x(1)) = "VT_EMPTY*", "getVT(x(1)) = " & getVT(x(1))) +Call ok(x(2) = 2, "x(2) = " & x(2)) + +x(1) = 1 +y = x +x(1) = 2 +Call ok(y(1) = 1, "y(1) = " & y(1)) + +for x=1 to 1 + Dim forarr(3) + if x=1 then + Call ok(getVT(forarr(1)) = "VT_EMPTY*", "getVT(forarr(1)) = " & getVT(forarr(1))) + else + Call ok(forarr(1) = x, "forarr(1) = " & forarr(1)) + end if + forarr(1) = x+1 +next + +x=1 +Call ok(forarr(x) = 2, "forarr(x) = " & forarr(x)) + +Class ArrClass + Dim classarr(3) + Dim classnoarr() + Dim var + + Private Sub Class_Initialize + Call ok(getVT(classarr) = "VT_ARRAY|VT_BYREF|VT_VARIANT*", "getVT(classarr) = " & getVT(classarr)) + Call testArray(-1, classnoarr) + classarr(0) = 1 + classarr(1) = 2 + classarr(2) = 3 + classarr(3) = 4 + End Sub + + Public Sub testVarVT + Call ok(getVT(var) = "VT_ARRAY|VT_VARIANT*", "getVT(var) = " & getVT(var)) + End Sub +End Class + +Set obj = new ArrClass +Call ok(getVT(obj.classarr) = "VT_ARRAY|VT_VARIANT", "getVT(obj.classarr) = " & getVT(obj.classarr)) +'todo_wine Call ok(obj.classarr(1) = 2, "obj.classarr(1) = " & obj.classarr(1)) + +obj.var = arr +Call ok(getVT(obj.var) = "VT_ARRAY|VT_VARIANT", "getVT(obj.var) = " & getVT(obj.var)) +Call obj.testVarVT + +Sub arrarg(byref refarr, byval valarr, byref refarr2, byval valarr2) + Call ok(getVT(refarr) = "VT_ARRAY|VT_BYREF|VT_VARIANT*", "getVT(refarr) = " & getVT(refarr)) + Call ok(getVT(valarr) = "VT_ARRAY|VT_VARIANT*", "getVT(valarr) = " & getVT(valarr)) + Call ok(getVT(refarr2) = "VT_ARRAY|VT_VARIANT*", "getVT(refarr2) = " & getVT(refarr2)) + Call ok(getVT(valarr2) = "VT_ARRAY|VT_VARIANT*", "getVT(valarr2) = " & getVT(valarr2)) +End Sub + +Call arrarg(arr, arr, obj.classarr, obj.classarr) + +Sub arrarg2(byref refarr(), byval valarr(), byref refarr2(), byval valarr2()) + Call ok(getVT(refarr) = "VT_ARRAY|VT_BYREF|VT_VARIANT*", "getVT(refarr) = " & getVT(refarr)) + Call ok(getVT(valarr) = "VT_ARRAY|VT_VARIANT*", "getVT(valarr) = " & getVT(valarr)) + Call ok(getVT(refarr2) = "VT_ARRAY|VT_VARIANT*", "getVT(refarr2) = " & getVT(refarr2)) + Call ok(getVT(valarr2) = "VT_ARRAY|VT_VARIANT*", "getVT(valarr2) = " & getVT(valarr2)) +End Sub + +Call arrarg2(arr, arr, obj.classarr, obj.classarr) + +Sub testarrarg(arg(), vt) + Call ok(getVT(arg) = vt, "getVT() = " & getVT(arg) & " expected " & vt) +End Sub + +Call testarrarg(1, "VT_I2*") +Call testarrarg(false, "VT_BOOL*") +Call testarrarg(Empty, "VT_EMPTY*") + +' It's allowed to declare non-builtin RegExp class... +class RegExp + public property get Global() + Call ok(false, "Global called") + Global = "fail" + end property +end class + +' ...but there is no way to use it because builtin instance is always created +set x = new RegExp +Call ok(x.Global = false, "x.Global = " & x.Global) + reportSuccess() Modified: trunk/rostests/winetests/vbscript/regexp.vbs URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/vbscript/regexp…
============================================================================== --- trunk/rostests/winetests/vbscript/regexp.vbs [iso-8859-1] (original) +++ trunk/rostests/winetests/vbscript/regexp.vbs [iso-8859-1] Wed Apr 23 18:06:48 2014 @@ -168,4 +168,10 @@ Call ok(submatch.Item(0) = "a", "submatch.Item(0) = " & submatch.Item(0)) Call ok(submatch.Item(1) = "b", "submatch.Item(0) = " & submatch.Item(1)) +Set x = new regexp +Call ok(x.Pattern = "", "RegExp.Pattern = " & x.Pattern) +Call ok(x.IgnoreCase = false, "RegExp.IgnoreCase = " & x.IgnoreCase) +Call ok(x.Global = false, "RegExp.Global = " & x.Global) +Call ok(x.Multiline = false, "RegExp.Multiline = " & x.Multiline) + Call reportSuccess() Modified: trunk/rostests/winetests/vbscript/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/vbscript/rsrc.r…
============================================================================== --- trunk/rostests/winetests/vbscript/rsrc.rc [iso-8859-1] (original) +++ trunk/rostests/winetests/vbscript/rsrc.rc [iso-8859-1] Wed Apr 23 18:06:48 2014 @@ -19,6 +19,9 @@ /* @makedep: api.vbs */ api.vbs 40 "api.vbs" +/* @makedep: error.vbs */ +error.vbs 40 "error.vbs" + /* @makedep: lang.vbs */ lang.vbs 40 "lang.vbs" Modified: trunk/rostests/winetests/vbscript/run.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/vbscript/run.c?…
============================================================================== --- trunk/rostests/winetests/vbscript/run.c [iso-8859-1] (original) +++ trunk/rostests/winetests/vbscript/run.c [iso-8859-1] Wed Apr 23 18:06:48 2014 @@ -119,11 +119,16 @@ #define DISPID_GLOBAL_PROPARGPUT1 1012 #define DISPID_GLOBAL_COLLOBJ 1013 #define DISPID_GLOBAL_DOUBLEASSTRING 1014 +#define DISPID_GLOBAL_TESTARRAY 1015 +#define DISPID_GLOBAL_THROWINT 1016 #define DISPID_TESTOBJ_PROPGET 2000 #define DISPID_TESTOBJ_PROPPUT 2001 #define DISPID_COLLOBJ_RESET 3000 + +#define FACILITY_VBS 0xa +#define MAKE_VBSERROR(code) MAKE_HRESULT(SEVERITY_ERROR, FACILITY_VBS, code) static const WCHAR testW[] = {'t','e','s','t',0}; static const WCHAR emptyW[] = {0}; @@ -150,18 +155,6 @@ CHAR buf[512]; WideCharToMultiByte(CP_ACP, 0, strw, -1, buf, sizeof(buf), 0, 0); return lstrcmpA(buf, stra); -} - -static const char *debugstr_guid(REFIID riid) -{ - static char buf[50]; - - sprintf(buf, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", - riid->Data1, riid->Data2, riid->Data3, riid->Data4[0], - riid->Data4[1], riid->Data4[2], riid->Data4[3], riid->Data4[4], - riid->Data4[5], riid->Data4[6], riid->Data4[7]); - - return buf; } static const char *vt2a(VARIANT *v) @@ -193,6 +186,8 @@ return "VT_BOOL"; case VT_ARRAY|VT_VARIANT: return "VT_ARRAY|VT_VARIANT"; + case VT_ARRAY|VT_BYREF|VT_VARIANT: + return "VT_ARRAY|VT_BYREF|VT_VARIANT"; default: ok(0, "unknown vt %d\n", V_VT(v)); return NULL; @@ -241,7 +236,7 @@ static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService, REFIID riid, void **ppv) { - ok(0, "unexpected service %s\n", debugstr_guid(guidService)); + ok(0, "unexpected service %s\n", wine_dbgstr_guid(guidService)); return E_NOINTERFACE; } @@ -446,6 +441,26 @@ IDispatchEx_Release(dispex); } +static void test_safearray(SAFEARRAY *safearray, unsigned indims) +{ + int i, exdims = indims; + + if(!exdims) + exdims = 1; + ok(safearray->cDims == exdims, "safearray->cDims = %d, expected %d\n", safearray->cDims, exdims); + todo_wine + ok(safearray->fFeatures == (FADF_VARIANT|FADF_HAVEVARTYPE|FADF_FIXEDSIZE|FADF_STATIC), + "safearray->fFeatures = %x\n", safearray->fFeatures); + ok(safearray->cbElements == sizeof(VARIANT), "safearray->cbElements = %x\n", safearray->cbElements); + ok(!safearray->cLocks, "safearray->cLocks = %x\n", safearray->cLocks); + + for(i=0; i < safearray->cDims; i++) { + ok(safearray->rgsabound[i].cElements == indims ? i+4 : 1, "safearray->rgsabound[%d].cElements = %d\n", i, + safearray->rgsabound[i].cElements); + ok(!safearray->rgsabound[i].lLbound, "safearray->rgsabound[%d].lLbound = %d\n", i, safearray->rgsabound[i].lLbound); + } +} + #define test_grfdex(a,b) _test_grfdex(__LINE__,a,b) static void _test_grfdex(unsigned line, DWORD grfdex, DWORD expect) { @@ -466,7 +481,7 @@ return S_OK; } - ok(0, "unexpected call %s\n", debugstr_guid(riid)); + ok(0, "unexpected call %s\n", wine_dbgstr_guid(riid)); return E_NOINTERFACE; } @@ -539,7 +554,7 @@ || IsEqualGUID(riid, &IID_IDispatchEx)) *ppv = iface; else { - trace("QI %s\n", debugstr_guid(riid)); + trace("QI %s\n", wine_dbgstr_guid(riid)); return E_NOINTERFACE; } @@ -913,6 +928,16 @@ *pid = DISPID_GLOBAL_DOUBLEASSTRING; return S_OK; } + if(!strcmp_wa(bstrName, "testArray")) { + test_grfdex(grfdex, fdexNameCaseInsensitive); + *pid = DISPID_GLOBAL_TESTARRAY; + return S_OK; + } + if(!strcmp_wa(bstrName, "throwInt")) { + test_grfdex(grfdex, fdexNameCaseInsensitive); + *pid = DISPID_GLOBAL_THROWINT; + return S_OK; + } if(strict_dispid_check && strcmp_wa(bstrName, "x")) ok(0, "unexpected call %s %x\n", wine_dbgstr_w(bstrName), grfdex); @@ -1171,6 +1196,61 @@ V_VT(pvarRes) = VT_BSTR; return VarBstrFromR8(V_R8(pdp->rgvarg), 0, 0, &V_BSTR(pvarRes)); + + case DISPID_GLOBAL_TESTARRAY: + ok(wFlags == INVOKE_FUNC, "wFlags = %x\n", wFlags); + ok(pdp != NULL, "pdp == NULL\n"); + ok(pdp->rgvarg != NULL, "rgvarg == NULL\n"); + ok(!pdp->rgdispidNamedArgs, "rgdispidNamedArgs != NULL\n"); + ok(pdp->cArgs == 2, "cArgs = %d\n", pdp->cArgs); + ok(!pdp->cNamedArgs, "cNamedArgs = %d\n", pdp->cNamedArgs); + ok(!pvarRes, "pvarRes != NULL\n"); + ok(pei != NULL, "pei == NULL\n"); + + ok(V_VT(pdp->rgvarg+1) == VT_I2, "V_VT(psp->rgvargs+1) = %d\n", V_VT(pdp->rgvarg+1)); + ok(V_VT(pdp->rgvarg) == (VT_BYREF|VT_VARIANT), "V_VT(psp->rgvargs) = %d\n", V_VT(pdp->rgvarg)); + ok(V_VT(V_VARIANTREF(pdp->rgvarg)) == (VT_ARRAY|VT_BYREF|VT_VARIANT), + "V_VT(V_VARIANTREF(psp->rgvargs)) = %d\n", V_VT(V_VARIANTREF(pdp->rgvarg))); + if(V_I2(pdp->rgvarg+1) == -1) + ok(!*V_ARRAYREF(V_VARIANTREF(pdp->rgvarg)), "*V_ARRAYREF(V_VARIANTREF(pdp->rgvarg)) != NULL\n"); + else + test_safearray(*V_ARRAYREF(V_VARIANTREF(pdp->rgvarg)), V_I2(pdp->rgvarg+1)); + return S_OK; + + case DISPID_GLOBAL_THROWINT: { + VARIANT *v = pdp->rgvarg; + HRESULT hres; + + ok((wFlags & ~INVOKE_PROPERTYGET) == INVOKE_FUNC, "wFlags = %x\n", wFlags); + ok(pdp != NULL, "pdp == NULL\n"); + ok(pdp->rgvarg != NULL, "rgvarg == NULL\n"); + ok(!pdp->rgdispidNamedArgs, "rgdispidNamedArgs != NULL\n"); + ok(pdp->cArgs == 1, "cArgs = %d\n", pdp->cArgs); + ok(!pdp->cNamedArgs, "cNamedArgs = %d\n", pdp->cNamedArgs); + ok(pei != NULL, "pei == NULL\n"); + if(pvarRes) { + ok(V_VT(pvarRes) == VT_EMPTY, "V_VT(pvarRes) = %d\n", V_VT(pvarRes)); + V_VT(pvarRes) = VT_BOOL; + V_BOOL(pvarRes) = VARIANT_FALSE; + } + + if(V_VT(v) == (VT_VARIANT|VT_BYREF)) + v = V_VARIANTREF(v); + + switch(V_VT(v)) { + case VT_I2: + hres = V_I2(v); + break; + case VT_I4: + hres = V_I4(v); + break; + default: + ok(0, "unexpected vt %d\n", V_VT(v)); + return E_INVALIDARG; + } + + return hres; + } } ok(0, "unexpected call %d\n", id); @@ -1733,7 +1813,7 @@ size = GetFileSize(file, NULL); - map = CreateFileMapping(file, NULL, PAGE_READONLY, 0, 0, NULL); + map = CreateFileMappingW(file, NULL, PAGE_READONLY, 0, 0, NULL); CloseHandle(file); if(map == INVALID_HANDLE_VALUE) { trace("Could not create file mapping: %u\n", GetLastError()); @@ -1912,6 +1992,20 @@ test_global_vars_ref(TRUE); test_global_vars_ref(FALSE); + hres = parse_script_ar("throwInt(&h80080008&)"); + ok(hres == 0x80080008, "hres = %08x\n", hres); + + /* DISP_E_BADINDEX */ + hres = parse_script_ar("throwInt(&h8002000b&)"); + ok(hres == MAKE_VBSERROR(9), "hres = %08x\n", hres); + + hres = parse_script_ar("throwInt(&h800a0009&)"); + ok(hres == MAKE_VBSERROR(9), "hres = %08x\n", hres); + + /* E_NOTIMPL */ + hres = parse_script_ar("throwInt(&h80004001&)"); + ok(hres == MAKE_VBSERROR(445), "hres = %08x\n", hres); + strict_dispid_check = FALSE; parse_script_a("Sub testsub\n" @@ -1931,6 +2025,7 @@ run_from_res("lang.vbs"); run_from_res("api.vbs"); run_from_res("regexp.vbs"); + run_from_res("error.vbs"); test_procedures(); test_gc();
10 years, 8 months
1
0
0
0
[akhaldi] 62931: [VBSCRIPT] * Sync with Wine 1.7.17. CORE-8080
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Apr 23 18:05:58 2014 New Revision: 62931 URL:
http://svn.reactos.org/svn/reactos?rev=62931&view=rev
Log: [VBSCRIPT] * Sync with Wine 1.7.17. CORE-8080 Removed: trunk/reactos/dll/win32/vbscript/error.c Modified: trunk/reactos/dll/win32/vbscript/CMakeLists.txt trunk/reactos/dll/win32/vbscript/compile.c trunk/reactos/dll/win32/vbscript/global.c trunk/reactos/dll/win32/vbscript/interp.c trunk/reactos/dll/win32/vbscript/parse.h trunk/reactos/dll/win32/vbscript/parser.tab.c trunk/reactos/dll/win32/vbscript/parser.tab.h trunk/reactos/dll/win32/vbscript/parser.y trunk/reactos/dll/win32/vbscript/regexp.c trunk/reactos/dll/win32/vbscript/vbdisp.c trunk/reactos/dll/win32/vbscript/vbregexp.c trunk/reactos/dll/win32/vbscript/vbscript.h trunk/reactos/dll/win32/vbscript/vbscript_classes.idl trunk/reactos/dll/win32/vbscript/vbsglobal.idl trunk/reactos/dll/win32/vbscript/vbsregexp10.idl trunk/reactos/dll/win32/vbscript/vbsregexp55.idl trunk/reactos/media/doc/README.WINE [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/dll/win32/vbscript/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/vbscript/CMakeLi…
Modified: trunk/reactos/dll/win32/vbscript/compile.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/vbscript/compile…
Removed: trunk/reactos/dll/win32/vbscript/error.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/vbscript/error.c…
Modified: trunk/reactos/dll/win32/vbscript/global.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/vbscript/global.…
Modified: trunk/reactos/dll/win32/vbscript/interp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/vbscript/interp.…
Modified: trunk/reactos/dll/win32/vbscript/parse.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/vbscript/parse.h…
Modified: trunk/reactos/dll/win32/vbscript/parser.tab.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/vbscript/parser.…
Modified: trunk/reactos/dll/win32/vbscript/parser.tab.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/vbscript/parser.…
Modified: trunk/reactos/dll/win32/vbscript/parser.y URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/vbscript/parser.…
Modified: trunk/reactos/dll/win32/vbscript/regexp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/vbscript/regexp.…
Modified: trunk/reactos/dll/win32/vbscript/vbdisp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/vbscript/vbdisp.…
Modified: trunk/reactos/dll/win32/vbscript/vbregexp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/vbscript/vbregex…
Modified: trunk/reactos/dll/win32/vbscript/vbscript.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/vbscript/vbscrip…
Modified: trunk/reactos/dll/win32/vbscript/vbscript_classes.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/vbscript/vbscrip…
Modified: trunk/reactos/dll/win32/vbscript/vbsglobal.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/vbscript/vbsglob…
Modified: trunk/reactos/dll/win32/vbscript/vbsregexp10.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/vbscript/vbsrege…
Modified: trunk/reactos/dll/win32/vbscript/vbsregexp55.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/vbscript/vbsrege…
Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
10 years, 8 months
1
0
0
0
[akhaldi] 62930: [URLMON_WINETEST] * Sync with Wine 1.7.17. CORE-8080
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Apr 23 17:36:51 2014 New Revision: 62930 URL:
http://svn.reactos.org/svn/reactos?rev=62930&view=rev
Log: [URLMON_WINETEST] * Sync with Wine 1.7.17. CORE-8080 Modified: trunk/rostests/winetests/urlmon/misc.c trunk/rostests/winetests/urlmon/protocol.c trunk/rostests/winetests/urlmon/sec_mgr.c trunk/rostests/winetests/urlmon/uri.c trunk/rostests/winetests/urlmon/url.c Modified: trunk/rostests/winetests/urlmon/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/urlmon/misc.c?r…
============================================================================== --- trunk/rostests/winetests/urlmon/misc.c [iso-8859-1] (original) +++ trunk/rostests/winetests/urlmon/misc.c [iso-8859-1] Wed Apr 23 17:36:51 2014 @@ -27,6 +27,7 @@ #include <wine/test.h> //#include <stdarg.h> //#include <stddef.h> +#include <stdio.h> //#include "windef.h" //#include "winbase.h" @@ -1736,6 +1737,8 @@ * call hasn't already been made for the specified Feature). Because of * this we skip these tests on IE 7 and earlier. */ +static const char* szFeatureControlKey = "Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl"; + static void test_internet_features_registry(void) { HRESULT hres; DWORD res; @@ -1743,11 +1746,10 @@ char *name; HKEY feature_control; HKEY feature; - DWORD value, skip_zone; + DWORD value; + BOOL skip_zone; BOOL delete_feature_key = TRUE; - BOOL delete_feature_control_key = FALSE; - - static const char* szFeatureControlKey = "Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl"; + static const char* szFeatureBehaviorsKey = "FEATURE_BEHAVIORS"; static const char* szFeatureZoneElevationKey = "FEATURE_ZONE_ELEVATION"; @@ -1763,17 +1765,13 @@ /* Some Windows machines don't have a FeatureControl key in HKCU. */ res = RegOpenKeyA(HKEY_CURRENT_USER, szFeatureControlKey, &feature_control); - if(res != ERROR_SUCCESS) { - res = RegCreateKeyA(HKEY_CURRENT_USER, szFeatureControlKey, &feature_control); - ok(res == ERROR_SUCCESS, "RegCreateKey failed: %d\n", res); - delete_feature_control_key = TRUE; - } + ok(res == ERROR_SUCCESS, "RegCreateKey failed: %d\n", res); res = RegOpenKeyA(feature_control, szFeatureBehaviorsKey, &feature); - if(res == ERROR_SUCCESS) + if(res == ERROR_SUCCESS) { /* FEATURE_BEHAVIORS already existed, so don't delete it when we're done. */ delete_feature_key = FALSE; - else { + }else { res = RegCreateKeyA(feature_control, szFeatureBehaviorsKey, &feature); ok(res == ERROR_SUCCESS, "RegCreateKey failed: %d\n", res); } @@ -1789,7 +1787,7 @@ RegCloseKey(feature); RegDeleteKeyA(feature_control, szFeatureBehaviorsKey); } else { - RegDeleteValue(feature, name); + RegDeleteValueA(feature, name); RegCloseKey(feature); } @@ -1802,8 +1800,6 @@ ok(hres == S_OK, "CoInternetSetFeatureEnabled failed: %08x\n", hres); RegCloseKey(feature_control); - if(delete_feature_control_key) - RegDeleteKeyA(HKEY_CURRENT_USER, szFeatureControlKey); res = RegOpenKeyA(HKEY_LOCAL_MACHINE, szFeatureControlKey, &feature_control); ok(res == ERROR_SUCCESS, "RegOpenKey failed: %d\n", res); @@ -1816,11 +1812,11 @@ if (res == ERROR_ACCESS_DENIED) { skip("Not allowed to modify zone elevation\n"); - skip_zone = 1; + skip_zone = TRUE; } else { - skip_zone = 0; + skip_zone = FALSE; ok(res == ERROR_SUCCESS, "RegSetValueEx failed: %d\n", res); hres = pCoInternetIsFeatureEnabled(FEATURE_ZONE_ELEVATION, GET_FEATURE_FROM_PROCESS); @@ -1897,11 +1893,40 @@ } static void test_internet_features(void) { + HKEY key; + DWORD res; + if(!pCoInternetIsFeatureEnabled || !pCoInternetSetFeatureEnabled) { win_skip("Skipping internet feature tests, IE is too old\n"); return; } + /* IE10 takes FeatureControl key into account only if it's available upon process start. */ + res = RegOpenKeyA(HKEY_CURRENT_USER, szFeatureControlKey, &key); + if(res != ERROR_SUCCESS) { + PROCESS_INFORMATION pi; + STARTUPINFOA si = { 0 }; + char cmdline[MAX_PATH]; + char **argv; + BOOL ret; + + res = RegCreateKeyA(HKEY_CURRENT_USER, szFeatureControlKey, &key); + ok(res == ERROR_SUCCESS, "RegCreateKey failed: %d\n", res); + + trace("Running features tests in a separated process.\n"); + + winetest_get_mainargs( &argv ); + sprintf(cmdline, "\"%s\" %s internet_features", argv[0], argv[1]); + ret = CreateProcessA(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); + ok(ret, "Could not create process: %u\n", GetLastError()); + winetest_wait_child_process( pi.hProcess ); + CloseHandle(pi.hThread); + CloseHandle(pi.hProcess); + + RegDeleteKeyA(HKEY_CURRENT_USER, szFeatureControlKey); + return; + } + test_internet_features_registry(); test_CoInternetIsFeatureEnabled(); test_CoInternetSetFeatureEnabled(); @@ -1910,8 +1935,12 @@ START_TEST(misc) { HMODULE hurlmon; - - hurlmon = GetModuleHandle("urlmon.dll"); + int argc; + char **argv; + + argc = winetest_get_mainargs(&argv); + + hurlmon = GetModuleHandleA("urlmon.dll"); pCoInternetCompareUrl = (void *) GetProcAddress(hurlmon, "CoInternetCompareUrl"); pCoInternetGetSecurityUrl = (void*) GetProcAddress(hurlmon, "CoInternetGetSecurityUrl"); pCoInternetGetSession = (void*) GetProcAddress(hurlmon, "CoInternetGetSession"); @@ -1936,23 +1965,26 @@ OleInitialize(NULL); - register_protocols(); - - test_CreateFormatEnum(); - test_RegisterFormatEnumerator(); - test_CoInternetParseUrl(); - test_CoInternetCompareUrl(); - test_CoInternetQueryInfo(); - test_FindMimeFromData(); - test_NameSpace(); - test_MimeFilter(); - test_ReleaseBindInfo(); - test_CopyStgMedium(); - test_CopyBindInfo(); - test_UrlMkGetSessionOption(); - test_user_agent(); - test_MkParseDisplayNameEx(); - test_IsValidURL(); + if(argc <= 2 || strcmp(argv[2], "internet_features")) { + register_protocols(); + + test_CreateFormatEnum(); + test_RegisterFormatEnumerator(); + test_CoInternetParseUrl(); + test_CoInternetCompareUrl(); + test_CoInternetQueryInfo(); + test_FindMimeFromData(); + test_NameSpace(); + test_MimeFilter(); + test_ReleaseBindInfo(); + test_CopyStgMedium(); + test_CopyBindInfo(); + test_UrlMkGetSessionOption(); + test_user_agent(); + test_MkParseDisplayNameEx(); + test_IsValidURL(); + } + test_internet_features(); OleUninitialize(); Modified: trunk/rostests/winetests/urlmon/protocol.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/urlmon/protocol…
============================================================================== --- trunk/rostests/winetests/urlmon/protocol.c [iso-8859-1] (original) +++ trunk/rostests/winetests/urlmon/protocol.c [iso-8859-1] Wed Apr 23 17:36:51 2014 @@ -95,6 +95,7 @@ DEFINE_EXPECT(GetBindString_USER_AGENT); DEFINE_EXPECT(GetBindString_POST_COOKIE); DEFINE_EXPECT(GetBindString_URL); +DEFINE_EXPECT(GetBindString_ROOTDOC_URL); DEFINE_EXPECT(QueryService_HttpNegotiate); DEFINE_EXPECT(QueryService_InternetProtocol); DEFINE_EXPECT(QueryService_HttpSecurity); @@ -202,18 +203,6 @@ static const CHAR post_data[] = "mode=Test"; -static const char *debugstr_guid(REFIID riid) -{ - static char buf[50]; - - sprintf(buf, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", - riid->Data1, riid->Data2, riid->Data3, riid->Data4[0], - riid->Data4[1], riid->Data4[2], riid->Data4[3], riid->Data4[4], - riid->Data4[5], riid->Data4[6], riid->Data4[7]); - - return buf; -} - static int strcmp_wa(LPCWSTR strw, const char *stra) { CHAR buf[512]; @@ -420,7 +409,19 @@ return IHttpSecurity_QueryInterface(&http_security, riid, ppv); } - ok(0, "unexpected service %s\n", debugstr_guid(guidService)); + if(IsEqualGUID(&IID_IGetBindHandle, guidService)) { + trace("QueryService(IID_IGetBindHandle)\n"); + *ppv = NULL; + return E_NOINTERFACE; + } + + if(IsEqualGUID(&IID_IWindowForBindingUI, guidService)) { + trace("QueryService(IID_IWindowForBindingUI)\n"); + *ppv = NULL; + return E_NOINTERFACE; + } + + ok(0, "unexpected service %s\n", wine_dbgstr_guid(guidService)); return E_FAIL; } @@ -435,7 +436,12 @@ static HRESULT WINAPI Stream_QueryInterface(IStream *iface, REFIID riid, void **ppv) { - ok(0, "unexpected call\n"); + static const IID IID_strm_unknown = {0x2f68429a,0x199a,0x4043,{0x93,0x11,0xf2,0xfe,0x7c,0x13,0xcc,0xb9}}; + + if(!IsEqualGUID(&IID_strm_unknown, riid)) /* IE11 */ + ok(0, "unexpected call %s\n", wine_dbgstr_guid(riid)); + + *ppv = NULL; return E_NOINTERFACE; } @@ -578,6 +584,8 @@ static void call_continue(PROTOCOLDATA *protocol_data) { HRESULT hres; + + trace("continue in state %d\n", state); if(state == STATE_CONNECTING) { if(tested_protocol == HTTP_TEST || tested_protocol == HTTPS_TEST || tested_protocol == FTP_TEST) { @@ -877,8 +885,11 @@ CHECK_EXPECT(ReportProgress_DECODING); ok(!lstrcmpW(szStatusText, pjpegW), "szStatusText = %s\n", wine_dbgstr_w(szStatusText)); break; + case BINDSTATUS_RESERVED_7: + trace("BINDSTATUS_RESERVED_7\n"); + break; default: - ok(0, "Unexpected status %d\n", ulStatusCode); + ok(0, "Unexpected status %d (%d)\n", ulStatusCode, ulStatusCode-BINDSTATUS_LAST); }; return S_OK; @@ -1237,6 +1248,7 @@ static HRESULT QueryInterface(REFIID riid, void **ppv) { static const IID IID_undocumented = {0x58DFC7D0,0x5381,0x43E5,{0x9D,0x72,0x4C,0xDD,0xE4,0xCB,0x0F,0x1A}}; + static const IID IID_undocumentedIE10 = {0xc28722e5,0xbc1a,0x4c55,{0xa6,0x8d,0x33,0x21,0x9f,0x69,0x89,0x10}}; *ppv = NULL; @@ -1250,11 +1262,14 @@ /* NOTE: IE8 queries for undocumented {58DFC7D0-5381-43E5-9D72-4CDDE4CB0F1A} interface. */ if(IsEqualGUID(&IID_undocumented, riid)) return E_NOINTERFACE; + /* NOTE: IE10 queries for undocumented {c28722e5-bc1a-4c55-a68d-33219f698910} interface. */ + if(IsEqualGUID(&IID_undocumentedIE10, riid)) + return E_NOINTERFACE; if(*ppv) return S_OK; - ok(0, "unexpected call %s\n", debugstr_guid(riid)); + ok(0, "unexpected call %s\n", wine_dbgstr_guid(riid)); return E_NOINTERFACE; } @@ -1380,8 +1395,12 @@ memcpy(*ppwzStr, binding_urls[tested_protocol], size); return S_OK; } + case BINDSTRING_ROOTDOC_URL: + CHECK_EXPECT(GetBindString_ROOTDOC_URL); + ok(cEl == 1, "cEl=%d, expected 1\n", cEl); + return E_NOTIMPL; default: - ok(0, "unexpected call\n"); + ok(0, "unexpected ulStringType %d\n", ulStringType); } return E_NOTIMPL; @@ -1518,7 +1537,7 @@ } if(!IsEqualGUID(riid, &unknown_iid)) /* IE10 */ - ok(0, "unexpected riid %s\n", debugstr_guid(riid)); + ok(0, "unexpected riid %s\n", wine_dbgstr_guid(riid)); *ppv = NULL; return E_NOINTERFACE; } @@ -1805,7 +1824,7 @@ case 1: { IServiceProvider *service_provider; IHttpNegotiate *http_negotiate; - static WCHAR header[] = {'?',0}; + static const WCHAR header[] = {'?',0}; hres = IInternetProtocolSink_QueryInterface(binding_sink, &IID_IServiceProvider, (void**)&service_provider); @@ -2050,7 +2069,7 @@ return S_OK; } - ok(0, "unexpected riid %s\n", debugstr_guid(riid)); + ok(0, "unexpected riid %s\n", wine_dbgstr_guid(riid)); *ppv = NULL; return E_NOINTERFACE; } @@ -2261,7 +2280,7 @@ CHECK_EXPECT(CreateInstance); ok(pOuter == (IUnknown*)prot_bind_info, "pOuter != protocol_unk\n"); - ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n", debugstr_guid(riid)); + ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n", wine_dbgstr_guid(riid)); ok(ppv != NULL, "ppv == NULL\n"); *ppv = &Protocol; @@ -2289,7 +2308,7 @@ CHECK_EXPECT(MimeFilter_CreateInstance); ok(!outer, "outer = %p\n", outer); - ok(IsEqualGUID(&IID_IInternetProtocol, riid), "unexpected riid %s\n", debugstr_guid(riid)); + ok(IsEqualGUID(&IID_IInternetProtocol, riid), "unexpected riid %s\n", wine_dbgstr_guid(riid)); *ppv = &MimeProtocol; return S_OK; @@ -2839,6 +2858,7 @@ SET_EXPECT(ReportProgress_DIRECTBIND); if(!got_user_agent) SET_EXPECT(GetBindString_USER_AGENT); + SET_EXPECT(GetBindString_ROOTDOC_URL); SET_EXPECT(GetBindString_ACCEPT_MIMES); SET_EXPECT(QueryService_HttpNegotiate); SET_EXPECT(BeginningTransaction); @@ -2880,6 +2900,7 @@ CHECK_CALLED(GetBindString_USER_AGENT); got_user_agent = TRUE; } + CLEAR_CALLED(GetBindString_ROOTDOC_URL); /* New in IE11 */ CHECK_CALLED(GetBindString_ACCEPT_MIMES); CHECK_CALLED(QueryService_HttpNegotiate); CHECK_CALLED(BeginningTransaction); @@ -3075,7 +3096,7 @@ CHECK_CALLED(ReportResult); hres = IInternetProtocol_Abort(async_protocol, E_ABORT, 0); - ok(hres == INET_E_RESULT_DISPATCHED, "Abort failed: %08x\n", hres); + ok(hres == INET_E_RESULT_DISPATCHED || hres == S_OK /* IE10 */, "Abort failed: %08x\n", hres); break; } }else { @@ -3098,7 +3119,7 @@ CLEAR_CALLED(ReportProgress_COOKIE_SENT); hres = IInternetProtocol_Abort(async_protocol, E_ABORT, 0); - ok(hres == INET_E_RESULT_DISPATCHED, "Abort failed: %08x\n", hres); + ok(hres == INET_E_RESULT_DISPATCHED || hres == S_OK /* IE10 */, "Abort failed: %08x\n", hres); test_protocol_terminate(async_protocol); @@ -3190,13 +3211,13 @@ static void test_https_protocol(void) { - static const WCHAR codeweavers_url[] = - {'h','t','t','p','s',':','/','/','w','w','w','.','c','o','d','e','w','e','a','v','e','r','s', - '.','c','o','m','/','t','e','s','t','.','h','t','m','l',0}; + static const WCHAR https_winehq_url[] = + {'h','t','t','p','s',':','/','/','t','e','s','t','.','w','i','n','e','h','q','.','o','r','g','/', + 't','e','s','t','s','/','h','e','l','l','o','.','h','t','m','l',0}; trace("Testing https protocol (from urlmon)...\n"); bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA | BINDF_FROMURLMON | BINDF_NOWRITECACHE; - test_http_protocol_url(codeweavers_url, HTTPS_TEST, TEST_FIRST_HTTP, TYMED_NULL); + test_http_protocol_url(https_winehq_url, HTTPS_TEST, TEST_FIRST_HTTP, TYMED_NULL); } @@ -3305,7 +3326,7 @@ hres = CoGetClassObject(&CLSID_GopherProtocol, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)&unk); ok(hres == S_OK || - hres == REGDB_E_CLASSNOTREG, /* Gopher protocol has been removed as of Vista */ + broken(hres == REGDB_E_CLASSNOTREG || hres == CLASS_E_CLASSNOTAVAILABLE), /* Gopher protocol has been removed as of Vista */ "CoGetClassObject failed: %08x\n", hres); if(FAILED(hres)) return; @@ -3634,7 +3655,7 @@ CHECK_CALLED(QueryService_InternetProtocol); CHECK_CALLED(CreateInstance); CHECK_CALLED(ReportProgress_PROTOCOLCLASSID); - CHECK_CALLED(SetPriority); + CLEAR_CALLED(SetPriority); /* IE11 does not call it. */ if(impl_protex) CHECK_CALLED(StartEx); else @@ -3733,7 +3754,7 @@ return; } - hurlmon = GetModuleHandle("urlmon.dll"); + hurlmon = GetModuleHandleA("urlmon.dll"); pCoInternetGetSession = (void*) GetProcAddress(hurlmon, "CoInternetGetSession"); pReleaseBindInfo = (void*) GetProcAddress(hurlmon, "ReleaseBindInfo"); pCreateUri = (void*) GetProcAddress(hurlmon, "CreateUri"); @@ -3748,10 +3769,10 @@ OleInitialize(NULL); - event_complete = CreateEvent(NULL, FALSE, FALSE, NULL); - event_complete2 = CreateEvent(NULL, FALSE, FALSE, NULL); - event_continue = CreateEvent(NULL, FALSE, FALSE, NULL); - event_continue_done = CreateEvent(NULL, FALSE, FALSE, NULL); + event_complete = CreateEventW(NULL, FALSE, FALSE, NULL); + event_complete2 = CreateEventW(NULL, FALSE, FALSE, NULL); + event_continue = CreateEventW(NULL, FALSE, FALSE, NULL); + event_continue_done = CreateEventW(NULL, FALSE, FALSE, NULL); thread_id = GetCurrentThreadId(); test_file_protocol(); Modified: trunk/rostests/winetests/urlmon/sec_mgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/urlmon/sec_mgr.…
============================================================================== --- trunk/rostests/winetests/urlmon/sec_mgr.c [iso-8859-1] (original) +++ trunk/rostests/winetests/urlmon/sec_mgr.c [iso-8859-1] Wed Apr 23 17:36:51 2014 @@ -69,6 +69,11 @@ #define CHECK_CALLED(func) \ do { \ ok(called_ ## func, "expected " #func "\n"); \ + expect_ ## func = called_ ## func = FALSE; \ + }while(0) + +#define SET_CALLED(func) \ + do { \ expect_ ## func = called_ ## func = FALSE; \ }while(0) @@ -516,15 +521,26 @@ */ res = RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\3", &hkey); - if(res != ERROR_SUCCESS) { - ok(0, "Could not open zone key\n"); - return; - } - - wsprintf(buf, "%X", action); + ok(res == ERROR_SUCCESS, "Could not open zone key\n"); + if(res != ERROR_SUCCESS) + return; + + wsprintfA(buf, "%X", action); size = sizeof(DWORD); res = RegQueryValueExA(hkey, buf, NULL, NULL, (BYTE*)®_policy, &size); RegCloseKey(hkey); + + /* Try settings from HKEY_LOCAL_MACHINE. */ + if(res != ERROR_SUCCESS || size != sizeof(DWORD)) { + res = RegOpenKeyA(HKEY_LOCAL_MACHINE, + "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\3", &hkey); + ok(res == ERROR_SUCCESS, "Could not open zone key\n"); + + size = sizeof(DWORD); + res = RegQueryValueExA(hkey, buf, NULL, NULL, (BYTE*)®_policy, &size); + RegCloseKey(hkey); + } + if(res != ERROR_SUCCESS || size != sizeof(DWORD)) { policy = 0xdeadbeef; hres = IInternetSecurityManager_ProcessUrlAction(secmgr, url9, action, (BYTE*)&policy, @@ -737,7 +753,7 @@ static const zone_domain_mapping zone_domain_mappings[] = { /* Implicitly means "*.yabadaba.do". */ {"yabadaba.do",NULL,"http",URLZONE_CUSTOM}, - /* The '*' doesn't count as a wildcard, since its not the first component of the subdomain. */ + /* The '*' doesn't count as a wildcard, since it's not the first component of the subdomain. */ {"super.cool","testing.*","ftp",URLZONE_CUSTOM2}, /* The '*' counts since it's the first component of the subdomain. */ {"super.cool","*.testing","ftp",URLZONE_CUSTOM2}, @@ -850,7 +866,7 @@ char path[MAX_PATH]; char **argv; PROCESS_INFORMATION pi; - STARTUPINFO si = { 0 }; + STARTUPINFOA si = { 0 }; BOOL ret; GetModuleFileNameA(NULL, path, MAX_PATH); @@ -858,7 +874,7 @@ si.cb = sizeof(si); winetest_get_mainargs(&argv); sprintf(cmdline, "\"%s\" %s domain_tests", argv[0], argv[1]); - ret = CreateProcess(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); + ret = CreateProcessA(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); ok(ret, "Failed to spawn child process: %u\n", GetLastError()); winetest_wait_child_process(pi.hProcess); CloseHandle(pi.hThread); @@ -1220,10 +1236,10 @@ ok((pZA->cbSize == 0xffffffff) || (pZA->cbSize == sizeof(ZONEATTRIBUTES)), "got cbSize = 0x%x (expected 0xffffffff)\n", pZA->cbSize); - /* IE8 no longer fail on invalid zones */ + /* IE8 up to IE10 don't fail on invalid zones */ memset(buffer, -1, sizeof(buffer)); hr = IInternetZoneManager_GetZoneAttributes(zonemgr, 0xdeadbeef, pZA); - ok(hr == S_OK || (hr == E_FAIL), + ok(hr == S_OK || hr == E_FAIL || hr == E_POINTER, "got 0x%x (expected S_OK or E_FAIL)\n", hr); hr = IInternetZoneManager_GetZoneAttributes(zonemgr, 0, NULL); @@ -1965,6 +1981,16 @@ testcases[i].policy_flags = URLPOLICY_ALLOW; } + /* IE10 does not seem to use passed ISecurityManager */ + SET_EXPECT(ProcessUrlAction); + pCoInternetIsFeatureZoneElevationEnabled(url1, url1, &security_manager, 0); + i = called_ProcessUrlAction; + SET_CALLED(ProcessUrlAction); + if(!i) { + skip("CoInternetIsFeatureZoneElevationEnabled does not use passed ISecurityManager\n"); + return; + } + for(i=0; i<sizeof(testcases)/sizeof(testcases[0]); i++) { url_from = a2w(testcases[i].url_from); url_to = a2w(testcases[i].url_to); @@ -1998,7 +2024,7 @@ int argc; char **argv; - hurlmon = GetModuleHandle("urlmon.dll"); + hurlmon = GetModuleHandleA("urlmon.dll"); pCoInternetCreateSecurityManager = (void*) GetProcAddress(hurlmon, "CoInternetCreateSecurityManager"); pCoInternetCreateZoneManager = (void*) GetProcAddress(hurlmon, "CoInternetCreateZoneManager"); pCoInternetGetSecurityUrl = (void*) GetProcAddress(hurlmon, "CoInternetGetSecurityUrl"); Modified: trunk/rostests/winetests/urlmon/uri.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/urlmon/uri.c?re…
============================================================================== --- trunk/rostests/winetests/urlmon/uri.c [iso-8859-1] (original) +++ trunk/rostests/winetests/urlmon/uri.c [iso-8859-1] Wed Apr 23 17:36:51 2014 @@ -695,7 +695,7 @@ {URLZONE_INVALID,E_NOTIMPL,FALSE} } }, - /* URI is considered opaque since CREATE_NO_CRACK_UNKNOWN_SCHEMES is set and its an unknown scheme. */ + /* URI is considered opaque since CREATE_NO_CRACK_UNKNOWN_SCHEMES is set and it's an unknown scheme. */ { "
zip://google.com
", Uri_CREATE_NO_CRACK_UNKNOWN_SCHEMES, S_OK, FALSE, { {"
zip:/.//google.com
",S_OK,FALSE}, @@ -903,7 +903,7 @@ {URLZONE_INVALID,E_NOTIMPL,FALSE} } }, - /* Allowed to have invalid % encoded because its an unknown scheme type. */ + /* Allowed to have invalid % encoded because it's an unknown scheme type. */ { "zip://%xy:word@winehq.org/", 0, S_OK, FALSE, { {"zip://%xy:word@winehq.org/",S_OK,FALSE}, @@ -1934,7 +1934,7 @@ {URLZONE_INVALID,E_NOTIMPL,FALSE} } }, - /* Since foo isn't a recognized 3 character TLD its considered the domain name. */ + /* Since foo isn't a recognized 3 character TLD it's considered the domain name. */ { "
http://google.foo.uk
", 0, S_OK, FALSE, { {"
http://google.foo.uk/
",S_OK,FALSE}, @@ -4078,7 +4078,7 @@ {URLZONE_INVALID,E_NOTIMPL,FALSE} } }, - /* Res doesn't get forbidden characters percent encoded in it's path. */ + /* Res doesn't get forbidden characters percent encoded in its path. */ { "res://c:\\test/tes<|>t", 0, S_OK, FALSE, { {"res://c:\\test/tes<|>t",S_OK,FALSE}, @@ -4602,7 +4602,7 @@ {"*a*b*c*d://not.valid.com",0,FALSE}, /* Not allowed to have invalid % encoded data. */ {"ftp://google.co%XX/",0,FALSE}, - /* To many h16 components. */ + /* Too many h16 components. */ {"
http://[1:2:3:4:5:6:7:8:9]
",0,FALSE}, /* Not enough room for IPv4 address. */ {"
http://[1:2:3:4:5:6:7:192.0.1.0]
",0,FALSE}, @@ -4614,8 +4614,6 @@ {"http://[::192.0]",0,FALSE}, /* Can't have elision of 1 h16 at beginning of address. */ {"http://[::2:3:4:5:6:7:8]",0,FALSE}, - /* Can't have elision of 1 h16 at end of address. */ - {"
http://[1:2:3:4:5:6:7::]
",0,FALSE}, /* Expects a valid IP Literal. */ {"ftp://[not.valid.uri]/",0,FALSE}, /* Expects valid port for a known scheme type. */ @@ -7425,12 +7423,16 @@ hr = IUri_GetPropertyBSTR(uri, Uri_PROPERTY_RAW_URI, NULL, 0); ok(hr == E_POINTER, "Error: GetPropertyBSTR returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); - /* Make sure it handles a invalid Uri_PROPERTY's correctly. */ + /* Make sure it handles an invalid Uri_PROPERTY correctly. */ hr = IUri_GetPropertyBSTR(uri, Uri_PROPERTY_PORT, &received, 0); - ok(hr == S_OK, "Error: GetPropertyBSTR returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - ok(received != NULL, "Error: Expected the string not to be NULL.\n"); - ok(!SysStringLen(received), "Error: Expected the string to be of len=0 but it was %d instead.\n", SysStringLen(received)); - SysFreeString(received); + ok(hr == E_INVALIDARG /* IE10 */ || broken(hr == S_OK), "Error: GetPropertyBSTR returned 0x%08x, expected E_INVALIDARG or S_OK.\n", hr); + if(SUCCEEDED(hr)) { + ok(received != NULL, "Error: Expected the string not to be NULL.\n"); + ok(!SysStringLen(received), "Error: Expected the string to be of len=0 but it was %d instead.\n", SysStringLen(received)); + SysFreeString(received); + }else { + ok(!received, "received = %s\n", wine_dbgstr_w(received)); + } /* Make sure it handles the ZONE property correctly. */ received = NULL; @@ -8136,11 +8138,10 @@ DWORD j; for(j = Uri_PROPERTY_STRING_START; j <= Uri_PROPERTY_STRING_LAST; ++j) { - DWORD expectedLen, brokenLen, receivedLen; + DWORD expectedLen, receivedLen; uri_str_property prop = test.str_props[j]; - expectedLen = lstrlen(prop.value); - brokenLen = lstrlen(prop.broken_value); + expectedLen = lstrlenA(prop.value); /* This won't be necessary once GetPropertyLength is implemented. */ receivedLen = -1; @@ -8152,14 +8153,14 @@ hr, prop.expected, i, j); } todo_wine { - ok(receivedLen == expectedLen || broken(receivedLen == brokenLen), + ok(receivedLen == expectedLen || broken(prop.broken_value && receivedLen == lstrlenA(prop.broken_value)), "Error: Expected a length of %d but got %d on uri_tests[%d].str_props[%d].\n", expectedLen, receivedLen, i, j); } } else { ok(hr == prop.expected, "Error: GetPropertyLength returned 0x%08x, expected 0x%08x on uri_tests[%d].str_props[%d].\n", hr, prop.expected, i, j); - ok(receivedLen == expectedLen || broken(receivedLen == brokenLen), + ok(receivedLen == expectedLen || broken(prop.broken_value && receivedLen == lstrlenA(prop.broken_value)), "Error: Expected a length of %d but got %d on uri_tests[%d].str_props[%d].\n", expectedLen, receivedLen, i, j); } @@ -8966,6 +8967,7 @@ if(prop) { /* Use expected_value unless it's NULL, then use value. */ LPCSTR expected = prop->expected_value ? prop->expected_value : prop->value; + DWORD expected_len = expected ? strlen(expected) : 0; hr = IUriBuilder_GetFragment(builder, &len, &received); if(prop->todo) { todo_wine { @@ -8979,9 +8981,9 @@ expected, wine_dbgstr_w(received), test_index); } todo_wine { - ok(lstrlen(expected) == len, + ok(expected_len == len, "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlen(expected), len, test_index); + expected_len, len, test_index); } } } else { @@ -8990,9 +8992,9 @@ hr, (expected ? S_OK : S_FALSE), test_index); ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", expected, wine_dbgstr_w(received), test_index); - ok(lstrlen(expected) == len, + ok(expected_len == len, "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlen(expected), len, test_index); + expected_len, len, test_index); } } else { /* The property wasn't set earlier, so it should return whatever @@ -9075,6 +9077,7 @@ if(prop) { /* Use expected_value unless it's NULL, then use value. */ LPCSTR expected = prop->expected_value ? prop->expected_value : prop->value; + DWORD expected_len = expected ? strlen(expected) : 0; hr = IUriBuilder_GetHost(builder, &len, &received); if(prop->todo) { todo_wine { @@ -9088,9 +9091,9 @@ expected, wine_dbgstr_w(received), test_index); } todo_wine { - ok(lstrlen(expected) == len, + ok(expected_len == len, "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlen(expected), len, test_index); + expected_len, len, test_index); } } } else { @@ -9099,9 +9102,9 @@ hr, (expected ? S_OK : S_FALSE), test_index); ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", expected, wine_dbgstr_w(received), test_index); - ok(lstrlen(expected) == len, + ok(expected_len == len, "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlen(expected), len, test_index); + expected_len, len, test_index); } } else { /* The property wasn't set earlier, so it should return whatever @@ -9184,6 +9187,7 @@ if(prop) { /* Use expected_value unless it's NULL, then use value. */ LPCSTR expected = prop->expected_value ? prop->expected_value : prop->value; + DWORD expected_len = expected ? strlen(expected) : 0; hr = IUriBuilder_GetPassword(builder, &len, &received); if(prop->todo) { todo_wine { @@ -9197,9 +9201,9 @@ expected, wine_dbgstr_w(received), test_index); } todo_wine { - ok(lstrlen(expected) == len, + ok(expected_len == len, "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlen(expected), len, test_index); + expected_len, len, test_index); } } } else { @@ -9208,9 +9212,9 @@ hr, (expected ? S_OK : S_FALSE), test_index); ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", expected, wine_dbgstr_w(received), test_index); - ok(lstrlen(expected) == len, + ok(expected_len == len, "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlen(expected), len, test_index); + expected_len, len, test_index); } } else { /* The property wasn't set earlier, so it should return whatever @@ -9293,6 +9297,7 @@ if(prop) { /* Use expected_value unless it's NULL, then use value. */ LPCSTR expected = prop->expected_value ? prop->expected_value : prop->value; + DWORD expected_len = expected ? strlen(expected) : 0; hr = IUriBuilder_GetPath(builder, &len, &received); if(prop->todo) { todo_wine { @@ -9306,9 +9311,9 @@ expected, wine_dbgstr_w(received), test_index); } todo_wine { - ok(lstrlen(expected) == len, + ok(expected_len == len, "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlen(expected), len, test_index); + expected_len, len, test_index); } } } else { @@ -9317,9 +9322,9 @@ hr, (expected ? S_OK : S_FALSE), test_index); ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", expected, wine_dbgstr_w(received), test_index); - ok(lstrlen(expected) == len, + ok(expected_len == len, "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlen(expected), len, test_index); + expected_len, len, test_index); } } else { /* The property wasn't set earlier, so it should return whatever @@ -9487,6 +9492,7 @@ if(prop) { /* Use expected_value unless it's NULL, then use value. */ LPCSTR expected = prop->expected_value ? prop->expected_value : prop->value; + DWORD expected_len = expected ? strlen(expected) : 0; hr = IUriBuilder_GetQuery(builder, &len, &received); if(prop->todo) { todo_wine { @@ -9500,9 +9506,9 @@ expected, wine_dbgstr_w(received), test_index); } todo_wine { - ok(lstrlen(expected) == len, + ok(expected_len == len, "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlen(expected), len, test_index); + expected_len, len, test_index); } } } else { @@ -9511,9 +9517,9 @@ hr, (expected ? S_OK : S_FALSE), test_index); ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", expected, wine_dbgstr_w(received), test_index); - ok(lstrlen(expected) == len, + ok(expected_len == len, "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlen(expected), len, test_index); + expected_len, len, test_index); } } else { /* The property wasn't set earlier, so it should return whatever @@ -9596,6 +9602,7 @@ if(prop) { /* Use expected_value unless it's NULL, then use value. */ LPCSTR expected = prop->expected_value ? prop->expected_value : prop->value; + DWORD expected_len = expected ? strlen(expected) : 0; hr = IUriBuilder_GetSchemeName(builder, &len, &received); if(prop->todo) { todo_wine { @@ -9609,9 +9616,9 @@ expected, wine_dbgstr_w(received), test_index); } todo_wine { - ok(lstrlen(expected) == len, + ok(expected_len == len, "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlen(expected), len, test_index); + expected_len, len, test_index); } } } else { @@ -9620,9 +9627,9 @@ hr, (expected ? S_OK : S_FALSE), test_index); ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", expected, wine_dbgstr_w(received), test_index); - ok(lstrlen(expected) == len, + ok(expected_len == len, "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlen(expected), len, test_index); + expected_len, len, test_index); } } else { /* The property wasn't set earlier, so it should return whatever @@ -9705,6 +9712,7 @@ if(prop && prop->value && *prop->value) { /* Use expected_value unless it's NULL, then use value. */ LPCSTR expected = prop->expected_value ? prop->expected_value : prop->value; + DWORD expected_len = expected ? strlen(expected) : 0; hr = IUriBuilder_GetUserName(builder, &len, &received); if(prop->todo) { todo_wine { @@ -9718,9 +9726,9 @@ expected, wine_dbgstr_w(received), test_index); } todo_wine { - ok(lstrlen(expected) == len, + ok(expected_len == len, "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlen(expected), len, test_index); + expected_len, len, test_index); } } } else { @@ -9729,9 +9737,9 @@ hr, (expected ? S_OK : S_FALSE), test_index); ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n", expected, wine_dbgstr_w(received), test_index); - ok(lstrlen(expected) == len, + ok(expected_len == len, "Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n", - lstrlen(expected), len, test_index); + expected_len, len, test_index); } } else { /* The property wasn't set earlier, so it should return whatever @@ -9946,7 +9954,7 @@ hr = IUriBuilder_SetIUri(builder, uri); ok(hr == S_OK, "Error: IUriBuilder_SetIUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); - /* IUriBuilder already had 'uri' as it's IUri property and so Windows doesn't + /* IUriBuilder already had 'uri' as its IUri property and so Windows doesn't * reset any of the changes that were made to the IUriBuilder. */ hr = IUriBuilder_HasBeenModified(builder, &received); @@ -10069,7 +10077,7 @@ if(test) IUri_Release(test); /* Still returns the same IUri, even though the base one wasn't created with CREATE_CANONICALIZE - * explicitly set (because it's a default flags). + * explicitly set (because it's a default flag). */ test = NULL; hr = IUriBuilder_CreateUri(builder, Uri_CREATE_CANONICALIZE, 0, 0, &test); @@ -10117,7 +10125,7 @@ if(test) IUri_Release(test); /* Still returns the same IUri, even though the base one wasn't created with CREATE_CANONICALIZE - * explicitly set (because it's a default flags). + * explicitly set (because it's a default flag). */ test = NULL; hr = IUriBuilder_CreateUriWithFlags(builder, Uri_CREATE_CANONICALIZE, 0, 0, 0, &test); @@ -11298,7 +11306,6 @@ ok(props == 0, "%d) Not all properties were processed %d. Next property type: %d\n", i, props, dw_data[0]); - IPersistStream_Release(persist_stream); IUri_Release(uri); hr = IStream_Seek(stream, no_off, STREAM_SEEK_SET, NULL); @@ -11306,6 +11313,8 @@ hr = IPersistStream_GetClassID(persist_stream, &curi); ok(hr == S_OK, "%d) GetClassID failed 0x%08x, expected S_OK.\n", i, hr); ok(IsEqualCLSID(&curi, &CLSID_CUri), "%d) GetClassID returned incorrect CLSID.\n", i); + IPersistStream_Release(persist_stream); + hr = CoCreateInstance(&curi, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, &IID_IUri, (void**)&uri); ok(hr == S_OK, "%d) Error creating uninitialized Uri: 0x%08x.\n", i, hr); @@ -11321,6 +11330,7 @@ "%d) Expected %s but got %s.\n", i, test->str_props[Uri_PROPERTY_RAW_URI].value, wine_dbgstr_w(raw_uri)); SysFreeString(raw_uri); + IPersistStream_Release(persist_stream); hr = IUri_QueryInterface(uri, &IID_IMarshal, (void**)&marshal); ok(hr == S_OK, "%d) QueryInterface(IID_IMarshal) failed 0x%08x, expected S_OK.\n", i, hr); @@ -11394,7 +11404,6 @@ IMarshal_Release(marshal); IStream_Release(stream); - IPersistStream_Release(persist_stream); IUri_Release(uri); heap_free(uriW); } @@ -11495,7 +11504,7 @@ START_TEST(uri) { HMODULE hurlmon; - hurlmon = GetModuleHandle("urlmon.dll"); + hurlmon = GetModuleHandleA("urlmon.dll"); pCoInternetGetSession = (void*) GetProcAddress(hurlmon, "CoInternetGetSession"); pCreateUri = (void*) GetProcAddress(hurlmon, "CreateUri"); pCreateUriWithFragment = (void*) GetProcAddress(hurlmon, "CreateUriWithFragment"); Modified: trunk/rostests/winetests/urlmon/url.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/urlmon/url.c?re…
============================================================================== --- trunk/rostests/winetests/urlmon/url.c [iso-8859-1] (original) +++ trunk/rostests/winetests/urlmon/url.c [iso-8859-1] Wed Apr 23 17:36:51 2014 @@ -50,6 +50,7 @@ DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); DEFINE_GUID(CLSID_IdentityUnmarshal,0x0000001b,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); DEFINE_GUID(IID_IBindStatusCallbackHolder,0x79eac9cc,0xbaf9,0x11ce,0x8c,0x82,0x00,0xaa,0x00,0x4b,0xa9,0x0b); +static const IID IID_undocumentedIE11 = {0xd5ae15f6,0x2032,0x488e,{0x8f,0x96,0xf9,0x24,0x06,0xd8,0xd8,0xb4}}; extern CLSID CLSID_AboutProtocol; #define DEFINE_EXPECT(func) \ @@ -96,7 +97,6 @@ DEFINE_EXPECT(QueryInterface_IBindStatusCallback); DEFINE_EXPECT(QueryInterface_IBindStatusCallbackEx); DEFINE_EXPECT(QueryInterface_IBindStatusCallbackHolder); -DEFINE_EXPECT(QueryInterface_IInternetBindInfo); DEFINE_EXPECT(QueryInterface_IAuthenticate); DEFINE_EXPECT(QueryInterface_IInternetProtocol); DEFINE_EXPECT(QueryInterface_IWindowForBindingUI); @@ -196,6 +196,8 @@ static BOOL abort_start = FALSE; static BOOL abort_progress = FALSE; static BOOL async_switch = FALSE; +static BOOL strict_bsc_qi; +static DWORD bindtest_flags; static const char *test_file; static WCHAR file_url[INTERNET_MAX_URL_LENGTH], current_url[INTERNET_MAX_URL_LENGTH]; @@ -218,18 +220,6 @@ END_DOWNLOAD } download_state; -static const char *debugstr_guid(REFIID riid) -{ - static char buf[50]; - - sprintf(buf, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", - riid->Data1, riid->Data2, riid->Data3, riid->Data4[0], - riid->Data4[1], riid->Data4[2], riid->Data4[3], riid->Data4[4], - riid->Data4[5], riid->Data4[6], riid->Data4[7]); - - return buf; -} - static BOOL proxy_active(void) { HKEY internet_settings; @@ -383,6 +373,8 @@ static HRESULT WINAPI Protocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv) { + static const IID IID_undocumentedIE10 = {0x7daf9908,0x8415,0x4005,{0x95,0xae,0xbd,0x27,0xf6,0xe3,0xdc,0x00}}; + *ppv = NULL; if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IInternetProtocol, riid)) { @@ -401,7 +393,12 @@ if(IsEqualGUID(&IID_IInternetProtocolEx, riid)) return E_NOINTERFACE; /* TODO */ - ok(0, "unexpected call %s\n", debugstr_guid(riid)); + if(IsEqualGUID(&IID_undocumentedIE10, riid)) { + trace("QI(%s)\n", wine_dbgstr_guid(riid)); + return E_NOINTERFACE; /* TODO */ + } + + ok(0, "unexpected call %s\n", wine_dbgstr_guid(riid)); return E_NOINTERFACE; } @@ -636,7 +633,7 @@ if(filedwl_api || !is_urlmon_protocol(test_protocol) || tymed != TYMED_ISTREAM || !(bindf&BINDF_ASYNCSTORAGE) || !(bindf&BINDF_PULLDATA)) ok(bind_info & BINDF_NEEDFILE, "BINDF_NEEDFILE is not set\n"); - else + else if(test_protocol != MK_TEST) /* IE10 sets BINDF_NEEDFILE for mk: protocol */ ok(!(bind_info & BINDF_NEEDFILE), "BINDF_NEEDFILE is set\n"); bind_info &= ~(BINDF_NEEDFILE|BINDF_FROMURLMON); @@ -705,11 +702,9 @@ static const WCHAR wszMimes[] = {'*','/','*',0}; - SET_EXPECT(QueryInterface_IInternetBindInfo); SET_EXPECT(QueryService_IInternetBindInfo); hres = IInternetBindInfo_GetBindString(pOIBindInfo, BINDSTRING_USER_AGENT, &ua, 1, &fetched); - CLEAR_CALLED(QueryInterface_IInternetBindInfo); /* IE <8 */ CLEAR_CALLED(QueryService_IInternetBindInfo); /* IE <8 */ ok(hres == E_NOINTERFACE, @@ -967,7 +962,7 @@ case 1: { IServiceProvider *service_provider; IHttpNegotiate *http_negotiate; - static WCHAR header[] = {'?',0}; + static const WCHAR header[] = {'?',0}; hres = IInternetProtocolSink_QueryInterface(protocol_sink, &IID_IServiceProvider, (void**)&service_provider); @@ -1134,7 +1129,7 @@ } if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == WINETEST_TEST) { - static int pending = TRUE; + static BOOL pending = TRUE; pending = !pending; @@ -1363,7 +1358,7 @@ else if(IsEqualGUID(rguidReason, &IID_ICodeInstall)) CHECK_EXPECT(GetWindow_ICodeInstall); else - ok(0, "Unexpected rguidReason: %s\n", debugstr_guid(rguidReason)); + ok(0, "Unexpected rguidReason: %s\n", wine_dbgstr_guid(rguidReason)); *phwnd = NULL; return S_OK; @@ -1442,7 +1437,19 @@ return S_OK; } - ok(0, "unexpected service %s\n", debugstr_guid(guidService)); + if(IsEqualGUID(&IID_IGetBindHandle, guidService)) { + trace("QueryService(IID_IGetBindHandle)\n"); + *ppv = NULL; + return E_NOINTERFACE; + } + + if(IsEqualGUID(&IID_undocumentedIE11, guidService)) { + trace("QueryService(IID_undocumentedIE11)\n"); + *ppv = NULL; + return E_NOINTERFACE; + } + + ok(0, "unexpected service %s\n", wine_dbgstr_guid(guidService)); return E_NOINTERFACE; } @@ -1462,7 +1469,7 @@ DWORD status, size; HRESULT hres, expect; - /* QueryInfo changes it's behavior during this request */ + /* QueryInfo changes its behavior during this request */ if(progress == BINDSTATUS_SENDINGREQUEST) return; @@ -1505,6 +1512,8 @@ static HRESULT WINAPI statusclb_QueryInterface(IBindStatusCallbackEx *iface, REFIID riid, void **ppv) { + static const IID IID_undocumentedIE10 = {0xf286fa56,0xc1fd,0x4270,{0x8e,0x67,0xb3,0xeb,0x79,0x0a,0x81,0xe8}}; + ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId()); if(IsEqualGUID(&IID_IInternetProtocol, riid)) { @@ -1515,67 +1524,57 @@ }else { return E_NOINTERFACE; } - } - else if (IsEqualGUID(&IID_IServiceProvider, riid)) - { + }else if (IsEqualGUID(&IID_IServiceProvider, riid)) { CHECK_EXPECT2(QueryInterface_IServiceProvider); *ppv = &ServiceProvider; return S_OK; - } - else if (IsEqualGUID(&IID_IHttpNegotiate, riid)) - { + }else if (IsEqualGUID(&IID_IHttpNegotiate, riid)) { CHECK_EXPECT2(QueryInterface_IHttpNegotiate); *ppv = &HttpNegotiate; return S_OK; - } - else if (IsEqualGUID(&IID_IHttpNegotiate2, riid)) - { + }else if (IsEqualGUID(&IID_IHttpNegotiate2, riid)) { CHECK_EXPECT(QueryInterface_IHttpNegotiate2); *ppv = &HttpNegotiate; return S_OK; - } - else if (IsEqualGUID(&IID_IAuthenticate, riid)) - { + }else if (IsEqualGUID(&IID_IAuthenticate, riid)) { CHECK_EXPECT(QueryInterface_IAuthenticate); return E_NOINTERFACE; - } - else if(IsEqualGUID(&IID_IBindStatusCallback, riid)) - { - CHECK_EXPECT2(QueryInterface_IBindStatusCallback); + }else if(IsEqualGUID(&IID_IBindStatusCallback, riid)) { + if(strict_bsc_qi) + CHECK_EXPECT2(QueryInterface_IBindStatusCallback); *ppv = iface; return S_OK; - } - else if(IsEqualGUID(&IID_IBindStatusCallbackHolder, riid)) - { + }else if(IsEqualGUID(&IID_IBindStatusCallbackHolder, riid)) { CHECK_EXPECT2(QueryInterface_IBindStatusCallbackHolder); return E_NOINTERFACE; - } - else if(IsEqualGUID(&IID_IBindStatusCallbackEx, riid)) - { + }else if(IsEqualGUID(&IID_IBindStatusCallbackEx, riid)) { CHECK_EXPECT(QueryInterface_IBindStatusCallbackEx); if(!use_bscex) return E_NOINTERFACE; *ppv = iface; return S_OK; - } - else if(IsEqualGUID(&IID_IInternetBindInfo, riid)) - { + }else if(IsEqualGUID(&IID_IInternetBindInfo, riid)) { /* TODO */ - CHECK_EXPECT2(QueryInterface_IInternetBindInfo); - } - else if(IsEqualGUID(&IID_IWindowForBindingUI, riid)) - { + }else if(IsEqualGUID(&IID_IWindowForBindingUI, riid)) { CHECK_EXPECT2(QueryInterface_IWindowForBindingUI); return E_NOINTERFACE; - } - else if(IsEqualGUID(&IID_IHttpSecurity, riid)) - { + }else if(IsEqualGUID(&IID_IHttpSecurity, riid)) { CHECK_EXPECT2(QueryInterface_IHttpSecurity); return E_NOINTERFACE; - } - else - { - ok(0, "unexpected interface %s\n", debugstr_guid(riid)); + }else if(IsEqualGUID(&IID_IGetBindHandle, riid)) { + trace("QI(IID_IGetBindHandle)\n"); + *ppv = NULL; + return E_NOINTERFACE; + }else if(IsEqualGUID(&IID_undocumentedIE10, riid)) { + trace("QI(IID_undocumentedIE10)\n"); + *ppv = NULL; + return E_NOINTERFACE; + }else if(IsEqualGUID(&IID_undocumentedIE11, riid)) { + trace("QI(IID_undocumentedIE11)\n"); + *ppv = NULL; + return E_NOINTERFACE; + }else { + ok(0, "unexpected interface %s\n", wine_dbgstr_guid(riid)); } return E_NOINTERFACE; @@ -1637,7 +1636,7 @@ hres = IBinding_GetBindResult(pib, &clsid, &res, &res_str, NULL); ok(hres == S_OK, "GetBindResult failed: %08x, expected S_OK\n", hres); - ok(IsEqualCLSID(&clsid, &CLSID_NULL), "incorrect clsid: %s\n", debugstr_guid(&clsid)); + ok(IsEqualCLSID(&clsid, &CLSID_NULL), "incorrect clsid: %s\n", wine_dbgstr_guid(&clsid)); ok(!res, "incorrect res: %x\n", res); ok(!res_str, "incorrect res_str: %s\n", wine_dbgstr_w(res_str)); @@ -1671,6 +1670,8 @@ if(iface == &objbsc) CHECK_EXPECT(Obj_OnProgress_FINDINGRESOURCE); else if(test_protocol == FTP_TEST) + todo_wine CHECK_EXPECT(OnProgress_FINDINGRESOURCE); + else if(test_protocol == HTTPS_TEST && !bindtest_flags) todo_wine CHECK_EXPECT(OnProgress_FINDINGRESOURCE); else CHECK_EXPECT(OnProgress_FINDINGRESOURCE); @@ -1807,7 +1808,7 @@ hr = CLSIDFromString((LPCOLESTR)szStatusText, &clsid); ok(hr == S_OK, "CLSIDFromString failed with error 0x%08x\n", hr); ok(IsEqualCLSID(&clsid, &CLSID_HTMLDocument), - "Expected clsid to be CLSID_HTMLDocument instead of %s\n", debugstr_guid(&clsid)); + "Expected clsid to be CLSID_HTMLDocument instead of %s\n", wine_dbgstr_guid(&clsid)); break; } case BINDSTATUS_BEGINSYNCOPERATION: @@ -1899,31 +1900,31 @@ if(hresult==S_OK || (abort_start && hresult!=S_FALSE) || hresult == REGDB_E_CLASSNOTREG) { ok(IsEqualCLSID(&clsid, &CLSID_NULL), "incorrect protocol CLSID: %s, expected CLSID_NULL\n", - debugstr_guid(&clsid)); + wine_dbgstr_guid(&clsid)); }else if(emulate_protocol) { todo_wine ok(IsEqualCLSID(&clsid, &CLSID_FtpProtocol), "incorrect protocol CLSID: %s, expected CLSID_FtpProtocol\n", - debugstr_guid(&clsid)); + wine_dbgstr_guid(&clsid)); }else if(test_protocol == FTP_TEST) { ok(IsEqualCLSID(&clsid, &CLSID_FtpProtocol), "incorrect protocol CLSID: %s, expected CLSID_FtpProtocol\n", - debugstr_guid(&clsid)); + wine_dbgstr_guid(&clsid)); }else if(test_protocol == FILE_TEST) { ok(IsEqualCLSID(&clsid, &CLSID_FileProtocol), "incorrect protocol CLSID: %s, expected CLSID_FileProtocol\n", - debugstr_guid(&clsid)); + wine_dbgstr_guid(&clsid)); }else if(test_protocol == HTTP_TEST) { ok(IsEqualCLSID(&clsid, &CLSID_HttpProtocol), "incorrect protocol CLSID: %s, expected CLSID_HttpProtocol\n", - debugstr_guid(&clsid)); + wine_dbgstr_guid(&clsid)); }else if(test_protocol == HTTPS_TEST) { ok(IsEqualCLSID(&clsid, &CLSID_HttpSProtocol), "incorrect protocol CLSID: %s, expected CLSID_HttpSProtocol\n", - debugstr_guid(&clsid)); + wine_dbgstr_guid(&clsid)); }else if(test_protocol == ABOUT_TEST) { ok(IsEqualCLSID(&clsid, &CLSID_AboutProtocol), "incorrect protocol CLSID: %s, expected CLSID_AboutProtocol\n", - debugstr_guid(&clsid)); + wine_dbgstr_guid(&clsid)); }else { ok(0, "unexpected (%d)\n", test_protocol); } @@ -1985,9 +1986,9 @@ if (mime_type[0]) { INT ret; clipfmt[0] = 0; - ret = GetClipboardFormatName(pformatetc->cfFormat, clipfmt, sizeof(clipfmt)-1); + ret = GetClipboardFormatNameA(pformatetc->cfFormat, clipfmt, sizeof(clipfmt)-1); ok(ret, "GetClipboardFormatName failed, error %d\n", GetLastError()); - ok(!lstrcmp(clipfmt, mime_type), "clipformat %x != mime_type, \"%s\" != \"%s\"\n", + ok(!strcmp(clipfmt, mime_type), "clipformat %x != mime_type, \"%s\" != \"%s\"\n", pformatetc->cfFormat, clipfmt, mime_type); } else { ok(pformatetc->cfFormat == 0, "clipformat=%x\n", pformatetc->cfFormat); @@ -2078,7 +2079,7 @@ if(iface != &objbsc) ok(0, "unexpected call\n"); - ok(IsEqualGUID(&IID_IUnknown, riid), "riid = %s\n", debugstr_guid(riid)); + ok(IsEqualGUID(&IID_IUnknown, riid), "riid = %s\n", wine_dbgstr_guid(riid)); ok(punk != NULL, "punk == NULL\n"); return S_OK; @@ -2119,7 +2120,7 @@ static HRESULT WINAPI MonikerProp_QueryInterface(IMonikerProp *iface, REFIID riid, void **ppv) { *ppv = NULL; - ok(0, "unexpected riid %s\n", debugstr_guid(riid)); + ok(0, "unexpected riid %s\n", wine_dbgstr_guid(riid)); return E_NOINTERFACE; } @@ -2171,7 +2172,7 @@ if(*ppv) return S_OK; - ok(0, "unexpected riid %s\n", debugstr_guid(riid)); + ok(0, "unexpected riid %s\n", wine_dbgstr_guid(riid)); return E_NOINTERFACE; } @@ -2319,7 +2320,7 @@ if(IsEqualGUID(&CLSID_IdentityUnmarshal, riid)) return E_NOINTERFACE; - ok(0, "unexpected riid %s\n", debugstr_guid(riid)); + ok(0, "unexpected riid %s\n", wine_dbgstr_guid(riid)); return E_NOTIMPL; } @@ -2337,7 +2338,7 @@ { CHECK_EXPECT(CreateInstance); ok(!outer, "outer = %p\n", outer); - ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n", debugstr_guid(riid)); + ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n", wine_dbgstr_guid(riid)); *ppv = &PersistMoniker; return S_OK; } @@ -2370,7 +2371,7 @@ if(IsEqualGUID(&IID_IInternetProtocolInfo, riid)) return E_NOINTERFACE; - ok(0, "unexpected riid %s\n", debugstr_guid(riid)); + ok(0, "unexpected riid %s\n", wine_dbgstr_guid(riid)); return E_NOTIMPL; } @@ -2380,7 +2381,7 @@ return E_NOINTERFACE; todo_wine ok(outer != NULL, "outer == NULL\n"); - todo_wine ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n", debugstr_guid(riid)); + todo_wine ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n", wine_dbgstr_guid(riid)); *ppv = &Protocol; return S_OK; } @@ -2711,6 +2712,8 @@ IUnknown *unk; HRESULT hres; + strict_bsc_qi = TRUE; + hres = CreateBindCtx(0, &bindctx); ok(hres == S_OK, "BindCtx failed: %08x\n", hres); @@ -2797,6 +2800,8 @@ IBindStatusCallback_Release(prev_clb); IBindCtx_Release(bindctx); + + strict_bsc_qi = FALSE; return ret; } @@ -2819,6 +2824,7 @@ const char *url_a = NULL; test_protocol = protocol; + bindtest_flags = flags; emulate_protocol = (flags & BINDTEST_EMULATE) != 0; download_state = BEFORE_DOWNLOAD; stopped_binding = FALSE; @@ -2851,7 +2857,7 @@ url_a = "its:test.chm::/blank.html"; break; case HTTPS_TEST: - url_a = (flags & BINDTEST_INVALID_CN) ? "
https://209.46.25.132/test.html
" : "
https://www.codeweavers.com/test.html
"; + url_a = (flags & BINDTEST_INVALID_CN) ? "
https://209.46.25.134/favicon.ico
" : "
https://test.winehq.org/tests/hello.html
"; break; case FTP_TEST: url_a = "
ftp://ftp.winehq.org/pub/other/winelogo.xcf.tar.bz2
"; @@ -2959,7 +2965,6 @@ SET_EXPECT(UnlockRequest); }else { if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == WINETEST_TEST) { - SET_EXPECT(QueryInterface_IInternetBindInfo); SET_EXPECT(QueryService_IInternetBindInfo); if(!abort_start) SET_EXPECT(QueryInterface_IHttpNegotiate); @@ -3061,9 +3066,9 @@ return; if((bindf & BINDF_ASYNCHRONOUS) && !no_callback) { - while(!stopped_binding && GetMessage(&msg,NULL,0,0)) { + while(!stopped_binding && GetMessageA(&msg,NULL,0,0)) { TranslateMessage(&msg); - DispatchMessage(&msg); + DispatchMessageA(&msg); } } @@ -3091,7 +3096,7 @@ } if(emulate_protocol) { if(is_urlmon_protocol(test_protocol)) - CHECK_CALLED(SetPriority); + CLEAR_CALLED(SetPriority); /* Not called by IE11 */ CHECK_CALLED(Start); if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == WINETEST_TEST || test_protocol == WINETEST_SYNC_TEST) { @@ -3103,7 +3108,6 @@ CHECK_CALLED(UnlockRequest); }else { if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == WINETEST_TEST) { - CLEAR_CALLED(QueryInterface_IInternetBindInfo); CLEAR_CALLED(QueryService_IInternetBindInfo); if(!abort_start) CHECK_CALLED(QueryInterface_IHttpNegotiate); @@ -3331,9 +3335,9 @@ IUnknown_Release(unk); while((bindf & BINDF_ASYNCHRONOUS) && - !((!emulate_protocol || stopped_binding) && stopped_obj_binding) && GetMessage(&msg,NULL,0,0)) { + !((!emulate_protocol || stopped_binding) && stopped_obj_binding) && GetMessageA(&msg,NULL,0,0)) { TranslateMessage(&msg); - DispatchMessage(&msg); + DispatchMessageA(&msg); } CLEAR_CALLED(QueryInterface_IBindStatusCallbackEx); @@ -3344,7 +3348,7 @@ CHECK_CALLED(Obj_OnStartBinding); if(emulate_protocol) { if(is_urlmon_protocol(test_protocol)) - CHECK_CALLED(SetPriority); + CLEAR_CALLED(SetPriority); /* Not called by IE11 */ CHECK_CALLED(Start); if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST) CHECK_CALLED(Terminate); @@ -3424,10 +3428,9 @@ SET_EXPECT(GetBindInfo); SET_EXPECT(QueryInterface_IInternetProtocol); - if(!emulate_protocol) { - SET_EXPECT(QueryInterface_IServiceProvider); + SET_EXPECT(QueryInterface_IServiceProvider); + if(!emulate_protocol) SET_EXPECT(QueryService_IInternetProtocol); - } SET_EXPECT(OnStartBinding); if(emulate_protocol) { if(is_urlmon_protocol(test_protocol)) @@ -3467,11 +3470,13 @@ if(!emulate_protocol) { CHECK_CALLED(QueryInterface_IServiceProvider); CHECK_CALLED(QueryService_IInternetProtocol); + }else { + CLEAR_CALLED(QueryInterface_IServiceProvider); } CHECK_CALLED(OnStartBinding); if(emulate_protocol) { if(is_urlmon_protocol(test_protocol)) - CHECK_CALLED(SetPriority); + CLEAR_CALLED(SetPriority); /* Not called by IE11 */ CHECK_CALLED(Start); CHECK_CALLED(UnlockRequest); }else { @@ -3724,7 +3729,7 @@ CHECK_CALLED(QueryInterface_IInternetProtocol); CHECK_CALLED(OnStartBinding); if(is_urlmon_protocol(test_protocol)) - CHECK_CALLED(SetPriority); + CLEAR_CALLED(SetPriority); /* Not called by IE11 */ CHECK_CALLED(Start); ok(unk == NULL, "unk=%p\n", unk); @@ -3843,7 +3848,7 @@ { HMODULE hurlmon; - hurlmon = GetModuleHandle("urlmon.dll"); + hurlmon = GetModuleHandleA("urlmon.dll"); pCreateAsyncBindCtxEx = (void*) GetProcAddress(hurlmon, "CreateAsyncBindCtxEx"); if(!GetProcAddress(hurlmon, "CompareSecurityIds")) { @@ -3855,8 +3860,8 @@ if(!pCreateUri) win_skip("IUri not supported\n"); - complete_event = CreateEvent(NULL, FALSE, FALSE, NULL); - complete_event2 = CreateEvent(NULL, FALSE, FALSE, NULL); + complete_event = CreateEventW(NULL, FALSE, FALSE, NULL); + complete_event2 = CreateEventW(NULL, FALSE, FALSE, NULL); thread_id = GetCurrentThreadId(); create_html_file(); create_cache_file(); @@ -3923,11 +3928,13 @@ http_is_first = TRUE; test_BindToStorage(HTTPS_TEST, BINDTEST_INVALID_CN, TYMED_ISTREAM); - trace("synchronous https test (invalid CN, fail)\n"); + bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA; + + trace("asynchronous https test (invalid CN, fail)\n"); onsecurityproblem_hres = E_FAIL; test_BindToStorage(HTTPS_TEST, BINDTEST_INVALID_CN, TYMED_ISTREAM); - trace("synchronous https test (invalid CN, accept)\n"); + trace("asynchronous https test (invalid CN, accept)\n"); onsecurityproblem_hres = S_OK; test_BindToStorage(HTTPS_TEST, BINDTEST_INVALID_CN, TYMED_ISTREAM); @@ -3936,8 +3943,6 @@ test_BindToStorage(HTTPS_TEST, BINDTEST_INVALID_CN, TYMED_ISTREAM); invalid_cn_accepted = FALSE; - bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA; - trace("winetest test (async switch)...\n"); test_BindToStorage(WINETEST_TEST, BINDTEST_EMULATE|BINDTEST_ASYNC_SWITCH, TYMED_ISTREAM); @@ -3992,7 +3997,6 @@ test_BindToStorage(WINETEST_TEST, BINDTEST_EMULATE|BINDTEST_NO_CALLBACK|BINDTEST_USE_CACHE, TYMED_ISTREAM); trace("asynchronous https test...\n"); - http_is_first = TRUE; test_BindToStorage(HTTPS_TEST, 0, TYMED_ISTREAM); trace("emulated https test...\n");
10 years, 8 months
1
0
0
0
[akhaldi] 62929: [URLMON] * Sync with Wine 1.7.17. CORE-8080
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Apr 23 17:35:17 2014 New Revision: 62929 URL:
http://svn.reactos.org/svn/reactos?rev=62929&view=rev
Log: [URLMON] * Sync with Wine 1.7.17. CORE-8080 Added: trunk/reactos/dll/win32/urlmon/urlmon_ros.diff (with props) Modified: trunk/reactos/dll/win32/urlmon/axinstall.c trunk/reactos/dll/win32/urlmon/bindprot.c trunk/reactos/dll/win32/urlmon/http.c trunk/reactos/dll/win32/urlmon/internet.c trunk/reactos/dll/win32/urlmon/protocol.c trunk/reactos/dll/win32/urlmon/sec_mgr.c trunk/reactos/dll/win32/urlmon/session.c trunk/reactos/dll/win32/urlmon/uri.c trunk/reactos/dll/win32/urlmon/urlmon.spec trunk/reactos/dll/win32/urlmon/urlmon_urlmon.idl trunk/reactos/include/psdk/urlmon.idl trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/urlmon/axinstall.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/axinstall…
============================================================================== --- trunk/reactos/dll/win32/urlmon/axinstall.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/urlmon/axinstall.c [iso-8859-1] Wed Apr 23 17:35:17 2014 @@ -439,7 +439,7 @@ if(!ext) ext = ptr; - if(!strcmpW(ext, cab_extW)) { + if(!strcmpiW(ext, cab_extW)) { hres = install_cab_file(ctx); }else { FIXME("Unsupported extension %s\n", debugstr_w(ext)); Modified: trunk/reactos/dll/win32/urlmon/bindprot.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/bindprot.…
============================================================================== --- trunk/reactos/dll/win32/urlmon/bindprot.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/urlmon/bindprot.c [iso-8859-1] Wed Apr 23 17:35:17 2014 @@ -204,7 +204,7 @@ return hres; } - /* NOTE: IE9 calls it on the new protocol_sink. It doesn't make sense to is seems to be a bug there. */ + /* NOTE: IE9 calls it on the new protocol_sink. It doesn't make sense so it seems to be a bug there. */ IInternetProtocolSink_ReportProgress(This->protocol_sink, BINDSTATUS_LOADINGMIMEHANDLER, NULL); return S_OK; Modified: trunk/reactos/dll/win32/urlmon/http.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/http.c?re…
============================================================================== --- trunk/reactos/dll/win32/urlmon/http.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/urlmon/http.c [iso-8859-1] Wed Apr 23 17:35:17 2014 @@ -274,7 +274,7 @@ HINTERNET internet_session, IInternetBindInfo *bind_info) { HttpProtocol *This = impl_from_Protocol(prot); - LPWSTR addl_header = NULL, post_cookie = NULL; + WCHAR *addl_header = NULL, *post_cookie = NULL, *rootdoc_url = NULL; IServiceProvider *service_provider = NULL; IHttpNegotiate2 *http_negotiate2 = NULL; BSTR url, host, user, pass, path; @@ -316,6 +316,13 @@ if(!This->base.connection) { WARN("InternetConnect failed: %d\n", GetLastError()); return INET_E_CANNOT_CONNECT; + } + + num = 0; + hres = IInternetBindInfo_GetBindString(bind_info, BINDSTRING_ROOTDOC_URL, &rootdoc_url, 1, &num); + if(hres == S_OK && num) { + FIXME("Use root doc URL %s\n", debugstr_w(rootdoc_url)); + CoTaskMemFree(rootdoc_url); } num = sizeof(accept_mimes)/sizeof(accept_mimes[0])-1; Modified: trunk/reactos/dll/win32/urlmon/internet.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/internet.…
============================================================================== --- trunk/reactos/dll/win32/urlmon/internet.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/urlmon/internet.c [iso-8859-1] Wed Apr 23 17:35:17 2014 @@ -631,22 +631,17 @@ static HRESULT get_feature_from_process(INTERNETFEATURELIST feature) { - HRESULT hres; + HRESULT hres = S_OK; EnterCriticalSection(&process_features_cs); /* Try loading the feature from the registry, if it hasn't already * been done. */ - if(process_feature_controls[feature].check_registry) { + if(process_feature_controls[feature].check_registry) hres = load_process_feature(feature); - if(FAILED(hres)) { - LeaveCriticalSection(&process_features_cs); - return hres; - } - } - - hres = process_feature_controls[feature].enabled ? S_OK : S_FALSE; + if(SUCCEEDED(hres)) + hres = process_feature_controls[feature].enabled ? S_OK : S_FALSE; LeaveCriticalSection(&process_features_cs); Modified: trunk/reactos/dll/win32/urlmon/protocol.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/protocol.…
============================================================================== --- trunk/reactos/dll/win32/urlmon/protocol.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/urlmon/protocol.c [iso-8859-1] Wed Apr 23 17:35:17 2014 @@ -512,6 +512,7 @@ if(!protocol->protocol_sink) return S_OK; + /* NOTE: IE10 returns S_OK here */ if(protocol->flags & FLAG_RESULT_REPORTED) return INET_E_RESULT_DISPATCHED; Modified: trunk/reactos/dll/win32/urlmon/sec_mgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/sec_mgr.c…
============================================================================== --- trunk/reactos/dll/win32/urlmon/sec_mgr.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/urlmon/sec_mgr.c [iso-8859-1] Wed Apr 23 17:35:17 2014 @@ -38,6 +38,12 @@ 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', 'I','n','t','e','r','n','e','t',' ','S','e','t','t','i','n','g','s','\\', 'Z','o','n','e','s','\\',0}; +static const WCHAR zone_map_keyW[] = {'S','o','f','t','w','a','r','e','\\', + 'M','i','c','r','o','s','o','f','t','\\', + 'W','i','n','d','o','w','s','\\', + 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', + 'I','n','t','e','r','n','e','t',' ','S','e','t','t','i','n','g','s','\\', + 'Z','o','n','e','M','a','p',0}; static const WCHAR wszZoneMapDomainsKey[] = {'S','o','f','t','w','a','r','e','\\', 'M','i','c','r','o','s','o','f','t','\\', 'W','i','n','d','o','w','s','\\', @@ -283,7 +289,7 @@ * search_domain_for_zone [internal] * * Searches the specified 'domain' registry key to see if 'host' maps into it, or any - * of it's subdomain registry keys. + * of its subdomain registry keys. * * Returns S_OK if a match is found, S_FALSE if no matches were found, or an error code. */ @@ -375,7 +381,7 @@ /* There's a chance that 'host' implicitly mapped into 'domain', in * which case we check to see if 'domain' contains zone information. * - * This can only happen if 'domain' is it's own domain name. + * This can only happen if 'domain' is its own domain name. * Example: * "
google.com
" (domain name = "
google.com
") * @@ -384,7 +390,7 @@ * * Then host would map directly into the "
google.com
" domain key. * - * If 'domain' has more than just it's domain name, or it does not + * If 'domain' has more than just its domain name, or it does not * have a domain name, then we don't perform the check. The reason * for this is that these domains don't allow implicit mappings. * Example: @@ -2056,3 +2062,32 @@ FIXME("(%p %d %p %d %x)\n", secid1, size1, secid2, size2, reserved); return E_NOTIMPL; } + +/******************************************************************** + * IsInternetESCEnabledLocal (URLMON.108) + * + * Undocumented, returns if IE is running in Enhanced Security Configuration. + */ +BOOL WINAPI IsInternetESCEnabledLocal(void) +{ + static BOOL esc_initialized, esc_enabled; + + TRACE("()\n"); + + if(!esc_initialized) { + DWORD type, size, val; + HKEY zone_map; + + static const WCHAR iehardenW[] = {'I','E','H','a','r','d','e','n',0}; + + if(RegOpenKeyExW(HKEY_CURRENT_USER, zone_map_keyW, 0, KEY_QUERY_VALUE, &zone_map) == ERROR_SUCCESS) { + size = sizeof(DWORD); + if(RegQueryValueExW(zone_map, iehardenW, NULL, &type, (BYTE*)&val, &size) == ERROR_SUCCESS) + esc_enabled = type == REG_DWORD && val != 0; + RegCloseKey(zone_map); + } + esc_initialized = TRUE; + } + + return esc_enabled; +} Modified: trunk/reactos/dll/win32/urlmon/session.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/session.c…
============================================================================== --- trunk/reactos/dll/win32/urlmon/session.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/urlmon/session.c [iso-8859-1] Wed Apr 23 17:35:17 2014 @@ -529,15 +529,26 @@ { OSVERSIONINFOW info = {sizeof(info)}; const WCHAR *os_type, *is_nt; - WCHAR buf[512]; + WCHAR buf[512], *ret, *tmp; + DWORD res, idx=0; + size_t len, size; BOOL is_wow; + HKEY key; static const WCHAR formatW[] = {'M','o','z','i','l','l','a','/','4','.','0', ' ','(','c','o','m','p','a','t','i','b','l','e',';', ' ','M','S','I','E',' ','8','.','0',';', ' ','W','i','n','d','o','w','s',' ','%','s','%','d','.','%','d',';', - ' ','%','s',';',' ','T','r','i','d','e','n','t','/','5','.','0',')',0}; + ' ','%','s',';',' ','T','r','i','d','e','n','t','/','5','.','0',0}; + static const WCHAR post_platform_keyW[] = + {'S','O','F','T','W','A','R','E', + '\\','M','i','c','r','o','s','o','f','t', + '\\','W','i','n','d','o','w','s', + '\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n', + '\\','I','n','t','e','r','n','e','t',' ','S','e','t','t','i','n','g','s', + '\\','5','.','0','\\','U','s','e','r',' ','A','g','e','n','t', + '\\','P','o','s','t',' ','P','l','a','t','f','o','r','m',0}; static const WCHAR ntW[] = {'N','T',' ',0}; static const WCHAR win32W[] = {'W','i','n','3','2',0}; static const WCHAR win64W[] = {'W','i','n','6','4',0}; @@ -558,7 +569,48 @@ os_type = win32W; sprintfW(buf, formatW, is_nt, info.dwMajorVersion, info.dwMinorVersion, os_type); - user_agent = heap_strdupW(buf); + len = strlenW(buf); + + size = len+40; + ret = heap_alloc(size * sizeof(WCHAR)); + if(!ret) + return; + + memcpy(ret, buf, len*sizeof(WCHAR)); + + res = RegOpenKeyW(HKEY_LOCAL_MACHINE, post_platform_keyW, &key); + if(res == ERROR_SUCCESS) { + DWORD value_len; + + while(1) { + value_len = sizeof(buf)/sizeof(WCHAR); + res = RegEnumValueW(key, idx, buf, &value_len, NULL, NULL, NULL, NULL); + if(res != ERROR_SUCCESS) + break; + idx++; + + if(len + value_len + 2 /* strlen("; ") */ + 1 /* trailing ')' */ >= size) { + tmp = heap_realloc(ret, (size*2+value_len)*sizeof(WCHAR)); + if(!tmp) + break; + ret = tmp; + size = size*2+value_len; + } + + ret[len++] = ';'; + ret[len++] = ' '; + memcpy(ret+len, buf, value_len*sizeof(WCHAR)); + len += value_len; + } + + RegCloseKey(key); + } + + ret[len++] = ')'; + ret[len++] = 0; + + user_agent = ret; + TRACE("Using user agent %s\n", debugstr_w(user_agent)); } LPWSTR get_useragent(void) Modified: trunk/reactos/dll/win32/urlmon/uri.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/uri.c?rev…
============================================================================== --- trunk/reactos/dll/win32/urlmon/uri.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/urlmon/uri.c [iso-8859-1] Wed Apr 23 17:35:17 2014 @@ -566,7 +566,7 @@ DWORD i; /* If the sec_last_tld is 3 characters long it HAS to be on the list of * recognized to still be considered part of the TLD name, otherwise - * its considered the domain name. + * it's considered the domain name. * Ex:
www.google.com.uk
-> google.com.uk as the domain name. *
www.google.foo.uk
-> foo.uk as the domain name. */ @@ -1610,7 +1610,7 @@ /* An IPv6 address can have no more than 8 h16 components. */ if(ip.h16_count >= 8) { *ptr = start; - TRACE("(%p %p %x): Not a IPv6 address, to many h16 components.\n", + TRACE("(%p %p %x): Not a IPv6 address, too many h16 components.\n", ptr, data, flags); return FALSE; } @@ -1896,7 +1896,7 @@ return TRUE; } -/* Parses the path of an opaque URI (much less strict then the parser +/* Parses the path of an opaque URI (much less strict than the parser * for a hierarchical URI). * * NOTE: @@ -4271,16 +4271,16 @@ return E_POINTER; if(uriProp > Uri_PROPERTY_STRING_LAST) { - /* Windows allocates an empty BSTR for invalid Uri_PROPERTY's. */ - *pbstrProperty = SysAllocStringLen(NULL, 0); - if(!(*pbstrProperty)) - return E_OUTOFMEMORY; - /* It only returns S_FALSE for the ZONE property... */ - if(uriProp == Uri_PROPERTY_ZONE) + if(uriProp == Uri_PROPERTY_ZONE) { + *pbstrProperty = SysAllocStringLen(NULL, 0); + if(!(*pbstrProperty)) + return E_OUTOFMEMORY; return S_FALSE; - else - return S_OK; + } + + *pbstrProperty = NULL; + return E_INVALIDARG; } /* Don't have support for flags yet. */ @@ -6031,7 +6031,7 @@ Uri *uri; if((uri = get_uri_obj(pIUri))) { - /* Only reset the builder if it's Uri isn't the same as + /* Only reset the builder if its Uri isn't the same as * the Uri passed to the function. */ if(This->uri != uri) { @@ -6048,7 +6048,7 @@ return E_NOTIMPL; } } else if(This->uri) - /* Only reset the builder if it's Uri isn't NULL. */ + /* Only reset the builder if its Uri isn't NULL. */ reset_builder(This); return S_OK; @@ -6534,7 +6534,7 @@ data.path_len = proc_uri->path_len; } else if(!data.is_opaque) { /* Just set the path as a '/' if the base didn't have - * one and if it's an hierarchical URI. + * one and if it's a hierarchical URI. */ static const WCHAR slashW[] = {'/',0}; data.path = slashW; Modified: trunk/reactos/dll/win32/urlmon/urlmon.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/urlmon.sp…
============================================================================== --- trunk/reactos/dll/win32/urlmon/urlmon.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/urlmon/urlmon.spec [iso-8859-1] Wed Apr 23 17:35:17 2014 @@ -95,6 +95,7 @@ @ stub WriteHitLogging @ stub ZonesReInit +108 stdcall @() IsInternetESCEnabledLocal 111 stdcall @(wstr) IsProtectedModeURL 328 stdcall @(ptr ptr) propsys.VariantCompare 329 stdcall @(ptr ptr) propsys.VariantToGUID Added: trunk/reactos/dll/win32/urlmon/urlmon_ros.diff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/urlmon_ro…
============================================================================== --- trunk/reactos/dll/win32/urlmon/urlmon_ros.diff (added) +++ trunk/reactos/dll/win32/urlmon/urlmon_ros.diff [iso-8859-1] Wed Apr 23 17:35:17 2014 @@ -0,0 +1,96 @@ +diff -prudN e:\Wine\dlls\urlmon/bindprot.c e:\reactos\dll\win32\urlmon/bindprot.c +--- e:\Wine\dlls\urlmon/bindprot.c 2014-04-04 14:12:42.439519600 +0100 ++++ e:\reactos\dll\win32\urlmon/bindprot.c 2014-04-11 16:18:48.958227500 +0100 +@@ -83,36 +80,14 @@ static LRESULT WINAPI notif_wnd_proc(HWN + return DefWindowProcW(hwnd, msg, wParam, lParam); + } + +-static const WCHAR wszURLMonikerNotificationWindow[] = +- {'U','R','L',' ','M','o','n','i','k','e','r',' ', +- 'N','o','t','i','f','i','c','a','t','i','o','n',' ','W','i','n','d','o','w',0}; +- +-static ATOM notif_wnd_class; +- +-static BOOL WINAPI register_notif_wnd_class(INIT_ONCE *once, void *param, void **context) +-{ +- static WNDCLASSEXW wndclass = { +- sizeof(wndclass), 0, notif_wnd_proc, 0, 0, +- NULL, NULL, NULL, NULL, NULL, +- wszURLMonikerNotificationWindow, NULL +- }; +- +- wndclass.hInstance = hProxyDll; +- notif_wnd_class = RegisterClassExW(&wndclass); +- return TRUE; +-} +- +-void unregister_notif_wnd_class(void) +-{ +- if(notif_wnd_class) +- UnregisterClassW(MAKEINTRESOURCEW(notif_wnd_class), hProxyDll); +-} +- + HWND get_notif_hwnd(void) + { ++ static ATOM wnd_class = 0; + tls_data_t *tls_data; + +- static INIT_ONCE init_once = INIT_ONCE_STATIC_INIT; ++ static const WCHAR wszURLMonikerNotificationWindow[] = ++ {'U','R','L',' ','M','o','n','i','k','e','r',' ', ++ 'N','o','t','i','f','i','c','a','t','i','o','n',' ','W','i','n','d','o','w',0}; + + tls_data = get_tls_data(); + if(!tls_data) +@@ -123,11 +98,23 @@ HWND get_notif_hwnd(void) + return tls_data->notif_hwnd; + } + +- InitOnceExecuteOnce(&init_once, register_notif_wnd_class, NULL, NULL); +- if(!notif_wnd_class) +- return NULL; ++ if(!wnd_class) { ++ static WNDCLASSEXW wndclass = { ++ sizeof(wndclass), 0, ++ notif_wnd_proc, 0, 0, ++ NULL, NULL, NULL, NULL, NULL, ++ wszURLMonikerNotificationWindow, ++ NULL ++ }; + +- tls_data->notif_hwnd = CreateWindowExW(0, MAKEINTRESOURCEW(notif_wnd_class), ++ wndclass.hInstance = hProxyDll; ++ ++ wnd_class = RegisterClassExW(&wndclass); ++ if (!wnd_class && GetLastError() == ERROR_CLASS_ALREADY_EXISTS) ++ wnd_class = 1; ++ } ++ ++ tls_data->notif_hwnd = CreateWindowExW(0, wszURLMonikerNotificationWindow, + wszURLMonikerNotificationWindow, 0, 0, 0, 0, 0, HWND_MESSAGE, + NULL, hProxyDll, NULL); + if(tls_data->notif_hwnd) + +diff -prudN e:\Wine\dlls\urlmon/urlmon_main.c e:\reactos\dll\win32\urlmon/urlmon_main.c +--- e:\Wine\dlls\urlmon/urlmon_main.c 2014-04-04 14:12:42.460533100 +0100 ++++ e:\reactos\dll\win32\urlmon/urlmon_main.c 2014-04-11 16:19:12.473179000 +0100 +@@ -139,7 +127,6 @@ static void process_detach(void) + + free_session(); + free_tls_list(); +- unregister_notif_wnd_class(); + } + + /*********************************************************************** + +diff -prudN e:\Wine\dlls\urlmon/urlmon_main.h e:\reactos\dll\win32\urlmon/urlmon_main.h +--- e:\Wine\dlls\urlmon/urlmon_main.h 2014-04-04 14:12:42.461533700 +0100 ++++ e:\reactos\dll\win32\urlmon/urlmon_main.h 2014-04-11 16:19:21.822446700 +0100 +@@ -225,7 +236,6 @@ typedef struct { + + tls_data_t *get_tls_data(void) DECLSPEC_HIDDEN; + +-void unregister_notif_wnd_class(void) DECLSPEC_HIDDEN; + HWND get_notif_hwnd(void) DECLSPEC_HIDDEN; + void release_notif_hwnd(HWND) DECLSPEC_HIDDEN; + Propchange: trunk/reactos/dll/win32/urlmon/urlmon_ros.diff ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/win32/urlmon/urlmon_urlmon.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/urlmon_ur…
============================================================================== --- trunk/reactos/dll/win32/urlmon/urlmon_urlmon.idl [iso-8859-1] (original) +++ trunk/reactos/dll/win32/urlmon/urlmon_urlmon.idl [iso-8859-1] Wed Apr 23 17:35:17 2014 @@ -15,6 +15,9 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ + +#pragma makedep proxy +#pragma makedep register #include "urlmon.idl" Modified: trunk/reactos/include/psdk/urlmon.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/urlmon.idl?re…
============================================================================== --- trunk/reactos/include/psdk/urlmon.idl [iso-8859-1] (original) +++ trunk/reactos/include/psdk/urlmon.idl [iso-8859-1] Wed Apr 23 17:35:17 2014 @@ -258,7 +258,23 @@ BINDSTATUS_CONTENTDISPOSITIONFILENAME, BINDSTATUS_MIMETEXTPLAINMISMATCH, BINDSTATUS_PUBLISHERAVAILABLE, - BINDSTATUS_DISPLAYNAMEAVAILABLE + BINDSTATUS_DISPLAYNAMEAVAILABLE, + BINDSTATUS_SSLUX_NAVBLOCKED, + BINDSTATUS_SERVER_MIMETYPEAVAILABLE, + BINDSTATUS_SNIFFED_CLASSIDAVAILABLE, + BINDSTATUS_64BIT_PROGRESS, + BINDSTATUS_LAST = BINDSTATUS_64BIT_PROGRESS, + BINDSTATUS_RESERVED_0 = (BINDSTATUS_LAST+1), + BINDSTATUS_RESERVED_1 = (BINDSTATUS_RESERVED_0+1), + BINDSTATUS_RESERVED_2 = (BINDSTATUS_RESERVED_1+1), + BINDSTATUS_RESERVED_3 = (BINDSTATUS_RESERVED_2+1), + BINDSTATUS_RESERVED_4 = (BINDSTATUS_RESERVED_3+1), + BINDSTATUS_RESERVED_5 = (BINDSTATUS_RESERVED_4+1), + BINDSTATUS_RESERVED_6 = (BINDSTATUS_RESERVED_5+1), + BINDSTATUS_RESERVED_7 = (BINDSTATUS_RESERVED_6+1), + BINDSTATUS_RESERVED_8 = (BINDSTATUS_RESERVED_7+1), + BINDSTATUS_RESERVED_9 = (BINDSTATUS_RESERVED_8+1), + BINDSTATUS_LAST_PRIVATE = BINDSTATUS_RESERVED_9 } BINDSTATUS; @@ -706,7 +722,13 @@ BINDSTRING_URL, BINDSTRING_IID, BINDSTRING_FLAG_BIND_TO_OBJECT, - BINDSTRING_PTR_BIND_CONTEXT + BINDSTRING_PTR_BIND_CONTEXT, + BINDSTRING_XDR_ORIGIN, + BINDSTRING_DOWNLOADPATH, + BINDSTRING_ROOTDOC_URL, + BINDSTRING_INITIAL_FILENAME, + BINDSTRING_PROXY_USERNAME, + BINDSTRING_PROXY_PASSWORD } BINDSTRING; HRESULT GetBindInfo( 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] Wed Apr 23 17:35:17 2014 @@ -195,7 +195,7 @@ reactos/dll/win32/unicows # Synced to Wine-1.3.32 (Win9x only, why do we need this?!) reactos/dll/win32/updspapi # Synced to Wine-1.7.1 reactos/dll/win32/url # Synced to Wine-1.7.17 -reactos/dll/win32/urlmon # Synced to Wine-1.7.1 +reactos/dll/win32/urlmon # Synced to Wine-1.7.17 reactos/dll/win32/usp10 # Synced to Wine-1.7.17 reactos/dll/win32/uxtheme # Forked reactos/dll/win32/vbscript # Synced to Wine-1.7.1
10 years, 8 months
1
0
0
0
← Newer
1
...
13
14
15
16
17
18
19
...
50
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
Results per page:
10
25
50
100
200