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
2025
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
January 2019
----- 2025 -----
January 2025
----- 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
31 participants
300 discussions
Start a n
N
ew thread
[reactos] 01/01: [HHCTRL] Sync with Wine Staging 4.0. CORE-15682
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=066d75470030c5f7a74a4…
commit 066d75470030c5f7a74a4540f8c8525076d7203f Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Jan 26 13:05:48 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Jan 26 13:05:48 2019 +0100 [HHCTRL] Sync with Wine Staging 4.0. CORE-15682 --- dll/win32/hhctrl.ocx/search.c | 2 +- media/doc/README.WINE | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dll/win32/hhctrl.ocx/search.c b/dll/win32/hhctrl.ocx/search.c index d758a1b30f..0e198b8736 100644 --- a/dll/win32/hhctrl.ocx/search.c +++ b/dll/win32/hhctrl.ocx/search.c @@ -152,7 +152,7 @@ cleanup: static SearchItem *SearchCHM_Storage(SearchItem *item, IStorage *pStorage, const char *needle) { - const WCHAR szHTMext[] = {'.','h','t','m',0}; + static const WCHAR szHTMext[] = {'.','h','t','m',0}; IEnumSTATSTG *elem = NULL; WCHAR *filename = NULL; STATSTG entries; diff --git a/media/doc/README.WINE b/media/doc/README.WINE index b7be7ac790..3f33ba081b 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -69,7 +69,7 @@ reactos/dll/win32/faultrep # Synced to WineStaging-2.9 reactos/dll/win32/fontsub # Synced to WineStaging-2.9 reactos/dll/win32/fusion # Synced to WineStaging-3.17 reactos/dll/win32/gdiplus # Synced to WineStaging-4.0 -reactos/dll/win32/hhctrl.ocx # Synced to WineStaging-3.17 +reactos/dll/win32/hhctrl.ocx # Synced to WineStaging-4.0 reactos/dll/win32/hlink # Synced to WineStaging-3.3 reactos/dll/win32/hnetcfg # Synced to WineStaging-3.9 reactos/dll/win32/httpapi # Synced to WineStaging-3.3
6 years
1
0
0
0
[reactos] 01/01: [WIN32KNT_APITEST] Improve NtGdiSetBitmapBits testcase more and more (#1307)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f9037bd33f7fca347c347…
commit f9037bd33f7fca347c347c4f1740996a857e55c3 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sat Jan 26 20:28:40 2019 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sat Jan 26 20:28:40 2019 +0900 [WIN32KNT_APITEST] Improve NtGdiSetBitmapBits testcase more and more (#1307) CORE-15657 --- .../apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c | 198 ++++++++++++++++++++- 1 file changed, 189 insertions(+), 9 deletions(-) diff --git a/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c b/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c index 2c34b91bc0..dcea8a8f8e 100644 --- a/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c +++ b/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c @@ -9,63 +9,91 @@ START_TEST(NtGdiSetBitmapBits) { - BYTE Bits[50] = {0,1,2,3,4,5,6,7,8,9}; + BYTE Bits[100] = {0,1,2,3,4,5,6,7,8,9}; HBITMAP hBitmap; HDC hDC; BITMAPINFO bmi; LPVOID pvBits; - SetLastError(ERROR_SUCCESS); + SetLastError(0xDEADFACE); ok_long(NtGdiSetBitmapBits(0, 0, 0), 0); - ok_long(GetLastError(), ERROR_SUCCESS); + ok_long(GetLastError(), 0xDEADFACE); /* Test NULL bitnap handle */ - SetLastError(ERROR_SUCCESS); + SetLastError(0xDEADFACE); ok_long(NtGdiSetBitmapBits(0, 5, Bits), 0); ok_long(GetLastError(), ERROR_INVALID_HANDLE); /* Test invalid bitmap handle */ hBitmap = (HBITMAP)CreatePen(PS_SOLID, 1, RGB(1,2,3)); - SetLastError(ERROR_SUCCESS); + SetLastError(0xDEADFACE); ok_long(NtGdiSetBitmapBits(hBitmap, 5, Bits), 0); ok_long(GetLastError(), ERROR_INVALID_HANDLE); DeleteObject(hBitmap); hBitmap = CreateBitmap(3, 3, 1, 8, NULL); - SetLastError(ERROR_SUCCESS); + ok(hBitmap != NULL, "hBitmap was NULL.\n"); /* test NULL pointer and count buffer size != 0 */ + SetLastError(0xDEADFACE); ok_long(NtGdiSetBitmapBits(hBitmap, 5, NULL), 0); + ok_long(GetLastError(), 0xDEADFACE); /* test NULL pointer and buffer size == 0*/ + SetLastError(0xDEADFACE); ok_long(NtGdiSetBitmapBits(hBitmap, 0, NULL), 0); + ok_long(GetLastError(), 0xDEADFACE); /* test bad pointer */ + SetLastError(0xDEADFACE); ok_long(NtGdiSetBitmapBits(hBitmap, 5, (PBYTE)0x500), 0); + ok_long(GetLastError(), 0xDEADFACE); /* Test if we can set a number of bytes between lines */ + SetLastError(0xDEADFACE); ok_long(NtGdiSetBitmapBits(hBitmap, 5, Bits), 5); + ok_long(GetLastError(), 0xDEADFACE); /* Test alignment */ + SetLastError(0xDEADFACE); ok_long(NtGdiSetBitmapBits(hBitmap, 4, Bits+1), 4); + ok_long(GetLastError(), 0xDEADFACE); /* Test 1 byte too much */ + SetLastError(0xDEADFACE); ok_long(NtGdiSetBitmapBits(hBitmap, 10, Bits), 10); + ok_long(GetLastError(), 0xDEADFACE); /* Test one row too much */ + SetLastError(0xDEADFACE); ok_long(NtGdiSetBitmapBits(hBitmap, 12, Bits), 12); + ok_long(GetLastError(), 0xDEADFACE); + SetLastError(0xDEADFACE); ok_long(NtGdiSetBitmapBits(hBitmap, 13, Bits), 12); + ok_long(GetLastError(), 0xDEADFACE); + SetLastError(0xDEADFACE); ok_long(NtGdiSetBitmapBits(hBitmap, 100, Bits), 12); + ok_long(GetLastError(), 0xDEADFACE); /* Test huge bytes count */ + SetLastError(0xDEADFACE); ok_long(NtGdiSetBitmapBits(hBitmap, 12345678, Bits), 0); + ok_long(GetLastError(), 0xDEADFACE); + + SetLastError(0xDEADFACE); + ok_long(NtGdiSetBitmapBits(hBitmap, 0xFFFF, Bits), 0); + ok_long(GetLastError(), 0xDEADFACE); + + SetLastError(0xDEADFACE); + ok_long(NtGdiSetBitmapBits(hBitmap, 0x10000, Bits), 0); + ok_long(GetLastError(), 0xDEADFACE); /* Test negative bytes count */ + SetLastError(0xDEADFACE); ok_long(NtGdiSetBitmapBits(hBitmap, -5, Bits), 0); - - ok_long(GetLastError(), ERROR_SUCCESS); + ok_long(GetLastError(), 0xDEADFACE); DeleteObject(hBitmap); @@ -75,56 +103,181 @@ START_TEST(NtGdiSetBitmapBits) ok(hBitmap != NULL, "hBitmap was NULL.\n"); FillMemory(Bits, sizeof(Bits), 0x55); + SetLastError(0xDEADFACE); + ok_long(NtGdiGetBitmapBits(hBitmap, 0, Bits), 0); + ok_long(GetLastError(), 0xDEADFACE); + ok_int(Bits[0], 0x55); + + FillMemory(Bits, sizeof(Bits), 0x55); + + SetLastError(0xDEADFACE); + ok_long(NtGdiGetBitmapBits(hBitmap, 1, Bits), 1); + ok_long(GetLastError(), 0xDEADFACE); + ok_int(Bits[0], 0); + ok_int(Bits[1], 0x55); + + FillMemory(Bits, sizeof(Bits), 0x55); + SetLastError(0xDEADFACE); + ok_long(NtGdiGetBitmapBits(hBitmap, 2, Bits), 2); + ok_long(GetLastError(), 0xDEADFACE); + ok_int(Bits[0], 0); + ok_int(Bits[1], 0); + ok_int(Bits[2], 0x55); + + FillMemory(Bits, sizeof(Bits), 0x33); + SetLastError(0xDEADFACE); + ok_long(NtGdiSetBitmapBits(hBitmap, 10, Bits), 10); + ok_long(GetLastError(), 0xDEADFACE); + + FillMemory(Bits, sizeof(Bits), 0xAA); + SetLastError(0xDEADFACE); + ok_long(NtGdiSetBitmapBits(hBitmap, 1, Bits), 1); + ok_long(GetLastError(), 0xDEADFACE); + FillMemory(Bits, sizeof(Bits), 0x55); + SetLastError(0xDEADFACE); + ok_long(NtGdiGetBitmapBits(hBitmap, 1, Bits), 1); + ok_long(GetLastError(), 0xDEADFACE); + ok_int(Bits[0], 0xAA); + ok_int(Bits[1], 0x55); + SetLastError(0xDEADFACE); + ok_long(NtGdiGetBitmapBits(hBitmap, 2, Bits), 2); + ok_long(GetLastError(), 0xDEADFACE); + ok_int(Bits[0], 0xAA); + ok_int(Bits[1], 0x33); + ok_int(Bits[2], 0x55); + + FillMemory(Bits, sizeof(Bits), 0xAA); + SetLastError(0xDEADFACE); + ok_long(NtGdiSetBitmapBits(hBitmap, 2, Bits), 2); + ok_long(GetLastError(), 0xDEADFACE); + FillMemory(Bits, sizeof(Bits), 0x55); + SetLastError(0xDEADFACE); + ok_long(NtGdiGetBitmapBits(hBitmap, 2, Bits), 2); + ok_long(GetLastError(), 0xDEADFACE); + ok_int(Bits[0], 0xAA); + ok_int(Bits[1], 0xAA); + ok_int(Bits[2], 0x55); + SetLastError(0xDEADFACE); + ok_long(NtGdiGetBitmapBits(hBitmap, 3, Bits), 3); + ok_long(GetLastError(), 0xDEADFACE); + ok_int(Bits[0], 0xAA); + ok_int(Bits[1], 0xAA); + ok_int(Bits[2], 0x33); + ok_int(Bits[3], 0x55); + + FillMemory(Bits, sizeof(Bits), 0xAA); + SetLastError(0xDEADFACE); + ok_long(NtGdiSetBitmapBits(hBitmap, 3, Bits), 3); + ok_long(GetLastError(), 0xDEADFACE); + FillMemory(Bits, sizeof(Bits), 0x55); + SetLastError(0xDEADFACE); + ok_long(NtGdiGetBitmapBits(hBitmap, 3, Bits), 3); + ok_long(GetLastError(), 0xDEADFACE); + ok_int(Bits[0], 0xAA); + ok_int(Bits[1], 0xAA); + ok_int(Bits[2], 0xAA); + ok_int(Bits[3], 0x55); + SetLastError(0xDEADFACE); + ok_long(NtGdiGetBitmapBits(hBitmap, 4, Bits), 4); + ok_long(GetLastError(), 0xDEADFACE); + ok_int(Bits[0], 0xAA); + ok_int(Bits[1], 0xAA); + ok_int(Bits[2], 0xAA); + ok_int(Bits[3], 0x33); + ok_int(Bits[4], 0x55); + + DeleteObject(hBitmap); + + /* ------------------------- */ + + hDC = CreateCompatibleDC(NULL); + + ZeroMemory(&bmi, sizeof(bmi)); + bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + bmi.bmiHeader.biWidth = 15; + bmi.bmiHeader.biHeight = 15; /* positive */ + bmi.bmiHeader.biPlanes = 1; + bmi.bmiHeader.biBitCount = 24; + hBitmap = CreateDIBSection(hDC, &bmi, DIB_RGB_COLORS, &pvBits, NULL, 0); + ok(hBitmap != NULL, "hBitmap was NULL.\n"); + + FillMemory(Bits, sizeof(Bits), 0x55); + SetLastError(0xDEADFACE); ok_long(NtGdiGetBitmapBits(hBitmap, 0, Bits), 0); + ok_long(GetLastError(), 0xDEADFACE); ok_int(Bits[0], 0x55); FillMemory(Bits, sizeof(Bits), 0x55); + SetLastError(0xDEADFACE); ok_long(NtGdiGetBitmapBits(hBitmap, 1, Bits), 1); + ok_long(GetLastError(), 0xDEADFACE); ok_int(Bits[0], 0); ok_int(Bits[1], 0x55); FillMemory(Bits, sizeof(Bits), 0x55); + SetLastError(0xDEADFACE); ok_long(NtGdiGetBitmapBits(hBitmap, 2, Bits), 2); + ok_long(GetLastError(), 0xDEADFACE); ok_int(Bits[0], 0); ok_int(Bits[1], 0); ok_int(Bits[2], 0x55); FillMemory(Bits, sizeof(Bits), 0x33); + SetLastError(0xDEADFACE); ok_long(NtGdiSetBitmapBits(hBitmap, 10, Bits), 10); + ok_long(GetLastError(), 0xDEADFACE); FillMemory(Bits, sizeof(Bits), 0xAA); + SetLastError(0xDEADFACE); ok_long(NtGdiSetBitmapBits(hBitmap, 1, Bits), 1); + ok_long(GetLastError(), 0xDEADFACE); FillMemory(Bits, sizeof(Bits), 0x55); + SetLastError(0xDEADFACE); ok_long(NtGdiGetBitmapBits(hBitmap, 1, Bits), 1); + ok_long(GetLastError(), 0xDEADFACE); ok_int(Bits[0], 0xAA); ok_int(Bits[1], 0x55); + SetLastError(0xDEADFACE); ok_long(NtGdiGetBitmapBits(hBitmap, 2, Bits), 2); + ok_long(GetLastError(), 0xDEADFACE); ok_int(Bits[0], 0xAA); ok_int(Bits[1], 0x33); ok_int(Bits[2], 0x55); FillMemory(Bits, sizeof(Bits), 0xAA); + SetLastError(0xDEADFACE); ok_long(NtGdiSetBitmapBits(hBitmap, 2, Bits), 2); + ok_long(GetLastError(), 0xDEADFACE); FillMemory(Bits, sizeof(Bits), 0x55); + SetLastError(0xDEADFACE); ok_long(NtGdiGetBitmapBits(hBitmap, 2, Bits), 2); + ok_long(GetLastError(), 0xDEADFACE); ok_int(Bits[0], 0xAA); ok_int(Bits[1], 0xAA); ok_int(Bits[2], 0x55); + SetLastError(0xDEADFACE); ok_long(NtGdiGetBitmapBits(hBitmap, 3, Bits), 3); + ok_long(GetLastError(), 0xDEADFACE); ok_int(Bits[0], 0xAA); ok_int(Bits[1], 0xAA); ok_int(Bits[2], 0x33); ok_int(Bits[3], 0x55); FillMemory(Bits, sizeof(Bits), 0xAA); + SetLastError(0xDEADFACE); ok_long(NtGdiSetBitmapBits(hBitmap, 3, Bits), 3); + ok_long(GetLastError(), 0xDEADFACE); FillMemory(Bits, sizeof(Bits), 0x55); + SetLastError(0xDEADFACE); ok_long(NtGdiGetBitmapBits(hBitmap, 3, Bits), 3); + ok_long(GetLastError(), 0xDEADFACE); ok_int(Bits[0], 0xAA); ok_int(Bits[1], 0xAA); ok_int(Bits[2], 0xAA); ok_int(Bits[3], 0x55); + SetLastError(0xDEADFACE); ok_long(NtGdiGetBitmapBits(hBitmap, 4, Bits), 4); + ok_long(GetLastError(), 0xDEADFACE); ok_int(Bits[0], 0xAA); ok_int(Bits[1], 0xAA); ok_int(Bits[2], 0xAA); @@ -132,6 +285,7 @@ START_TEST(NtGdiSetBitmapBits) ok_int(Bits[4], 0x55); DeleteObject(hBitmap); + DeleteDC(hDC); /* ------------------------- */ @@ -140,63 +294,89 @@ START_TEST(NtGdiSetBitmapBits) ZeroMemory(&bmi, sizeof(bmi)); bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); bmi.bmiHeader.biWidth = 15; - bmi.bmiHeader.biHeight = 15; + bmi.bmiHeader.biHeight = -15; /* negative */ bmi.bmiHeader.biPlanes = 1; bmi.bmiHeader.biBitCount = 24; hBitmap = CreateDIBSection(hDC, &bmi, DIB_RGB_COLORS, &pvBits, NULL, 0); ok(hBitmap != NULL, "hBitmap was NULL.\n"); FillMemory(Bits, sizeof(Bits), 0x55); + SetLastError(0xDEADFACE); ok_long(NtGdiGetBitmapBits(hBitmap, 0, Bits), 0); + ok_long(GetLastError(), 0xDEADFACE); ok_int(Bits[0], 0x55); FillMemory(Bits, sizeof(Bits), 0x55); + SetLastError(0xDEADFACE); ok_long(NtGdiGetBitmapBits(hBitmap, 1, Bits), 1); + ok_long(GetLastError(), 0xDEADFACE); ok_int(Bits[0], 0); ok_int(Bits[1], 0x55); FillMemory(Bits, sizeof(Bits), 0x55); + SetLastError(0xDEADFACE); ok_long(NtGdiGetBitmapBits(hBitmap, 2, Bits), 2); + ok_long(GetLastError(), 0xDEADFACE); ok_int(Bits[0], 0); ok_int(Bits[1], 0); ok_int(Bits[2], 0x55); FillMemory(Bits, sizeof(Bits), 0x33); + SetLastError(0xDEADFACE); ok_long(NtGdiSetBitmapBits(hBitmap, 10, Bits), 10); + ok_long(GetLastError(), 0xDEADFACE); FillMemory(Bits, sizeof(Bits), 0xAA); + SetLastError(0xDEADFACE); ok_long(NtGdiSetBitmapBits(hBitmap, 1, Bits), 1); + ok_long(GetLastError(), 0xDEADFACE); FillMemory(Bits, sizeof(Bits), 0x55); + SetLastError(0xDEADFACE); ok_long(NtGdiGetBitmapBits(hBitmap, 1, Bits), 1); + ok_long(GetLastError(), 0xDEADFACE); ok_int(Bits[0], 0xAA); ok_int(Bits[1], 0x55); + SetLastError(0xDEADFACE); ok_long(NtGdiGetBitmapBits(hBitmap, 2, Bits), 2); + ok_long(GetLastError(), 0xDEADFACE); ok_int(Bits[0], 0xAA); ok_int(Bits[1], 0x33); ok_int(Bits[2], 0x55); FillMemory(Bits, sizeof(Bits), 0xAA); + SetLastError(0xDEADFACE); ok_long(NtGdiSetBitmapBits(hBitmap, 2, Bits), 2); + ok_long(GetLastError(), 0xDEADFACE); FillMemory(Bits, sizeof(Bits), 0x55); + SetLastError(0xDEADFACE); ok_long(NtGdiGetBitmapBits(hBitmap, 2, Bits), 2); + ok_long(GetLastError(), 0xDEADFACE); ok_int(Bits[0], 0xAA); ok_int(Bits[1], 0xAA); ok_int(Bits[2], 0x55); + SetLastError(0xDEADFACE); ok_long(NtGdiGetBitmapBits(hBitmap, 3, Bits), 3); + ok_long(GetLastError(), 0xDEADFACE); ok_int(Bits[0], 0xAA); ok_int(Bits[1], 0xAA); ok_int(Bits[2], 0x33); ok_int(Bits[3], 0x55); FillMemory(Bits, sizeof(Bits), 0xAA); + SetLastError(0xDEADFACE); ok_long(NtGdiSetBitmapBits(hBitmap, 3, Bits), 3); + ok_long(GetLastError(), 0xDEADFACE); FillMemory(Bits, sizeof(Bits), 0x55); + SetLastError(0xDEADFACE); ok_long(NtGdiGetBitmapBits(hBitmap, 3, Bits), 3); + ok_long(GetLastError(), 0xDEADFACE); ok_int(Bits[0], 0xAA); ok_int(Bits[1], 0xAA); ok_int(Bits[2], 0xAA); ok_int(Bits[3], 0x55); + SetLastError(0xDEADFACE); ok_long(NtGdiGetBitmapBits(hBitmap, 4, Bits), 4); + ok_long(GetLastError(), 0xDEADFACE); ok_int(Bits[0], 0xAA); ok_int(Bits[1], 0xAA); ok_int(Bits[2], 0xAA);
6 years
1
0
0
0
[reactos] 01/01: [WIN32KNT_APITEST] NtGdiSetBitmapBits: Expand tabs to spaces (#1306)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=82c7571e433f9e1b43153…
commit 82c7571e433f9e1b43153aa077a524414d1747d9 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sat Jan 26 19:10:23 2019 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sat Jan 26 19:10:23 2019 +0900 [WIN32KNT_APITEST] NtGdiSetBitmapBits: Expand tabs to spaces (#1306) Expand Tabs to Spaces in NtGdiSetBitmapBits testcase. Follow-up of #1304. --- .../apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c | 78 +++++++++++----------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c b/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c index e13aabd2e2..2c34b91bc0 100644 --- a/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c +++ b/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c @@ -9,65 +9,65 @@ START_TEST(NtGdiSetBitmapBits) { - BYTE Bits[50] = {0,1,2,3,4,5,6,7,8,9}; - HBITMAP hBitmap; + BYTE Bits[50] = {0,1,2,3,4,5,6,7,8,9}; + HBITMAP hBitmap; HDC hDC; BITMAPINFO bmi; LPVOID pvBits; - SetLastError(ERROR_SUCCESS); - ok_long(NtGdiSetBitmapBits(0, 0, 0), 0); - ok_long(GetLastError(), ERROR_SUCCESS); + SetLastError(ERROR_SUCCESS); + ok_long(NtGdiSetBitmapBits(0, 0, 0), 0); + ok_long(GetLastError(), ERROR_SUCCESS); - /* Test NULL bitnap handle */ - SetLastError(ERROR_SUCCESS); - ok_long(NtGdiSetBitmapBits(0, 5, Bits), 0); - ok_long(GetLastError(), ERROR_INVALID_HANDLE); + /* Test NULL bitnap handle */ + SetLastError(ERROR_SUCCESS); + ok_long(NtGdiSetBitmapBits(0, 5, Bits), 0); + ok_long(GetLastError(), ERROR_INVALID_HANDLE); - /* Test invalid bitmap handle */ - hBitmap = (HBITMAP)CreatePen(PS_SOLID, 1, RGB(1,2,3)); - SetLastError(ERROR_SUCCESS); - ok_long(NtGdiSetBitmapBits(hBitmap, 5, Bits), 0); - ok_long(GetLastError(), ERROR_INVALID_HANDLE); - DeleteObject(hBitmap); + /* Test invalid bitmap handle */ + hBitmap = (HBITMAP)CreatePen(PS_SOLID, 1, RGB(1,2,3)); + SetLastError(ERROR_SUCCESS); + ok_long(NtGdiSetBitmapBits(hBitmap, 5, Bits), 0); + ok_long(GetLastError(), ERROR_INVALID_HANDLE); + DeleteObject(hBitmap); - hBitmap = CreateBitmap(3, 3, 1, 8, NULL); - SetLastError(ERROR_SUCCESS); + hBitmap = CreateBitmap(3, 3, 1, 8, NULL); + SetLastError(ERROR_SUCCESS); - /* test NULL pointer and count buffer size != 0 */ - ok_long(NtGdiSetBitmapBits(hBitmap, 5, NULL), 0); + /* test NULL pointer and count buffer size != 0 */ + ok_long(NtGdiSetBitmapBits(hBitmap, 5, NULL), 0); - /* test NULL pointer and buffer size == 0*/ - ok_long(NtGdiSetBitmapBits(hBitmap, 0, NULL), 0); + /* test NULL pointer and buffer size == 0*/ + ok_long(NtGdiSetBitmapBits(hBitmap, 0, NULL), 0); - /* test bad pointer */ - ok_long(NtGdiSetBitmapBits(hBitmap, 5, (PBYTE)0x500), 0); + /* test bad pointer */ + ok_long(NtGdiSetBitmapBits(hBitmap, 5, (PBYTE)0x500), 0); - /* Test if we can set a number of bytes between lines */ - ok_long(NtGdiSetBitmapBits(hBitmap, 5, Bits), 5); + /* Test if we can set a number of bytes between lines */ + ok_long(NtGdiSetBitmapBits(hBitmap, 5, Bits), 5); - /* Test alignment */ - ok_long(NtGdiSetBitmapBits(hBitmap, 4, Bits+1), 4); + /* Test alignment */ + ok_long(NtGdiSetBitmapBits(hBitmap, 4, Bits+1), 4); - /* Test 1 byte too much */ - ok_long(NtGdiSetBitmapBits(hBitmap, 10, Bits), 10); + /* Test 1 byte too much */ + ok_long(NtGdiSetBitmapBits(hBitmap, 10, Bits), 10); - /* Test one row too much */ - ok_long(NtGdiSetBitmapBits(hBitmap, 12, Bits), 12); + /* Test one row too much */ + ok_long(NtGdiSetBitmapBits(hBitmap, 12, Bits), 12); - ok_long(NtGdiSetBitmapBits(hBitmap, 13, Bits), 12); + ok_long(NtGdiSetBitmapBits(hBitmap, 13, Bits), 12); - ok_long(NtGdiSetBitmapBits(hBitmap, 100, Bits), 12); + ok_long(NtGdiSetBitmapBits(hBitmap, 100, Bits), 12); - /* Test huge bytes count */ - ok_long(NtGdiSetBitmapBits(hBitmap, 12345678, Bits), 0); + /* Test huge bytes count */ + ok_long(NtGdiSetBitmapBits(hBitmap, 12345678, Bits), 0); - /* Test negative bytes count */ - ok_long(NtGdiSetBitmapBits(hBitmap, -5, Bits), 0); + /* Test negative bytes count */ + ok_long(NtGdiSetBitmapBits(hBitmap, -5, Bits), 0); - ok_long(GetLastError(), ERROR_SUCCESS); + ok_long(GetLastError(), ERROR_SUCCESS); - DeleteObject(hBitmap); + DeleteObject(hBitmap); /* ------------------------- */
6 years
1
0
0
0
[reactos] 01/01: [WIN32KNT_APITEST] Improve NtGdiSetBitmapBits more (#1304)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=13a6583fa0fa657bdd60c…
commit 13a6583fa0fa657bdd60c2e0ba8bc5f58a88270d Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sat Jan 26 11:38:42 2019 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sat Jan 26 11:38:42 2019 +0900 [WIN32KNT_APITEST] Improve NtGdiSetBitmapBits more (#1304) Add some tests. CORE-15657 --- .../apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c | 142 ++++++++++++++++++++- 1 file changed, 141 insertions(+), 1 deletion(-) diff --git a/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c b/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c index 6924492bf9..e13aabd2e2 100644 --- a/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c +++ b/modules/rostests/apitests/win32nt/ntgdi/NtGdiSetBitmapBits.c @@ -2,7 +2,7 @@ * PROJECT: ReactOS api tests * LICENSE: GPL - See COPYING in the top level directory * PURPOSE: Test for NtGdiSetBitmapBits - * PROGRAMMERS: + * PROGRAMMERS: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> */ #include <win32nt.h> @@ -11,6 +11,9 @@ START_TEST(NtGdiSetBitmapBits) { BYTE Bits[50] = {0,1,2,3,4,5,6,7,8,9}; HBITMAP hBitmap; + HDC hDC; + BITMAPINFO bmi; + LPVOID pvBits; SetLastError(ERROR_SUCCESS); ok_long(NtGdiSetBitmapBits(0, 0, 0), 0); @@ -65,4 +68,141 @@ START_TEST(NtGdiSetBitmapBits) ok_long(GetLastError(), ERROR_SUCCESS); DeleteObject(hBitmap); + + /* ------------------------- */ + + hBitmap = CreateBitmap(16, 16, 1, 1, NULL); + ok(hBitmap != NULL, "hBitmap was NULL.\n"); + + FillMemory(Bits, sizeof(Bits), 0x55); + ok_long(NtGdiGetBitmapBits(hBitmap, 0, Bits), 0); + ok_int(Bits[0], 0x55); + + FillMemory(Bits, sizeof(Bits), 0x55); + ok_long(NtGdiGetBitmapBits(hBitmap, 1, Bits), 1); + ok_int(Bits[0], 0); + ok_int(Bits[1], 0x55); + + FillMemory(Bits, sizeof(Bits), 0x55); + ok_long(NtGdiGetBitmapBits(hBitmap, 2, Bits), 2); + ok_int(Bits[0], 0); + ok_int(Bits[1], 0); + ok_int(Bits[2], 0x55); + + FillMemory(Bits, sizeof(Bits), 0x33); + ok_long(NtGdiSetBitmapBits(hBitmap, 10, Bits), 10); + + FillMemory(Bits, sizeof(Bits), 0xAA); + ok_long(NtGdiSetBitmapBits(hBitmap, 1, Bits), 1); + FillMemory(Bits, sizeof(Bits), 0x55); + ok_long(NtGdiGetBitmapBits(hBitmap, 1, Bits), 1); + ok_int(Bits[0], 0xAA); + ok_int(Bits[1], 0x55); + ok_long(NtGdiGetBitmapBits(hBitmap, 2, Bits), 2); + ok_int(Bits[0], 0xAA); + ok_int(Bits[1], 0x33); + ok_int(Bits[2], 0x55); + + FillMemory(Bits, sizeof(Bits), 0xAA); + ok_long(NtGdiSetBitmapBits(hBitmap, 2, Bits), 2); + FillMemory(Bits, sizeof(Bits), 0x55); + ok_long(NtGdiGetBitmapBits(hBitmap, 2, Bits), 2); + ok_int(Bits[0], 0xAA); + ok_int(Bits[1], 0xAA); + ok_int(Bits[2], 0x55); + ok_long(NtGdiGetBitmapBits(hBitmap, 3, Bits), 3); + ok_int(Bits[0], 0xAA); + ok_int(Bits[1], 0xAA); + ok_int(Bits[2], 0x33); + ok_int(Bits[3], 0x55); + + FillMemory(Bits, sizeof(Bits), 0xAA); + ok_long(NtGdiSetBitmapBits(hBitmap, 3, Bits), 3); + FillMemory(Bits, sizeof(Bits), 0x55); + ok_long(NtGdiGetBitmapBits(hBitmap, 3, Bits), 3); + ok_int(Bits[0], 0xAA); + ok_int(Bits[1], 0xAA); + ok_int(Bits[2], 0xAA); + ok_int(Bits[3], 0x55); + ok_long(NtGdiGetBitmapBits(hBitmap, 4, Bits), 4); + ok_int(Bits[0], 0xAA); + ok_int(Bits[1], 0xAA); + ok_int(Bits[2], 0xAA); + ok_int(Bits[3], 0x33); + ok_int(Bits[4], 0x55); + + DeleteObject(hBitmap); + + /* ------------------------- */ + + hDC = CreateCompatibleDC(NULL); + + ZeroMemory(&bmi, sizeof(bmi)); + bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + bmi.bmiHeader.biWidth = 15; + bmi.bmiHeader.biHeight = 15; + bmi.bmiHeader.biPlanes = 1; + bmi.bmiHeader.biBitCount = 24; + hBitmap = CreateDIBSection(hDC, &bmi, DIB_RGB_COLORS, &pvBits, NULL, 0); + ok(hBitmap != NULL, "hBitmap was NULL.\n"); + + FillMemory(Bits, sizeof(Bits), 0x55); + ok_long(NtGdiGetBitmapBits(hBitmap, 0, Bits), 0); + ok_int(Bits[0], 0x55); + + FillMemory(Bits, sizeof(Bits), 0x55); + ok_long(NtGdiGetBitmapBits(hBitmap, 1, Bits), 1); + ok_int(Bits[0], 0); + ok_int(Bits[1], 0x55); + + FillMemory(Bits, sizeof(Bits), 0x55); + ok_long(NtGdiGetBitmapBits(hBitmap, 2, Bits), 2); + ok_int(Bits[0], 0); + ok_int(Bits[1], 0); + ok_int(Bits[2], 0x55); + + FillMemory(Bits, sizeof(Bits), 0x33); + ok_long(NtGdiSetBitmapBits(hBitmap, 10, Bits), 10); + + FillMemory(Bits, sizeof(Bits), 0xAA); + ok_long(NtGdiSetBitmapBits(hBitmap, 1, Bits), 1); + FillMemory(Bits, sizeof(Bits), 0x55); + ok_long(NtGdiGetBitmapBits(hBitmap, 1, Bits), 1); + ok_int(Bits[0], 0xAA); + ok_int(Bits[1], 0x55); + ok_long(NtGdiGetBitmapBits(hBitmap, 2, Bits), 2); + ok_int(Bits[0], 0xAA); + ok_int(Bits[1], 0x33); + ok_int(Bits[2], 0x55); + + FillMemory(Bits, sizeof(Bits), 0xAA); + ok_long(NtGdiSetBitmapBits(hBitmap, 2, Bits), 2); + FillMemory(Bits, sizeof(Bits), 0x55); + ok_long(NtGdiGetBitmapBits(hBitmap, 2, Bits), 2); + ok_int(Bits[0], 0xAA); + ok_int(Bits[1], 0xAA); + ok_int(Bits[2], 0x55); + ok_long(NtGdiGetBitmapBits(hBitmap, 3, Bits), 3); + ok_int(Bits[0], 0xAA); + ok_int(Bits[1], 0xAA); + ok_int(Bits[2], 0x33); + ok_int(Bits[3], 0x55); + + FillMemory(Bits, sizeof(Bits), 0xAA); + ok_long(NtGdiSetBitmapBits(hBitmap, 3, Bits), 3); + FillMemory(Bits, sizeof(Bits), 0x55); + ok_long(NtGdiGetBitmapBits(hBitmap, 3, Bits), 3); + ok_int(Bits[0], 0xAA); + ok_int(Bits[1], 0xAA); + ok_int(Bits[2], 0xAA); + ok_int(Bits[3], 0x55); + ok_long(NtGdiGetBitmapBits(hBitmap, 4, Bits), 4); + ok_int(Bits[0], 0xAA); + ok_int(Bits[1], 0xAA); + ok_int(Bits[2], 0xAA); + ok_int(Bits[3], 0x33); + ok_int(Bits[4], 0x55); + + DeleteObject(hBitmap); + DeleteDC(hDC); }
6 years
1
0
0
0
[reactos] 01/01: [WIN32KNT_APITEST] Fix NtGdiGetFontResourceInfoInternalW message
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=08d72bd076a8fc65d90b2…
commit 08d72bd076a8fc65d90b289cacf9c26bed93a696 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Fri Jan 25 23:00:35 2019 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Fri Jan 25 23:01:07 2019 +0900 [WIN32KNT_APITEST] Fix NtGdiGetFontResourceInfoInternalW message --- .../rostests/apitests/win32nt/ntgdi/NtGdiGetFontResourceInfoInternalW.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/rostests/apitests/win32nt/ntgdi/NtGdiGetFontResourceInfoInternalW.c b/modules/rostests/apitests/win32nt/ntgdi/NtGdiGetFontResourceInfoInternalW.c index 0eae92cd22..dde7d7e2be 100644 --- a/modules/rostests/apitests/win32nt/ntgdi/NtGdiGetFontResourceInfoInternalW.c +++ b/modules/rostests/apitests/win32nt/ntgdi/NtGdiGetFontResourceInfoInternalW.c @@ -31,7 +31,7 @@ START_TEST(NtGdiGetFontResourceInfoInternalW) &logfont, 2); - ok(bRet != FALSE, "bRet was not FALSE.\n"); + ok(bRet != FALSE, "bRet was FALSE.\n"); printf("lfHeight = %ld\n", logfont.lfHeight); printf("lfWidth = %ld\n", logfont.lfWidth);
6 years
1
0
0
0
[reactos] 01/01: [GDIPLUS_WINETEST] Sync with Wine Staging 4.0. CORE-15682
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7d57324d5dfd586a73eab…
commit 7d57324d5dfd586a73eab4582af944417f16867f Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Fri Jan 25 13:23:03 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Fri Jan 25 13:23:03 2019 +0100 [GDIPLUS_WINETEST] Sync with Wine Staging 4.0. CORE-15682 --- modules/rostests/winetests/gdiplus/brush.c | 380 ++++++++++++-------------- modules/rostests/winetests/gdiplus/font.c | 25 +- modules/rostests/winetests/gdiplus/graphics.c | 36 ++- modules/rostests/winetests/gdiplus/image.c | 231 +++++++++++++--- modules/rostests/winetests/gdiplus/pen.c | 148 ++++++++++ modules/rostests/winetests/gdiplus/region.c | 9 +- 6 files changed, 569 insertions(+), 260 deletions(-) diff --git a/modules/rostests/winetests/gdiplus/brush.c b/modules/rostests/winetests/gdiplus/brush.c index 0451948175..bb645ffef9 100644 --- a/modules/rostests/winetests/gdiplus/brush.c +++ b/modules/rostests/winetests/gdiplus/brush.c @@ -621,141 +621,103 @@ static void test_texturewrap(void) static void test_gradientgetrect(void) { + static const struct + { + LinearGradientMode mode; + GpRectF rect; + REAL transform[6]; + } + create_from_rect[] = + { + { LinearGradientModeHorizontal, { 10.0f, 10.0f, -100.0f, -100.0f } }, + { LinearGradientModeHorizontal, { 10.0f, 10.0f, 100.0f, 100.0f } }, + { LinearGradientModeHorizontal, { 10.0f, -5.0f, 100.0f, 50.0f } }, + { LinearGradientModeHorizontal, { -5.0f, 10.0f, 100.0f, 50.0f } }, + { LinearGradientModeVertical, { 0.0f, 0.0f, 100.0f, 10.0f }, { 0.0f, 0.1f, -10.0f, -0.0f, 100.0f, 0.0f } }, + { LinearGradientModeVertical, { 10.0f, -12.0f, 100.0f, 105.0f }, { 0.0f, 1.05f, -0.952f, 0.0f, 98.571f, -22.5f } }, + }; + static const struct + { + GpPointF pt1, pt2; + GpRectF rect; + REAL transform[6]; + } + create_from_pt[] = + { + { { 1.0f, 1.0f }, { 100.0f, 100.0f }, { 1.0f, 1.0f, 99.0f, 99.0f }, { 1.0f, 1.0f, -1.0f, 1.0f, 50.50f, -50.50f } }, + { { 0.0f, 0.0f }, { 0.0f, 10.0f }, { -5.0f, 0.0f, 10.0f, 10.0f }, { 0.0f, 1.0f, -1.0f, 0.0f, 5.0f, 5.0f } }, + { { 0.0f, 0.0f }, { 10.0f, 0.0f }, { 0.0f, -5.0f, 10.0f, 10.0f }, { 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f } }, + /* Slope = -1 */ + { { 0.0f, 0.0f }, { 20.0f, -20.0f }, { 0.0f, -20.0f, 20.0f, 20.0f }, { 1.0f, -1.0f, 1.0f, 1.0f, 10.0f, 10.0f } }, + /* Slope = 1/100 */ + { { 0.0f, 0.0f }, { 100.0f, 1.0f }, { 0.0f, 0.0f, 100.0f, 1.0f }, { 1.0f, 0.01f, -0.02f, 2.0f, 0.01f, -1.0f } }, + { { 10.0f, 10.0f }, { -90.0f, 10.0f }, { -90.0f, -40.0f, 100.0f, 100.0f }, { -1.0f, 0.0f, 0.0f, -1.0f, -80.0f, 20.0f } }, + }; + static const struct + { + GpRectF rect; + REAL angle; + BOOL is_scalable; + REAL transform[6]; + } + create_with_angle[] = + { + { { 10.0f, 10.0f, -100.0f, -100.0f }, 0.0f, TRUE }, + { { 10.0f, 10.0f, -100.0f, -100.0f }, 0.0f, FALSE }, + { { 10.0f, 10.0f, 100.0f, 100.0f }, 0.0f, FALSE }, + { { 10.0f, 10.0f, 100.0f, 100.0f }, 0.0f, TRUE }, + { { 10.0f, -5.0f, 100.0f, 50.0f }, 0.0f, FALSE }, + { { 10.0f, -5.0f, 100.0f, 50.0f }, 0.0f, TRUE }, + { { -5.0f, 10.0f, 100.0f, 50.0f }, 0.0f, FALSE }, + { { -5.0f, 10.0f, 100.0f, 50.0f }, 0.0f, TRUE }, + { { 0.0f, 0.0f, 100.0f, 10.0f }, -90.0f, TRUE, { 0.0f, -0.1f, 10.0f, 0.0f, 0.0f, 10.0f } }, + { { 10.0f, -12.0f, 100.0f, 105.0f }, -90.0f, TRUE, { 0.0f, -1.05f, 0.952f, 0.0f, 21.429f, 103.5f } }, + { { 0.0f, 0.0f, 100.0f, 10.0f }, -90.0f, FALSE, { 0.0f, -0.1f, 10.0f, -0.0f, 0.0f, 10.0f } }, + { { 10.0f, -12.0f, 100.0f, 105.0f }, -90.0f, FALSE, { 0.0f, -1.05f, 0.952f, 0.0f, 21.429f, 103.5f } }, + }; GpLineGradient *brush; GpMatrix *transform; REAL elements[6]; - GpRectF rectf; GpStatus status; - GpPointF pt1, pt2; + unsigned int i; + ARGB colors[2]; + GpRectF rectf; status = GdipCreateMatrix(&transform); expect(Ok, status); - pt1.X = pt1.Y = 1.0; - pt2.X = pt2.Y = 100.0; - status = GdipCreateLineBrush(&pt1, &pt2, 0, 0, WrapModeTile, &brush); - expect(Ok, status); - memset(&rectf, 0, sizeof(GpRectF)); - status = GdipGetLineRect(brush, &rectf); - expect(Ok, status); - expectf(1.0, rectf.X); - expectf(1.0, rectf.Y); - expectf(99.0, rectf.Width); - expectf(99.0, rectf.Height); - status = GdipGetLineTransform(brush, transform); - expect(Ok, status); - status = GdipGetMatrixElements(transform, elements); - expect(Ok, status); - expectf(1.0, elements[0]); - expectf(1.0, elements[1]); - expectf(-1.0, elements[2]); - expectf(1.0, elements[3]); - expectf(50.50, elements[4]); - expectf(-50.50, elements[5]); - status = GdipDeleteBrush((GpBrush*)brush); - expect(Ok, status); - - /* vertical gradient */ - pt1.X = pt1.Y = pt2.X = 0.0; - pt2.Y = 10.0; - status = GdipCreateLineBrush(&pt1, &pt2, 0, 0, WrapModeTile, &brush); - expect(Ok, status); - memset(&rectf, 0, sizeof(GpRectF)); - status = GdipGetLineRect(brush, &rectf); - expect(Ok, status); - expectf(-5.0, rectf.X); - expectf(0.0, rectf.Y); - expectf(10.0, rectf.Width); - expectf(10.0, rectf.Height); - status = GdipGetLineTransform(brush, transform); - expect(Ok, status); - status = GdipGetMatrixElements(transform, elements); - expect(Ok, status); - expectf(0.0, elements[0]); - expectf(1.0, elements[1]); - expectf(-1.0, elements[2]); - expectf(0.0, elements[3]); - expectf(5.0, elements[4]); - expectf(5.0, elements[5]); - status = GdipDeleteBrush((GpBrush*)brush); - expect(Ok, status); - - /* horizontal gradient */ - pt1.X = pt1.Y = pt2.Y = 0.0; - pt2.X = 10.0; - status = GdipCreateLineBrush(&pt1, &pt2, 0, 0, WrapModeTile, &brush); - expect(Ok, status); - memset(&rectf, 0, sizeof(GpRectF)); - status = GdipGetLineRect(brush, &rectf); - expect(Ok, status); - expectf(0.0, rectf.X); - expectf(-5.0, rectf.Y); - expectf(10.0, rectf.Width); - expectf(10.0, rectf.Height); - status = GdipGetLineTransform(brush, transform); - expect(Ok, status); - status = GdipGetMatrixElements(transform, elements); - expect(Ok, status); - expectf(1.0, elements[0]); - expectf(0.0, elements[1]); - expectf(0.0, elements[2]); - expectf(1.0, elements[3]); - expectf(0.0, elements[4]); - expectf(0.0, elements[5]); - status = GdipDeleteBrush((GpBrush*)brush); - expect(Ok, status); - - /* slope = -1 */ - pt1.X = pt1.Y = 0.0; - pt2.X = 20.0; - pt2.Y = -20.0; - status = GdipCreateLineBrush(&pt1, &pt2, 0, 0, WrapModeTile, &brush); - expect(Ok, status); - memset(&rectf, 0, sizeof(GpRectF)); - status = GdipGetLineRect(brush, &rectf); - expect(Ok, status); - expectf(0.0, rectf.X); - expectf(-20.0, rectf.Y); - expectf(20.0, rectf.Width); - expectf(20.0, rectf.Height); - status = GdipGetLineTransform(brush, transform); - expect(Ok, status); - status = GdipGetMatrixElements(transform, elements); - expect(Ok, status); - expectf(1.0, elements[0]); - expectf(-1.0, elements[1]); - expectf(1.0, elements[2]); - expectf(1.0, elements[3]); - expectf(10.0, elements[4]); - expectf(10.0, elements[5]); - status = GdipDeleteBrush((GpBrush*)brush); - expect(Ok, status); - - /* slope = 1/100 */ - pt1.X = pt1.Y = 0.0; - pt2.X = 100.0; - pt2.Y = 1.0; - status = GdipCreateLineBrush(&pt1, &pt2, 0, 0, WrapModeTile, &brush); - expect(Ok, status); - memset(&rectf, 0, sizeof(GpRectF)); - status = GdipGetLineRect(brush, &rectf); - expect(Ok, status); - expectf(0.0, rectf.X); - expectf(0.0, rectf.Y); - expectf(100.0, rectf.Width); - expectf(1.0, rectf.Height); - status = GdipGetLineTransform(brush, transform); - expect(Ok, status); - status = GdipGetMatrixElements(transform, elements); - expect(Ok,status); - expectf(1.0, elements[0]); - expectf(0.01, elements[1]); - expectf(-0.02, elements[2]); - /* expectf(2.0, elements[3]); */ - expectf(0.01, elements[4]); - /* expectf(-1.0, elements[5]); */ - status = GdipDeleteBrush((GpBrush*)brush); - expect(Ok,status); + for (i = 0; i < ARRAY_SIZE(create_from_pt); ++i) + { + status = GdipCreateLineBrush(&create_from_pt[i].pt1, &create_from_pt[i].pt2, 0x1, 0x2, WrapModeTile, &brush); + ok(status == Ok, "Failed to create a brush, %d.\n", status); + + memset(&rectf, 0, sizeof(rectf)); + status = GdipGetLineRect(brush, &rectf); + ok(status == Ok, "Failed to get brush rect, %d.\n", status); + ok(!memcmp(&rectf, &create_from_pt[i].rect, sizeof(rectf)), "Unexpected brush rect.\n"); + + status = GdipGetLineTransform(brush, transform); + ok(status == Ok, "Failed to get brush transform, %d.\n", status); + + status = GdipGetMatrixElements(transform, elements); + ok(status == Ok, "Failed to get matrix elements, %d.\n", status); + +#define expectf2(expected, got) ok(fabs(expected - got) < 0.001, "%u: expected %.3f, got %.3f.\n", i, expected, got) + expectf2(create_from_pt[i].transform[0], elements[0]); + expectf2(create_from_pt[i].transform[1], elements[1]); + expectf2(create_from_pt[i].transform[2], elements[2]); + expectf2(create_from_pt[i].transform[3], elements[3]); + expectf2(create_from_pt[i].transform[4], elements[4]); + expectf2(create_from_pt[i].transform[5], elements[5]); +#undef expect2f + + status = GdipGetLineColors(brush, colors); + ok(status == Ok, "Failed to get line colors, %d.\n", status); + ok(colors[0] == 0x1 && colors[1] == 0x2, "Unexpected brush colors.\n"); + + status = GdipDeleteBrush((GpBrush *)brush); + ok(status == Ok, "Failed to delete a brush, %d.\n", status); + } /* zero height rect */ rectf.X = rectf.Y = 10.0; @@ -773,84 +735,96 @@ static void test_gradientgetrect(void) WrapModeTile, &brush); expect(OutOfMemory, status); - /* from rect with LinearGradientModeHorizontal */ - rectf.X = rectf.Y = 10.0; - rectf.Width = rectf.Height = 100.0; - status = GdipCreateLineBrushFromRect(&rectf, 0, 0, LinearGradientModeHorizontal, - WrapModeTile, &brush); - expect(Ok, status); - memset(&rectf, 0, sizeof(GpRectF)); - status = GdipGetLineRect(brush, &rectf); - expect(Ok, status); - expectf(10.0, rectf.X); - expectf(10.0, rectf.Y); - expectf(100.0, rectf.Width); - expectf(100.0, rectf.Height); - status = GdipGetLineTransform(brush, transform); - expect(Ok, status); - status = GdipGetMatrixElements(transform, elements); - expect(Ok,status); - expectf(1.0, elements[0]); - expectf(0.0, elements[1]); - expectf(0.0, elements[2]); - expectf(1.0, elements[3]); - expectf(0.0, elements[4]); - expectf(0.0, elements[5]); - status = GdipDeleteBrush((GpBrush*)brush); - expect(Ok,status); + for (i = 0; i < ARRAY_SIZE(create_from_rect); ++i) + { + ARGB colors[2]; + BOOL ret; - /* passing negative Width/Height to LinearGradientModeHorizontal */ - rectf.X = rectf.Y = 10.0; - rectf.Width = rectf.Height = -100.0; - status = GdipCreateLineBrushFromRect(&rectf, 0, 0, LinearGradientModeHorizontal, - WrapModeTile, &brush); - expect(Ok, status); - memset(&rectf, 0, sizeof(GpRectF)); - status = GdipGetLineRect(brush, &rectf); - expect(Ok, status); - expectf(10.0, rectf.X); - expectf(10.0, rectf.Y); - expectf(-100.0, rectf.Width); - expectf(-100.0, rectf.Height); - status = GdipGetLineTransform(brush, transform); - expect(Ok, status); - status = GdipGetMatrixElements(transform, elements); - expect(Ok,status); - expectf(1.0, elements[0]); - expectf(0.0, elements[1]); - expectf(0.0, elements[2]); - expectf(1.0, elements[3]); - expectf(0.0, elements[4]); - expectf(0.0, elements[5]); - status = GdipDeleteBrush((GpBrush*)brush); - expect(Ok,status); + status = GdipCreateLineBrushFromRect(&create_from_rect[i].rect, 0x1, 0x2, create_from_rect[i].mode, + WrapModeTile, &brush); + ok(status == Ok, "Failed to create a brush, %d.\n", status); - /* reverse gradient line as immediately previous */ - pt1.X = 10.0; - pt1.Y = 10.0; - pt2.X = -90.0; - pt2.Y = 10.0; - status = GdipCreateLineBrush(&pt1, &pt2, 0, 0, WrapModeTile, &brush); - expect(Ok, status); - memset(&rectf, 0, sizeof(GpRectF)); - status = GdipGetLineRect(brush, &rectf); - expect(Ok, status); - expectf(-90.0, rectf.X); - expectf(-40.0, rectf.Y); - expectf(100.0, rectf.Width); - expectf(100.0, rectf.Height); - status = GdipGetLineTransform(brush, transform); - expect(Ok, status); - status = GdipGetMatrixElements(transform, elements); - expect(Ok, status); - expectf(-1.0, elements[0]); - expectf(0.0, elements[1]); - expectf(0.0, elements[2]); - expectf(-1.0, elements[3]); - expectf(-80.0, elements[4]); - expectf(20.0, elements[5]); - status = GdipDeleteBrush((GpBrush*)brush); - expect(Ok, status); + memset(&rectf, 0, sizeof(rectf)); + status = GdipGetLineRect(brush, &rectf); + ok(status == Ok, "Failed to get brush rect, %d.\n", status); + ok(!memcmp(&rectf, &create_from_rect[i].rect, sizeof(rectf)), "Unexpected brush rect.\n"); + + status = GdipGetLineTransform(brush, transform); + ok(status == Ok, "Failed to get brush transform, %d.\n", status); + + if (create_from_rect[i].mode == LinearGradientModeHorizontal) + { + status = GdipIsMatrixIdentity(transform, &ret); + ok(status == Ok, "Unexpected ret value %d.\n", status); + } + else + { + status = GdipGetMatrixElements(transform, elements); + ok(status == Ok, "Failed to get matrix elements, %d.\n", status); + +#define expectf2(expected, got) ok(fabs(expected - got) < 0.001, "%u: expected %.3f, got %.3f.\n", i, expected, got) + expectf2(create_from_rect[i].transform[0], elements[0]); + expectf2(create_from_rect[i].transform[1], elements[1]); + expectf2(create_from_rect[i].transform[2], elements[2]); + expectf2(create_from_rect[i].transform[3], elements[3]); + expectf2(create_from_rect[i].transform[4], elements[4]); + expectf2(create_from_rect[i].transform[5], elements[5]); +#undef expectf2 + } + + status = GdipGetLineColors(brush, colors); + ok(status == Ok, "Failed to get line colors, %d.\n", status); + ok(colors[0] == 0x1 && colors[1] == 0x2, "Unexpected brush colors.\n"); + + status = GdipDeleteBrush((GpBrush*)brush); + ok(status == Ok, "Failed to delete a brush, %d.\n", status); + } + + for (i = 0; i < ARRAY_SIZE(create_with_angle); ++i) + { + ARGB colors[2]; + BOOL ret; + + status = GdipCreateLineBrushFromRectWithAngle(&create_with_angle[i].rect, 0x1, 0x2, create_with_angle[i].angle, + create_with_angle[i].is_scalable, WrapModeTile, &brush); + ok(status == Ok, "Failed to create a brush, %d.\n", status); + + memset(&rectf, 0, sizeof(rectf)); + status = GdipGetLineRect(brush, &rectf); + ok(status == Ok, "Failed to get brush rect, %d.\n", status); + ok(!memcmp(&rectf, &create_with_angle[i].rect, sizeof(rectf)), "%u: unexpected brush rect {%f,%f,%f,%f}.\n", + i, rectf.X, rectf.Y, rectf.Width, rectf.Height); + + status = GdipGetLineTransform(brush, transform); + ok(status == Ok, "Failed to get brush transform, %d.\n", status); + + if (create_with_angle[i].angle == 0.0f) + { + status = GdipIsMatrixIdentity(transform, &ret); + ok(status == Ok, "Unexpected ret value %d.\n", status); + } + else + { + status = GdipGetMatrixElements(transform, elements); + ok(status == Ok, "Failed to get matrix elements, %d.\n", status); + +#define expectf2(expected, got) ok(fabs(expected - got) < 0.001, "%u: expected %.3f, got %.3f.\n", i, expected, got) + expectf2(create_with_angle[i].transform[0], elements[0]); + expectf2(create_with_angle[i].transform[1], elements[1]); + expectf2(create_with_angle[i].transform[2], elements[2]); + expectf2(create_with_angle[i].transform[3], elements[3]); + expectf2(create_with_angle[i].transform[4], elements[4]); + expectf2(create_with_angle[i].transform[5], elements[5]); +#undef expectf2 + } + + status = GdipGetLineColors(brush, colors); + ok(status == Ok, "Failed to get line colors, %d.\n", status); + ok(colors[0] == 0x1 && colors[1] == 0x2, "Unexpected brush colors.\n"); + + status = GdipDeleteBrush((GpBrush*)brush); + ok(status == Ok, "Failed to delete a brush, %d.\n", status); + } GdipDeleteMatrix(transform); } diff --git a/modules/rostests/winetests/gdiplus/font.c b/modules/rostests/winetests/gdiplus/font.c index 961d8459cb..03e7a04e08 100644 --- a/modules/rostests/winetests/gdiplus/font.c +++ b/modules/rostests/winetests/gdiplus/font.c @@ -159,7 +159,8 @@ static void test_createfont(void) expect(Ok, stat); GdipGetFontSize (font, &size); ok (size == 24, "Expected 24, got %f (with unit: %d)\n", size, i); - GdipGetFontUnit (font, &unit); + stat = GdipGetFontUnit (font, &unit); + ok (stat == Ok, "Failed to get font unit, %d.\n", stat); expect (i, unit); GdipDeleteFont(font); } @@ -1238,6 +1239,27 @@ static void test_GdipGetFontCollectionFamilyList(void) GdipDeleteFontFamily(family2); } +static void test_GdipGetFontCollectionFamilyCount(void) +{ + GpFontCollection *collection; + GpStatus status; + INT count; + + status = GdipGetFontCollectionFamilyCount(NULL, NULL); + ok(status == InvalidParameter, "Unexpected status %d.\n", status); + + count = 123; + status = GdipGetFontCollectionFamilyCount(NULL, &count); + ok(status == InvalidParameter, "Unexpected status %d.\n", status); + ok(count == 123, "Unexpected family count %d.\n", count); + + status = GdipNewInstalledFontCollection(&collection); + ok(status == Ok, "Failed to get system collection, status %d.\n", status); + + status = GdipGetFontCollectionFamilyCount(collection, NULL); + ok(status == InvalidParameter, "Unexpected status %d.\n", status); +} + START_TEST(font) { struct GdiplusStartupInput gdiplusStartupInput; @@ -1269,6 +1291,7 @@ START_TEST(font) test_installedfonts(); test_heightgivendpi(); test_GdipGetFontCollectionFamilyList(); + test_GdipGetFontCollectionFamilyCount(); GdiplusShutdown(gdiplusToken); } diff --git a/modules/rostests/winetests/gdiplus/graphics.c b/modules/rostests/winetests/gdiplus/graphics.c index b0e3d8232b..f2ff589ab5 100644 --- a/modules/rostests/winetests/gdiplus/graphics.c +++ b/modules/rostests/winetests/gdiplus/graphics.c @@ -347,7 +347,8 @@ static void test_save_restore(void) log_state(state_a, &state_log); /* A state created by BeginContainer cannot be restored with RestoreGraphics. */ - GdipCreateFromHDC(hdc, &graphics1); + stat = GdipCreateFromHDC(hdc, &graphics1); + expect(Ok, stat); GdipSetInterpolationMode(graphics1, InterpolationModeBilinear); stat = GdipBeginContainer2(graphics1, &state_a); expect(Ok, stat); @@ -703,7 +704,8 @@ static void test_BeginContainer2(void) GdipGetTextContrast(graphics, &contrast); ok(defContrast == contrast, "Expected Text Contrast to be restored to %d, got %d\n", defContrast, contrast); - GdipGetTextRenderingHint(graphics, &texthint); + status = GdipGetTextRenderingHint(graphics, &texthint); + expect(Ok, status); ok(defTexthint == texthint, "Expected Text Hint to be restored to %d, got %d\n", defTexthint, texthint); /* test world transform */ @@ -722,7 +724,8 @@ static void test_BeginContainer2(void) status = GdipCreateMatrix2(10, 20, 30, 40, 50, 60, &transform); expect(Ok, status); - GdipSetWorldTransform(graphics, transform); + status = GdipSetWorldTransform(graphics, transform); + expect(Ok, status); GdipDeleteMatrix(transform); transform = NULL; @@ -731,7 +734,8 @@ static void test_BeginContainer2(void) status = GdipCreateMatrix(&transform); expect(Ok, status); - GdipGetWorldTransform(graphics, transform); + status = GdipGetWorldTransform(graphics, transform); + expect(Ok, status); status = GdipGetMatrixElements(transform, elems); expect(Ok, status); ok(fabs(defTrans[0] - elems[0]) < 0.0001 && @@ -753,12 +757,14 @@ static void test_BeginContainer2(void) status = GdipBeginContainer2(graphics, &cont1); expect(Ok, status); - GdipSetClipRect(graphics, defClip[0], defClip[1], defClip[2], defClip[3], CombineModeReplace); + status = GdipSetClipRect(graphics, defClip[0], defClip[1], defClip[2], defClip[3], CombineModeReplace); + expect(Ok, status); status = GdipBeginContainer2(graphics, &cont2); expect(Ok, status); - GdipSetClipRect(graphics, 2, 4, 6, 8, CombineModeReplace); + status = GdipSetClipRect(graphics, 2, 4, 6, 8, CombineModeReplace); + expect(Ok, status); status = GdipEndContainer(graphics, cont2); expect(Ok, status); @@ -6572,12 +6578,18 @@ static void test_GdipFillRectanglesOnBitmapTextureBrush(void) GdipDeleteBrush((GpBrush*)brush); GdipDeleteGraphics(graphics); - GdipBitmapGetPixel(dst_img.bitmap, 0, 0, &color[0]); - GdipBitmapGetPixel(dst_img.bitmap, 0, 1, &color[1]); - GdipBitmapGetPixel(dst_img.bitmap, 1, 0, &color[2]); - GdipBitmapGetPixel(dst_img.bitmap, width/2, 0, &color[3]); - GdipBitmapGetPixel(dst_img.bitmap, width/2, height/2, &color[4]); - GdipBitmapGetPixel(dst_img.bitmap, 0, height/2, &color[5]); + status = GdipBitmapGetPixel(dst_img.bitmap, 0, 0, &color[0]); + expect(Ok, status); + status = GdipBitmapGetPixel(dst_img.bitmap, 0, 1, &color[1]); + expect(Ok, status); + status = GdipBitmapGetPixel(dst_img.bitmap, 1, 0, &color[2]); + expect(Ok, status); + status = GdipBitmapGetPixel(dst_img.bitmap, width/2, 0, &color[3]); + expect(Ok, status); + status = GdipBitmapGetPixel(dst_img.bitmap, width/2, height/2, &color[4]); + expect(Ok, status); + status = GdipBitmapGetPixel(dst_img.bitmap, 0, height/2, &color[5]); + expect(Ok, status); ok(is_blue_color(color[0]) && is_blue_color(color[1]) && is_blue_color(color[2]) && color[3] == 0 && color[4] == 0 && color[5] == 0, diff --git a/modules/rostests/winetests/gdiplus/image.c b/modules/rostests/winetests/gdiplus/image.c index 516e7129a6..1ad24cc88a 100644 --- a/modules/rostests/winetests/gdiplus/image.c +++ b/modules/rostests/winetests/gdiplus/image.c @@ -2736,7 +2736,7 @@ static void test_multiframegif(void) expect(Ok, stat); color = 0xdeadbeef; - GdipBitmapGetPixel(bmp, 0, 0, &color); + stat = GdipBitmapGetPixel(bmp, 0, 0, &color); expect(Ok, stat); expect(0xff000000, color); @@ -3236,7 +3236,7 @@ static LONG obj_refcount(void *obj) return IUnknown_Release((IUnknown *)obj); } -static GpImage *load_image(const BYTE *image_data, UINT image_size) +static GpImage *load_image(const BYTE *image_data, UINT image_size, BOOL valid_data, BOOL todo_load) { IStream *stream; HGLOBAL hmem; @@ -3260,6 +3260,12 @@ static GpImage *load_image(const BYTE *image_data, UINT image_size) ok(refcount == 1, "expected stream refcount 1, got %d\n", refcount); status = GdipLoadImageFromStream(stream, &image); + todo_wine_if(todo_load) + if (valid_data) + ok(status == Ok || broken(status == InvalidParameter), /* XP */ + "GdipLoadImageFromStream error %d\n", status); + else + ok(status != Ok, "GdipLoadImageFromStream should fail\n"); if (status != Ok) { IStream_Release(stream); @@ -3330,7 +3336,7 @@ static void test_image_properties(void) for (i = 0; i < ARRAY_SIZE(td); i++) { - image = load_image(td[i].image_data, td[i].image_size); + image = load_image(td[i].image_data, td[i].image_size, TRUE, FALSE); if (!image) { trace("%u: failed to load image data\n", i); @@ -3623,7 +3629,7 @@ static void test_tiff_properties(void) PROPID *prop_id; PropertyItem *prop_item; - image = load_image((const BYTE *)&TIFF_data, sizeof(TIFF_data)); + image = load_image((const BYTE *)&TIFF_data, sizeof(TIFF_data), TRUE, FALSE); if (!image) { win_skip("Failed to load TIFF image data. Might not be supported. Skipping.\n"); @@ -3735,7 +3741,7 @@ static void test_GdipGetAllPropertyItems(void) PropertyItem *prop_item; const char *item_data; - image = load_image(tiffimage, sizeof(tiffimage)); + image = load_image(tiffimage, sizeof(tiffimage), TRUE, FALSE); ok(image != 0, "Failed to load TIFF image data\n"); if (!image) return; @@ -3883,7 +3889,7 @@ static void test_tiff_palette(void) ARGB *entries = palette.pal.Entries; /* 1bpp TIFF without palette */ - image = load_image((const BYTE *)&TIFF_data, sizeof(TIFF_data)); + image = load_image((const BYTE *)&TIFF_data, sizeof(TIFF_data), TRUE, FALSE); if (!image) { win_skip("Failed to load TIFF image data. Might not be supported. Skipping.\n"); @@ -4534,7 +4540,7 @@ static void test_gif_properties(void) PropertyItem *prop_item; const char *item_data; - image = load_image(animatedgif, sizeof(animatedgif)); + image = load_image(animatedgif, sizeof(animatedgif), TRUE, FALSE); if (!image) /* XP fails to load this GIF image */ { trace("Failed to load GIF image data\n"); @@ -5116,65 +5122,208 @@ static void test_imageabort(void) static const char png_1x1_data[] = { 0x89,'P','N','G',0x0d,0x0a,0x1a,0x0a, 0x00,0x00,0x00,0x0d,'I','H','D','R',0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x08,0x02,0x00,0x00,0x00,0x90,0x77,0x53,0xde, + 0x00,0x00,0x03,0x00,'P','L','T','E', + 0x01,0x01,0x01,0x02,0x02,0x02,0x03,0x03,0x03,0x04,0x04,0x04,0x05,0x05,0x05,0x06,0x06,0x06,0x07,0x07,0x07,0x08,0x08,0x08, + 0x09,0x09,0x09,0x0a,0x0a,0x0a,0x0b,0x0b,0x0b,0x0c,0x0c,0x0c,0x0d,0x0d,0x0d,0x0e,0x0e,0x0e,0x0f,0x0f,0x0f,0x10,0x10,0x10, + 0x11,0x11,0x11,0x12,0x12,0x12,0x13,0x13,0x13,0x14,0x14,0x14,0x15,0x15,0x15,0x16,0x16,0x16,0x17,0x17,0x17,0x18,0x18,0x18, + 0x19,0x19,0x19,0x1a,0x1a,0x1a,0x1b,0x1b,0x1b,0x1c,0x1c,0x1c,0x1d,0x1d,0x1d,0x1e,0x1e,0x1e,0x1f,0x1f,0x1f,0x20,0x20,0x20, + 0x21,0x21,0x21,0x22,0x22,0x22,0x23,0x23,0x23,0x24,0x24,0x24,0x25,0x25,0x25,0x26,0x26,0x26,0x27,0x27,0x27,0x28,0x28,0x28, + 0x29,0x29,0x29,0x2a,0x2a,0x2a,0x2b,0x2b,0x2b,0x2c,0x2c,0x2c,0x2d,0x2d,0x2d,0x2e,0x2e,0x2e,0x2f,0x2f,0x2f,0x30,0x30,0x30, + 0x31,0x31,0x31,0x32,0x32,0x32,0x33,0x33,0x33,0x34,0x34,0x34,0x35,0x35,0x35,0x36,0x36,0x36,0x37,0x37,0x37,0x38,0x38,0x38, + 0x39,0x39,0x39,0x3a,0x3a,0x3a,0x3b,0x3b,0x3b,0x3c,0x3c,0x3c,0x3d,0x3d,0x3d,0x3e,0x3e,0x3e,0x3f,0x3f,0x3f,0x40,0x40,0x40, + 0x41,0x41,0x41,0x42,0x42,0x42,0x43,0x43,0x43,0x44,0x44,0x44,0x45,0x45,0x45,0x46,0x46,0x46,0x47,0x47,0x47,0x48,0x48,0x48, + 0x49,0x49,0x49,0x4a,0x4a,0x4a,0x4b,0x4b,0x4b,0x4c,0x4c,0x4c,0x4d,0x4d,0x4d,0x4e,0x4e,0x4e,0x4f,0x4f,0x4f,0x50,0x50,0x50, + 0x51,0x51,0x51,0x52,0x52,0x52,0x53,0x53,0x53,0x54,0x54,0x54,0x55,0x55,0x55,0x56,0x56,0x56,0x57,0x57,0x57,0x58,0x58,0x58, + 0x59,0x59,0x59,0x5a,0x5a,0x5a,0x5b,0x5b,0x5b,0x5c,0x5c,0x5c,0x5d,0x5d,0x5d,0x5e,0x5e,0x5e,0x5f,0x5f,0x5f,0x60,0x60,0x60, + 0x61,0x61,0x61,0x62,0x62,0x62,0x63,0x63,0x63,0x64,0x64,0x64,0x65,0x65,0x65,0x66,0x66,0x66,0x67,0x67,0x67,0x68,0x68,0x68, + 0x69,0x69,0x69,0x6a,0x6a,0x6a,0x6b,0x6b,0x6b,0x6c,0x6c,0x6c,0x6d,0x6d,0x6d,0x6e,0x6e,0x6e,0x6f,0x6f,0x6f,0x70,0x70,0x70, + 0x71,0x71,0x71,0x72,0x72,0x72,0x73,0x73,0x73,0x74,0x74,0x74,0x75,0x75,0x75,0x76,0x76,0x76,0x77,0x77,0x77,0x78,0x78,0x78, + 0x79,0x79,0x79,0x7a,0x7a,0x7a,0x7b,0x7b,0x7b,0x7c,0x7c,0x7c,0x7d,0x7d,0x7d,0x7e,0x7e,0x7e,0x7f,0x7f,0x7f,0x80,0x80,0x80, + 0x01,0x01,0x01,0x02,0x02,0x02,0x03,0x03,0x03,0x04,0x04,0x04,0x05,0x05,0x05,0x06,0x06,0x06,0x07,0x07,0x07,0x08,0x08,0x08, + 0x09,0x09,0x09,0x0a,0x0a,0x0a,0x0b,0x0b,0x0b,0x0c,0x0c,0x0c,0x0d,0x0d,0x0d,0x0e,0x0e,0x0e,0x0f,0x0f,0x0f,0x10,0x10,0x10, + 0x11,0x11,0x11,0x12,0x12,0x12,0x13,0x13,0x13,0x14,0x14,0x14,0x15,0x15,0x15,0x16,0x16,0x16,0x17,0x17,0x17,0x18,0x18,0x18, + 0x19,0x19,0x19,0x1a,0x1a,0x1a,0x1b,0x1b,0x1b,0x1c,0x1c,0x1c,0x1d,0x1d,0x1d,0x1e,0x1e,0x1e,0x1f,0x1f,0x1f,0x20,0x20,0x20, + 0x21,0x21,0x21,0x22,0x22,0x22,0x23,0x23,0x23,0x24,0x24,0x24,0x25,0x25,0x25,0x26,0x26,0x26,0x27,0x27,0x27,0x28,0x28,0x28, + 0x29,0x29,0x29,0x2a,0x2a,0x2a,0x2b,0x2b,0x2b,0x2c,0x2c,0x2c,0x2d,0x2d,0x2d,0x2e,0x2e,0x2e,0x2f,0x2f,0x2f,0x30,0x30,0x30, + 0x31,0x31,0x31,0x32,0x32,0x32,0x33,0x33,0x33,0x34,0x34,0x34,0x35,0x35,0x35,0x36,0x36,0x36,0x37,0x37,0x37,0x38,0x38,0x38, + 0x39,0x39,0x39,0x3a,0x3a,0x3a,0x3b,0x3b,0x3b,0x3c,0x3c,0x3c,0x3d,0x3d,0x3d,0x3e,0x3e,0x3e,0x3f,0x3f,0x3f,0x40,0x40,0x40, + 0x41,0x41,0x41,0x42,0x42,0x42,0x43,0x43,0x43,0x44,0x44,0x44,0x45,0x45,0x45,0x46,0x46,0x46,0x47,0x47,0x47,0x48,0x48,0x48, + 0x49,0x49,0x49,0x4a,0x4a,0x4a,0x4b,0x4b,0x4b,0x4c,0x4c,0x4c,0x4d,0x4d,0x4d,0x4e,0x4e,0x4e,0x4f,0x4f,0x4f,0x50,0x50,0x50, + 0x51,0x51,0x51,0x52,0x52,0x52,0x53,0x53,0x53,0x54,0x54,0x54,0x55,0x55,0x55,0x56,0x56,0x56,0x57,0x57,0x57,0x58,0x58,0x58, + 0x59,0x59,0x59,0x5a,0x5a,0x5a,0x5b,0x5b,0x5b,0x5c,0x5c,0x5c,0x5d,0x5d,0x5d,0x5e,0x5e,0x5e,0x5f,0x5f,0x5f,0x60,0x60,0x60, + 0x61,0x61,0x61,0x62,0x62,0x62,0x63,0x63,0x63,0x64,0x64,0x64,0x65,0x65,0x65,0x66,0x66,0x66,0x67,0x67,0x67,0x68,0x68,0x68, + 0x69,0x69,0x69,0x6a,0x6a,0x6a,0x6b,0x6b,0x6b,0x6c,0x6c,0x6c,0x6d,0x6d,0x6d,0x6e,0x6e,0x6e,0x6f,0x6f,0x6f,0x70,0x70,0x70, + 0x71,0x71,0x71,0x72,0x72,0x72,0x73,0x73,0x73,0x74,0x74,0x74,0x75,0x75,0x75,0x76,0x76,0x76,0x77,0x77,0x77,0x78,0x78,0x78, + 0x79,0x79,0x79,0x7a,0x7a,0x7a,0x7b,0x7b,0x7b,0x7c,0x7c,0x7c,0x7d,0x7d,0x7d,0x7e,0x7e,0x7e,0x7f,0x7f,0x7f,0x80,0x80,0x80, + 0x76,0xb6,0x24,0x31, + 0x00,0x00,0x00,0x02,'t','R','N','S',0xff,0x00,0xe5,0xb7,0x30,0x4a, 0x00,0x00,0x00,0x0c,'I','D','A','T',0x08,0xd7,0x63,0xf8,0xff,0xff,0x3f,0x00,0x05,0xfe,0x02,0xfe,0xdc,0xcc,0x59,0xe7, 0x00,0x00,0x00,0x00,'I','E','N','D',0xae,0x42,0x60,0x82 }; +#define PNG_COLOR_TYPE_GRAY 0 +#define PNG_COLOR_TYPE_RGB 2 +#define PNG_COLOR_TYPE_PALETTE 3 +#define PNG_COLOR_TYPE_GRAY_ALPHA 4 +#define PNG_COLOR_TYPE_RGB_ALPHA 6 + static void test_png_color_formats(void) { static const struct { char bit_depth, color_type; - PixelFormat format; - UINT flags; + struct { + PixelFormat format; + ImageFlags flags; + BOOL todo; + BOOL todo_load; + } t[3]; } td[] = { - /* 2 - PNG_COLOR_TYPE_RGB */ - { 8, 2, PixelFormat24bppRGB, ImageFlagsColorSpaceRGB }, - /* 0 - PNG_COLOR_TYPE_GRAY */ - { 1, 0, PixelFormat1bppIndexed, ImageFlagsColorSpaceRGB }, - { 2, 0, PixelFormat32bppARGB, ImageFlagsColorSpaceGRAY }, - { 4, 0, PixelFormat32bppARGB, ImageFlagsColorSpaceGRAY }, - { 8, 0, PixelFormat32bppARGB, ImageFlagsColorSpaceGRAY }, - { 16, 0, PixelFormat32bppARGB, ImageFlagsColorSpaceGRAY }, + /* 0 */ + { 1, PNG_COLOR_TYPE_RGB }, + { 2, PNG_COLOR_TYPE_RGB }, + { 4, PNG_COLOR_TYPE_RGB }, + { 8, PNG_COLOR_TYPE_RGB, + {{ PixelFormat32bppARGB, ImageFlagsColorSpaceRGB }, + { PixelFormat24bppRGB, ImageFlagsColorSpaceRGB }, + { PixelFormat24bppRGB, ImageFlagsColorSpaceRGB }}}, + /* libpng refuses to load our test image complaining about extra compressed data, + * but libpng is still able to load the image with other combination of type/depth + * making RGB 16 bpp case special for some reason. Therefore todo = TRUE. + */ + { 16, PNG_COLOR_TYPE_RGB, + {{ PixelFormat32bppARGB, ImageFlagsColorSpaceRGB, TRUE, TRUE }, + { PixelFormat32bppARGB, ImageFlagsColorSpaceRGB, TRUE, TRUE }, + { PixelFormat32bppARGB, ImageFlagsColorSpaceRGB, TRUE, TRUE }}}, + + /* 5 */ + { 1, PNG_COLOR_TYPE_GRAY, + {{ PixelFormat32bppARGB, ImageFlagsColorSpaceRGB }, + { PixelFormat1bppIndexed, ImageFlagsColorSpaceRGB }, + { PixelFormat1bppIndexed, ImageFlagsColorSpaceRGB }}}, + { 2, PNG_COLOR_TYPE_GRAY, + {{ PixelFormat32bppARGB, ImageFlagsColorSpaceRGB }, + { PixelFormat32bppARGB, ImageFlagsColorSpaceGRAY }, + { PixelFormat32bppARGB, ImageFlagsColorSpaceGRAY }}}, + { 4, PNG_COLOR_TYPE_GRAY, + {{ PixelFormat32bppARGB, ImageFlagsColorSpaceRGB }, + { PixelFormat32bppARGB, ImageFlagsColorSpaceGRAY }, + { PixelFormat32bppARGB, ImageFlagsColorSpaceGRAY }}}, + { 8, PNG_COLOR_TYPE_GRAY, + {{ PixelFormat32bppARGB, ImageFlagsColorSpaceRGB }, + { PixelFormat32bppARGB, ImageFlagsColorSpaceGRAY }, + { PixelFormat32bppARGB, ImageFlagsColorSpaceGRAY }}}, + { 16, PNG_COLOR_TYPE_GRAY, + {{ PixelFormat32bppARGB, ImageFlagsColorSpaceRGB }, + { PixelFormat32bppARGB, ImageFlagsColorSpaceGRAY }, + { PixelFormat32bppARGB, ImageFlagsColorSpaceGRAY }}}, + + /* 10 */ + { 1, PNG_COLOR_TYPE_PALETTE, + {{ PixelFormat32bppARGB, ImageFlagsColorSpaceRGB }, + { PixelFormat1bppIndexed, ImageFlagsColorSpaceRGB }, + { 0, 0 }}}, + { 2, PNG_COLOR_TYPE_PALETTE, + {{ PixelFormat32bppARGB, ImageFlagsColorSpaceRGB }, + { PixelFormat32bppARGB, ImageFlagsColorSpaceRGB }, + { 0, 0 }}}, + { 4, PNG_COLOR_TYPE_PALETTE, + {{ PixelFormat32bppARGB, ImageFlagsColorSpaceRGB }, + { PixelFormat4bppIndexed, ImageFlagsColorSpaceRGB }, + { 0, 0 }}}, + { 8, PNG_COLOR_TYPE_PALETTE, + {{ PixelFormat32bppARGB, ImageFlagsColorSpaceRGB }, + { PixelFormat8bppIndexed, ImageFlagsColorSpaceRGB }, + { 0, 0 }}}, + { 16, PNG_COLOR_TYPE_PALETTE }, }; BYTE buf[sizeof(png_1x1_data)]; GpStatus status; GpImage *image; ImageType type; PixelFormat format; - UINT flags; - int i; + ImageFlags flags; + BOOL valid; + int i, j, PLTE_off = 0, tRNS_off = 0; + const ImageFlags color_space_mask = ImageFlagsColorSpaceRGB | ImageFlagsColorSpaceCMYK | ImageFlagsColorSpaceGRAY | ImageFlagsColorSpaceYCBCR | ImageFlagsColorSpaceYCCK; + + memcpy(buf, png_1x1_data, sizeof(png_1x1_data)); + buf[24] = 2; + buf[25] = PNG_COLOR_TYPE_PALETTE; + image = load_image(buf, sizeof(buf), TRUE, FALSE); + status = GdipGetImageFlags(image, &flags); + expect(status, Ok); + ok((flags & color_space_mask) == ImageFlagsColorSpaceRGB || broken(flags == 0x12006) /* before win7 */, + "flags = %#x\n", flags); + if ((flags & color_space_mask) != ImageFlagsColorSpaceRGB) { + GdipDisposeImage(image); + win_skip("broken PNG color space support\n"); + return; + } + GdipDisposeImage(image); - for (i = 0; i < ARRAY_SIZE(td); i++) + for (i = 0; i < sizeof(png_1x1_data) - 4; i++) { - memcpy(buf, png_1x1_data, sizeof(png_1x1_data)); - buf[24] = td[i].bit_depth; - buf[25] = td[i].color_type; + if (!memcmp(buf + i, "tRNS", 4)) + tRNS_off = i; + else if (!memcmp(buf + i, "PLTE", 4)) + PLTE_off = i; + } - image = load_image(buf, sizeof(buf)); - ok(image != NULL, "%d: failed to load image data\n", i); - if (!image) continue; + ok(PLTE_off && tRNS_off, "PLTE offset %d, tRNS offset %d\n", PLTE_off, tRNS_off); + if (!PLTE_off || !tRNS_off) return; - status = GdipGetImageType(image, &type); - ok(status == Ok, "%u: GdipGetImageType error %d\n", i, status); - ok(type == ImageTypeBitmap, "%d: wrong image type %d\n", i, type); + /* In order to test the image data with and without PLTE and tRNS + * chunks, we mask the chunk name with private one (tEST). + */ - status = GdipGetImagePixelFormat(image, &format); - expect(Ok, status); - ok(format == td[i].format || - broken(td[i].bit_depth == 1 && td[i].color_type == 0 && format == PixelFormat32bppARGB), /* XP */ - "%d: expected %#x, got %#x\n", i, td[i].format, format); + for (i = 0; i < ARRAY_SIZE(td); i++) + { + for (j = 0; j < 3; j++) + { + memcpy(buf, png_1x1_data, sizeof(png_1x1_data)); + buf[24] = td[i].bit_depth; + buf[25] = td[i].color_type; + if (j >=1) memcpy(buf + tRNS_off, "tEST", 4); + if (j >=2) memcpy(buf + PLTE_off, "tEST", 4); + + valid = (td[i].t[j].format != 0) || (td[i].t[j].flags != 0); + image = load_image(buf, sizeof(buf), valid, td[i].t[j].todo_load); + todo_wine_if(td[i].t[j].todo_load) + if (valid) + ok(image != NULL, "%d %d: failed to load image data\n", i, j); + else + { + ok(image == NULL, "%d %d: succeed to load image data\n", i, j); + if (image) GdipDisposeImage(image); + image = NULL; + } + if (!image) continue; - status = GdipGetImageFlags(image, &flags); - expect(Ok, status); - ok((flags & td[i].flags) == td[i].flags || - broken(td[i].bit_depth == 1 && td[i].color_type == 0 && (flags & ImageFlagsColorSpaceGRAY)), /* XP */ - "%d: expected %#x, got %#x\n", i, td[i].flags, flags); + status = GdipGetImageType(image, &type); + ok(status == Ok, "%d %d: GdipGetImageType error %d\n", i, j, status); + ok(type == ImageTypeBitmap, "%d %d: wrong image type %d\n", i, j, type); - GdipDisposeImage(image); + status = GdipGetImagePixelFormat(image, &format); + expect(Ok, status); + todo_wine_if(td[i].t[j].todo) + ok(format == td[i].t[j].format, + "%d %d: expected %#x, got %#x\n", i, j, td[i].t[j].format, format); + + status = GdipGetImageFlags(image, &flags); + expect(Ok, status); + ok((flags & color_space_mask) == td[i].t[j].flags, + "%d %d: expected %#x, got %#x\n", i, j, td[i].t[j].flags, flags); + GdipDisposeImage(image); + } } } +#undef PNG_COLOR_TYPE_GRAY +#undef PNG_COLOR_TYPE_RGB +#undef PNG_COLOR_TYPE_PALETTE +#undef PNG_COLOR_TYPE_GRAY_ALPHA +#undef PNG_COLOR_TYPE_RGB_ALPHA static void test_GdipLoadImageFromStream(void) { @@ -5508,7 +5657,7 @@ static void test_tiff_color_formats(void) continue; } - image = load_image(buf, sizeof(buf)); + image = load_image(buf, sizeof(buf), TRUE, FALSE); if (!td[i].format) ok(!image, "%u: (%d,%d,%d) TIFF image loading should have failed\n", i, td[i].photometric, td[i].samples, td[i].bps); diff --git a/modules/rostests/winetests/gdiplus/pen.c b/modules/rostests/winetests/gdiplus/pen.c index be3d76d655..ceab92acff 100644 --- a/modules/rostests/winetests/gdiplus/pen.c +++ b/modules/rostests/winetests/gdiplus/pen.c @@ -389,6 +389,22 @@ todo_wine { GdipDeletePen(pen); } +static void get_pen_transform(GpPen *pen, REAL *values) +{ + GpMatrix *matrix; + GpStatus status; + + status = GdipCreateMatrix(&matrix); + expect(Ok, status); + + status = GdipGetPenTransform(pen, matrix); + expect(Ok, status); + status = GdipGetMatrixElements(matrix, values); + expect(Ok, status); + + GdipDeleteMatrix(matrix); +} + static void test_transform(void) { GpStatus status; @@ -478,6 +494,138 @@ static void test_transform(void) expectf(0.0, values[4]); expectf(0.0, values[5]); + /* Scale */ + status = GdipScalePenTransform(NULL, 1.0, 1.0, MatrixOrderPrepend); + expect(InvalidParameter, status); + + status = GdipScalePenTransform(pen, 1.0, 1.0, MatrixOrderPrepend); + expect(Ok, status); + + get_pen_transform(pen, values); + expectf(1.0, values[0]); + expectf(0.0, values[1]); + expectf(0.0, values[2]); + expectf(1.0, values[3]); + expectf(0.0, values[4]); + expectf(0.0, values[5]); + + status = GdipScalePenTransform(pen, 2.0, -10.0, MatrixOrderPrepend); + expect(Ok, status); + + get_pen_transform(pen, values); + expectf(2.0, values[0]); + expectf(0.0, values[1]); + expectf(0.0, values[2]); + expectf(-10.0, values[3]); + expectf(0.0, values[4]); + expectf(0.0, values[5]); + + status = GdipScalePenTransform(pen, 2.0, -10.0, MatrixOrderAppend); + expect(Ok, status); + + get_pen_transform(pen, values); + expectf(4.0, values[0]); + expectf(0.0, values[1]); + expectf(0.0, values[2]); + expectf(100.0, values[3]); + expectf(0.0, values[4]); + expectf(0.0, values[5]); + + status = GdipTranslatePenTransform(pen, 1.0, -2.0, MatrixOrderAppend); + expect(Ok, status); + + get_pen_transform(pen, values); + expectf(4.0, values[0]); + expectf(0.0, values[1]); + expectf(0.0, values[2]); + expectf(100.0, values[3]); + expectf(1.0, values[4]); + expectf(-2.0, values[5]); + + status = GdipScalePenTransform(pen, 2.0, -10.0, MatrixOrderPrepend); + expect(Ok, status); + + get_pen_transform(pen, values); + expectf(8.0, values[0]); + expectf(0.0, values[1]); + expectf(0.0, values[2]); + expectf(-1000.0, values[3]); + expectf(1.0, values[4]); + expectf(-2.0, values[5]); + + /* Multiply */ + status = GdipResetPenTransform(pen); + expect(Ok, status); + + status = GdipSetMatrixElements(matrix, 2.0, 1.0, 1.0, 4.0, 1.0, 2.0); + expect(Ok, status); + + status = GdipMultiplyPenTransform(NULL, matrix, MatrixOrderPrepend); + expect(InvalidParameter, status); + + status = GdipMultiplyPenTransform(pen, matrix, MatrixOrderPrepend); + expect(Ok, status); + + get_pen_transform(pen, values); + expectf(2.0, values[0]); + expectf(1.0, values[1]); + expectf(1.0, values[2]); + expectf(4.0, values[3]); + expectf(1.0, values[4]); + expectf(2.0, values[5]); + + status = GdipScalePenTransform(pen, 2.0, -10.0, MatrixOrderAppend); + expect(Ok, status); + + status = GdipMultiplyPenTransform(pen, matrix, MatrixOrderAppend); + expect(Ok, status); + + get_pen_transform(pen, values); + expectf(-2.0, values[0]); + expectf(-36.0, values[1]); + expectf(-36.0, values[2]); + expectf(-158.0, values[3]); + expectf(-15.0, values[4]); + expectf(-76.0, values[5]); + + /* Rotate */ + status = GdipResetPenTransform(pen); + expect(Ok, status); + + status = GdipSetMatrixElements(matrix, 2.0, 1.0, 1.0, 4.0, 1.0, 2.0); + expect(Ok, status); + + status = GdipSetPenTransform(pen, matrix); + expect(Ok, status); + + status = GdipRotatePenTransform(NULL, 10.0, MatrixOrderPrepend); + expect(InvalidParameter, status); + + status = GdipRotatePenTransform(pen, 45.0, MatrixOrderPrepend); + expect(Ok, status); + + get_pen_transform(pen, values); + expectf(2.12, values[0]); + expectf(3.54, values[1]); + expectf(-0.71, values[2]); + expectf(2.12, values[3]); + expectf(1.0, values[4]); + expectf(2.0, values[5]); + + status = GdipScalePenTransform(pen, 2.0, -10.0, MatrixOrderAppend); + expect(Ok, status); + + status = GdipRotatePenTransform(pen, 180.0, MatrixOrderAppend); + expect(Ok, status); + + get_pen_transform(pen, values); + expectf(-4.24, values[0]); + expectf(35.36, values[1]); + expectf(1.41, values[2]); + expectf(21.21, values[3]); + expectf(-2.0, values[4]); + expectf(20.0, values[5]); + GdipDeletePen(pen); GdipDeleteMatrix(matrix); diff --git a/modules/rostests/winetests/gdiplus/region.c b/modules/rostests/winetests/gdiplus/region.c index c2cbff01f6..d69f09db60 100644 --- a/modules/rostests/winetests/gdiplus/region.c +++ b/modules/rostests/winetests/gdiplus/region.c @@ -814,7 +814,8 @@ static void test_isinfinite(void) status = GdipCreateFromHDC(hdc, &graphics); expect(Ok, status); - GdipCreateRegion(®ion); + status = GdipCreateRegion(®ion); + expect(Ok, status); GdipCreateMatrix2(3.0, 0.0, 0.0, 1.0, 20.0, 30.0, &m); @@ -860,7 +861,8 @@ static void test_isempty(void) status = GdipCreateFromHDC(hdc, &graphics); expect(Ok, status); - GdipCreateRegion(®ion); + status = GdipCreateRegion(®ion); + expect(Ok, status); /* NULL arguments */ status = GdipIsEmptyRegion(NULL, NULL, NULL); @@ -1779,7 +1781,8 @@ static void test_getbounds(void) ok(rectf.Height == 100.0, "Expected height = 0.0, got %.2f\n", rectf.Height); /* the world and page transforms are ignored */ - GdipScaleWorldTransform(graphics, 2.0, 2.0, MatrixOrderPrepend); + status = GdipScaleWorldTransform(graphics, 2.0, 2.0, MatrixOrderPrepend); + ok(status == Ok, "status %08x\n", status); GdipSetPageUnit(graphics, UnitInch); GdipSetPageScale(graphics, 2.0); status = GdipGetRegionBounds(region, graphics, &rectf);
6 years
1
0
0
0
[reactos] 01/01: [PSDK] Update gdiplusflat.h. CORE-15682
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=07c408ae72544fa9b89bc…
commit 07c408ae72544fa9b89bc94d532bc42392864e90 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Fri Jan 25 13:22:24 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Fri Jan 25 13:22:24 2019 +0100 [PSDK] Update gdiplusflat.h. CORE-15682 --- sdk/include/psdk/gdiplusflat.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdk/include/psdk/gdiplusflat.h b/sdk/include/psdk/gdiplusflat.h index af8033e3b3..57fa6c64f2 100644 --- a/sdk/include/psdk/gdiplusflat.h +++ b/sdk/include/psdk/gdiplusflat.h @@ -630,7 +630,9 @@ GpStatus WINGDIPAPI GdipGetPenDashOffset(GpPen*,REAL*); GpStatus WINGDIPAPI GdipGetPenDashStyle(GpPen*,GpDashStyle*); GpStatus WINGDIPAPI GdipGetPenMode(GpPen*,GpPenAlignment*); GpStatus WINGDIPAPI GdipGetPenTransform(GpPen *, GpMatrix *); +GpStatus WINGDIPAPI GdipMultiplyPenTransform(GpPen *,GDIPCONST GpMatrix *,GpMatrixOrder); GpStatus WINGDIPAPI GdipResetPenTransform(GpPen*); +GpStatus WINGDIPAPI GdipRotatePenTransform(GpPen*,REAL,GpMatrixOrder); GpStatus WINGDIPAPI GdipScalePenTransform(GpPen*,REAL,REAL,GpMatrixOrder); GpStatus WINGDIPAPI GdipSetPenBrushFill(GpPen*,GpBrush*); GpStatus WINGDIPAPI GdipSetPenColor(GpPen*,ARGB);
6 years
1
0
0
0
[reactos] 01/01: [GDIPLUS] Sync with Wine Staging 4.0. CORE-15682
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=89f10a28f7927e6db2c62…
commit 89f10a28f7927e6db2c62bb89d1e40602b241b93 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Fri Jan 25 13:21:54 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Fri Jan 25 13:21:54 2019 +0100 [GDIPLUS] Sync with Wine Staging 4.0. CORE-15682 --- dll/win32/gdiplus/brush.c | 182 +++++++++++++++++++----------------- dll/win32/gdiplus/font.c | 39 ++++++-- dll/win32/gdiplus/gdiplus_private.h | 2 - dll/win32/gdiplus/graphics.c | 2 +- dll/win32/gdiplus/image.c | 41 ++++++++ dll/win32/gdiplus/pen.c | 21 +---- media/doc/README.WINE | 2 +- 7 files changed, 173 insertions(+), 116 deletions(-) diff --git a/dll/win32/gdiplus/brush.c b/dll/win32/gdiplus/brush.c index f726023982..8d4043933f 100644 --- a/dll/win32/gdiplus/brush.c +++ b/dll/win32/gdiplus/brush.c @@ -294,12 +294,49 @@ GpStatus WINGDIPAPI GdipCreateHatchBrush(GpHatchStyle hatchstyle, ARGB forecol, return Ok; } -static void linegradient_init_transform(GpLineGradient *line) +static GpStatus create_line_brush(const GpRectF *rect, ARGB startcolor, ARGB endcolor, + GpWrapMode wrap, GpLineGradient **line) +{ + *line = heap_alloc_zero(sizeof(GpLineGradient)); + if(!*line) return OutOfMemory; + + (*line)->brush.bt = BrushTypeLinearGradient; + (*line)->startcolor = startcolor; + (*line)->endcolor = endcolor; + (*line)->wrap = wrap; + (*line)->gamma = FALSE; + (*line)->rect = *rect; + (*line)->blendcount = 1; + (*line)->blendfac = heap_alloc_zero(sizeof(REAL)); + (*line)->blendpos = heap_alloc_zero(sizeof(REAL)); + + if (!(*line)->blendfac || !(*line)->blendpos) + { + heap_free((*line)->blendfac); + heap_free((*line)->blendpos); + heap_free(*line); + *line = NULL; + return OutOfMemory; + } + + (*line)->blendfac[0] = 1.0f; + (*line)->blendpos[0] = 1.0f; + + (*line)->pblendcolor = NULL; + (*line)->pblendpos = NULL; + (*line)->pblendcount = 0; + + GdipSetMatrixElements(&(*line)->transform, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f); + + return Ok; +} + +static void linegradient_init_transform(const GpPointF *startpoint, const GpPointF *endpoint, GpLineGradient *line) { float trans_x = line->rect.X + (line->rect.Width / 2.f); float trans_y = line->rect.Y + (line->rect.Height / 2.f); - float dx = line->endpoint.X - line->startpoint.X; - float dy = line->endpoint.Y - line->startpoint.Y; + float dx = endpoint->X - startpoint->X; + float dy = endpoint->Y - startpoint->Y; float t_cos, t_sin, w_ratio, h_ratio; float h; GpMatrix rot; @@ -336,6 +373,9 @@ GpStatus WINGDIPAPI GdipCreateLineBrush(GDIPCONST GpPointF* startpoint, GDIPCONST GpPointF* endpoint, ARGB startcolor, ARGB endcolor, GpWrapMode wrap, GpLineGradient **line) { + GpStatus stat; + GpRectF rect; + TRACE("(%s, %s, %x, %x, %d, %p)\n", debugstr_pointf(startpoint), debugstr_pointf(endpoint), startcolor, endcolor, wrap, line); @@ -345,57 +385,27 @@ GpStatus WINGDIPAPI GdipCreateLineBrush(GDIPCONST GpPointF* startpoint, if (startpoint->X == endpoint->X && startpoint->Y == endpoint->Y) return OutOfMemory; - *line = heap_alloc_zero(sizeof(GpLineGradient)); - if(!*line) return OutOfMemory; + rect.X = startpoint->X < endpoint->X ? startpoint->X : endpoint->X; + rect.Y = startpoint->Y < endpoint->Y ? startpoint->Y : endpoint->Y; + rect.Width = fabs(startpoint->X - endpoint->X); + rect.Height = fabs(startpoint->Y - endpoint->Y); - (*line)->brush.bt = BrushTypeLinearGradient; - - (*line)->startpoint.X = startpoint->X; - (*line)->startpoint.Y = startpoint->Y; - (*line)->endpoint.X = endpoint->X; - (*line)->endpoint.Y = endpoint->Y; - (*line)->startcolor = startcolor; - (*line)->endcolor = endcolor; - (*line)->wrap = wrap; - (*line)->gamma = FALSE; - - (*line)->rect.X = (startpoint->X < endpoint->X ? startpoint->X: endpoint->X); - (*line)->rect.Y = (startpoint->Y < endpoint->Y ? startpoint->Y: endpoint->Y); - (*line)->rect.Width = fabs(startpoint->X - endpoint->X); - (*line)->rect.Height = fabs(startpoint->Y - endpoint->Y); - - if ((*line)->rect.Width == 0) - { - (*line)->rect.X -= (*line)->rect.Height / 2.0f; - (*line)->rect.Width = (*line)->rect.Height; - } - else if ((*line)->rect.Height == 0) + if (rect.Width == 0.0f) { - (*line)->rect.Y -= (*line)->rect.Width / 2.0f; - (*line)->rect.Height = (*line)->rect.Width; + rect.X -= rect.Height / 2.0f; + rect.Width = rect.Height; } - - (*line)->blendcount = 1; - (*line)->blendfac = heap_alloc_zero(sizeof(REAL)); - (*line)->blendpos = heap_alloc_zero(sizeof(REAL)); - - if (!(*line)->blendfac || !(*line)->blendpos) + else if (rect.Height == 0.0f) { - heap_free((*line)->blendfac); - heap_free((*line)->blendpos); - heap_free(*line); - *line = NULL; - return OutOfMemory; + rect.Y -= rect.Width / 2.0f; + rect.Height = rect.Width; } - (*line)->blendfac[0] = 1.0f; - (*line)->blendpos[0] = 1.0f; - - (*line)->pblendcolor = NULL; - (*line)->pblendpos = NULL; - (*line)->pblendcount = 0; + stat = create_line_brush(&rect, startcolor, endcolor, wrap, line); + if (stat != Ok) + return stat; - linegradient_init_transform(*line); + linegradient_init_transform(startpoint, endpoint, *line); TRACE("<-- %p\n", *line); @@ -427,9 +437,7 @@ GpStatus WINGDIPAPI GdipCreateLineBrushFromRect(GDIPCONST GpRectF* rect, ARGB startcolor, ARGB endcolor, LinearGradientMode mode, GpWrapMode wrap, GpLineGradient **line) { - GpPointF start, end; - float far_x, angle; - GpStatus stat; + float angle; TRACE("(%p, %x, %x, %d, %d, %p)\n", rect, startcolor, endcolor, mode, wrap, line); @@ -439,6 +447,9 @@ GpStatus WINGDIPAPI GdipCreateLineBrushFromRect(GDIPCONST GpRectF* rect, switch (mode) { + case LinearGradientModeHorizontal: + angle = 0.0f; + break; case LinearGradientModeVertical: angle = 90.0f; break; @@ -448,17 +459,6 @@ GpStatus WINGDIPAPI GdipCreateLineBrushFromRect(GDIPCONST GpRectF* rect, case LinearGradientModeBackwardDiagonal: angle = 135.0f; break; - case LinearGradientModeHorizontal: - far_x = rect->X + rect->Width; - - start.X = min(rect->X, far_x); - start.Y = rect->Y; - end.X = max(rect->X, far_x); - end.Y = rect->Y; - stat = GdipCreateLineBrush(&start, &end, startcolor, endcolor, wrap, line); - if (stat == Ok) - (*line)->rect = *rect; - return stat; default: return InvalidParameter; } @@ -535,7 +535,14 @@ GpStatus WINGDIPAPI GdipCreateLineBrushFromRectWithAngle(GDIPCONST GpRectF* rect far_x = rect->X + rect->Width; far_y = rect->Y + rect->Height; - if (sin_cos_angle >= 0) + if (angle == 0.0f) + { + start.X = min(rect->X, far_x); + start.Y = rect->Y; + end.X = max(rect->X, far_x); + end.Y = rect->Y; + } + else if (sin_cos_angle >= 0) { start.X = min(rect->X, far_x); start.Y = min(rect->Y, far_y); @@ -550,37 +557,36 @@ GpStatus WINGDIPAPI GdipCreateLineBrushFromRectWithAngle(GDIPCONST GpRectF* rect end.Y = max(rect->Y, far_y); } - stat = GdipCreateLineBrush(&start, &end, startcolor, endcolor, wrap, line); + stat = create_line_brush(rect, startcolor, endcolor, wrap, line); + if (stat != Ok || angle == 0.0f) + return stat; - if (stat == Ok) + if (sin_cos_angle >= 0) { - if (sin_cos_angle >= 0) - { - exofs = rect->Height * sin_cos_angle + rect->Width * cos_angle * cos_angle; - eyofs = rect->Height * sin_angle * sin_angle + rect->Width * sin_cos_angle; - } - else - { - exofs = rect->Width * sin_angle * sin_angle + rect->Height * sin_cos_angle; - eyofs = -rect->Width * sin_cos_angle + rect->Height * sin_angle * sin_angle; - } - - if (sin_angle >= 0) - { - (*line)->endpoint.X = rect->X + exofs; - (*line)->endpoint.Y = rect->Y + eyofs; - } - else - { - (*line)->endpoint.X = (*line)->startpoint.X; - (*line)->endpoint.Y = (*line)->startpoint.Y; - (*line)->startpoint.X = rect->X + exofs; - (*line)->startpoint.Y = rect->Y + eyofs; - } + exofs = rect->Height * sin_cos_angle + rect->Width * cos_angle * cos_angle; + eyofs = rect->Height * sin_angle * sin_angle + rect->Width * sin_cos_angle; + } + else + { + exofs = rect->Width * sin_angle * sin_angle + rect->Height * sin_cos_angle; + eyofs = -rect->Width * sin_cos_angle + rect->Height * sin_angle * sin_angle; + } - linegradient_init_transform(*line); + if (sin_angle >= 0) + { + end.X = rect->X + exofs; + end.Y = rect->Y + eyofs; + } + else + { + end.X = start.X; + end.Y = start.Y; + start.X = rect->X + exofs; + start.Y = rect->Y + eyofs; } + linegradient_init_transform(&start, &end, *line); + return stat; } diff --git a/dll/win32/gdiplus/font.c b/dll/win32/gdiplus/font.c index 64778bb226..5e6aa5430f 100644 --- a/dll/win32/gdiplus/font.c +++ b/dll/win32/gdiplus/font.c @@ -1125,6 +1125,7 @@ GpStatus WINGDIPAPI GdipDeletePrivateFontCollection(GpFontCollection **fontColle return InvalidParameter; for (i = 0; i < (*fontCollection)->count; i++) heap_free((*fontCollection)->FontFamilies[i]); + heap_free((*fontCollection)->FontFamilies); heap_free(*fontCollection); return Ok; @@ -1493,6 +1494,13 @@ static WCHAR *load_ttf_name_id( const BYTE *mem, DWORD_PTR size, DWORD id ) return NULL; } +struct add_font_param +{ + GpFontCollection *collection; + BOOL is_system; + GpStatus stat; +}; + static INT CALLBACK add_font_proc(const LOGFONTW *lfw, const TEXTMETRICW *ntm, DWORD type, LPARAM lParam); /***************************************************************************** @@ -1520,6 +1528,7 @@ GpStatus WINGDIPAPI GdipPrivateAddMemoryFont(GpFontCollection* fontCollection, ret = InvalidParameter; else { + struct add_font_param param; HDC hdc; LOGFONTW lfw; @@ -1533,8 +1542,10 @@ GpStatus WINGDIPAPI GdipPrivateAddMemoryFont(GpFontCollection* fontCollection, lstrcpyW(lfw.lfFaceName, name); lfw.lfPitchAndFamily = 0; - if (!EnumFontFamiliesExW(hdc, &lfw, add_font_proc, (LPARAM)fontCollection, 0)) - ret = OutOfMemory; + param.collection = fontCollection; + param.is_system = FALSE; + if (!EnumFontFamiliesExW(hdc, &lfw, add_font_proc, (LPARAM)¶m, 0)) + ret = param.stat; DeleteDC(hdc); } @@ -1606,10 +1617,14 @@ void free_installed_fonts(void) static INT CALLBACK add_font_proc(const LOGFONTW *lfw, const TEXTMETRICW *ntm, DWORD type, LPARAM lParam) { - GpFontCollection* fonts = (GpFontCollection*)lParam; + struct add_font_param *param = (struct add_font_param *)lParam; + GpFontCollection *fonts = param->collection; GpFontFamily* family; + GpStatus stat; int i; + param->stat = Ok; + if (type == RASTER_FONTTYPE) return 1; @@ -1626,7 +1641,10 @@ static INT CALLBACK add_font_proc(const LOGFONTW *lfw, const TEXTMETRICW *ntm, GpFontFamily** new_family_list = heap_alloc(new_alloc_count*sizeof(void*)); if (!new_family_list) + { + param->stat = OutOfMemory; return 0; + } memcpy(new_family_list, fonts->FontFamilies, fonts->count*sizeof(void*)); heap_free(fonts->FontFamilies); @@ -1634,8 +1652,14 @@ static INT CALLBACK add_font_proc(const LOGFONTW *lfw, const TEXTMETRICW *ntm, fonts->allocated = new_alloc_count; } - if (GdipCreateFontFamilyFromName(lfw->lfFaceName, NULL, &family) != Ok) + if ((stat = GdipCreateFontFamilyFromName(lfw->lfFaceName, NULL, &family)) != Ok) + { + WARN("Failed to create font family for %s, status %d.\n", debugstr_w(lfw->lfFaceName), stat); + if (param->is_system) + return 1; + param->stat = stat; return 0; + } /* skip duplicates */ for (i=0; i<fonts->count; i++) @@ -1662,6 +1686,7 @@ GpStatus WINGDIPAPI GdipNewInstalledFontCollection( if (installedFontCollection.count == 0) { + struct add_font_param param; HDC hdc; LOGFONTW lfw; @@ -1671,11 +1696,13 @@ GpStatus WINGDIPAPI GdipNewInstalledFontCollection( lfw.lfFaceName[0] = 0; lfw.lfPitchAndFamily = 0; - if (!EnumFontFamiliesExW(hdc, &lfw, add_font_proc, (LPARAM)&installedFontCollection, 0)) + param.collection = &installedFontCollection; + param.is_system = TRUE; + if (!EnumFontFamiliesExW(hdc, &lfw, add_font_proc, (LPARAM)¶m, 0)) { free_installed_fonts(); DeleteDC(hdc); - return OutOfMemory; + return param.stat; } DeleteDC(hdc); diff --git a/dll/win32/gdiplus/gdiplus_private.h b/dll/win32/gdiplus/gdiplus_private.h index b2e4f1e93f..8c4fcceded 100644 --- a/dll/win32/gdiplus/gdiplus_private.h +++ b/dll/win32/gdiplus/gdiplus_private.h @@ -291,8 +291,6 @@ struct GpPathGradient{ struct GpLineGradient{ GpBrush brush; - GpPointF startpoint; - GpPointF endpoint; ARGB startcolor; ARGB endcolor; RectF rect; diff --git a/dll/win32/gdiplus/graphics.c b/dll/win32/gdiplus/graphics.c index 5666346afc..199b20442b 100644 --- a/dll/win32/gdiplus/graphics.c +++ b/dll/win32/gdiplus/graphics.c @@ -5434,7 +5434,7 @@ GpStatus WINGDIPAPI GdipMeasureCharacterRanges(GpGraphics* graphics, RectF scaled_rect; REAL margin_x; - TRACE("(%p %s %d %p %s %p %d %p)\n", graphics, debugstr_w(string), + TRACE("(%p %s %d %p %s %p %d %p)\n", graphics, debugstr_wn(string, length), length, font, debugstr_rectf(layoutRect), stringFormat, regionCount, regions); if (!(graphics && string && font && layoutRect && stringFormat && regions)) diff --git a/dll/win32/gdiplus/image.c b/dll/win32/gdiplus/image.c index afa2afeac7..8425bcb54b 100644 --- a/dll/win32/gdiplus/image.c +++ b/dll/win32/gdiplus/image.c @@ -3955,6 +3955,39 @@ static GpStatus decode_image_jpeg(IStream* stream, GpImage **image) return decode_image_wic(stream, &GUID_ContainerFormatJpeg, NULL, image); } +static BOOL has_png_transparency_chunk(IStream *pIStream) +{ + LARGE_INTEGER seek; + BOOL has_tRNS = FALSE; + HRESULT hr; + BYTE header[8]; + + seek.QuadPart = 8; + do + { + ULARGE_INTEGER chunk_start; + ULONG bytesread, chunk_size; + + hr = IStream_Seek(pIStream, seek, STREAM_SEEK_SET, &chunk_start); + if (FAILED(hr)) break; + + hr = IStream_Read(pIStream, header, 8, &bytesread); + if (FAILED(hr) || bytesread < 8) break; + + chunk_size = (header[0] << 24) | (header[1] << 16) | (header[2] << 8) | header[3]; + if (!memcmp(&header[4], "tRNS", 4)) + { + has_tRNS = TRUE; + break; + } + + seek.QuadPart = chunk_start.QuadPart + chunk_size + 12; /* skip data and CRC */ + } while (memcmp(&header[4], "IDAT", 4) && memcmp(&header[4], "IEND", 4)); + + TRACE("has_tRNS = %d\n", has_tRNS); + return has_tRNS; +} + static GpStatus decode_image_png(IStream* stream, GpImage **image) { IWICBitmapDecoder *decoder; @@ -3976,6 +4009,14 @@ static GpStatus decode_image_png(IStream* stream, GpImage **image) { if (IsEqualGUID(&format, &GUID_WICPixelFormat8bppGray)) force_conversion = TRUE; + else if ((IsEqualGUID(&format, &GUID_WICPixelFormat8bppIndexed) || + IsEqualGUID(&format, &GUID_WICPixelFormat4bppIndexed) || + IsEqualGUID(&format, &GUID_WICPixelFormat2bppIndexed) || + IsEqualGUID(&format, &GUID_WICPixelFormat1bppIndexed) || + IsEqualGUID(&format, &GUID_WICPixelFormat24bppBGR)) && + has_png_transparency_chunk(stream)) + force_conversion = TRUE; + status = decode_frame_wic(decoder, force_conversion, 0, png_metadata_reader, image); } else diff --git a/dll/win32/gdiplus/pen.c b/dll/win32/gdiplus/pen.c index b86808b87e..8bcb91819a 100644 --- a/dll/win32/gdiplus/pen.c +++ b/dll/win32/gdiplus/pen.c @@ -470,48 +470,33 @@ GpStatus WINGDIPAPI GdipTranslatePenTransform(GpPen *pen, REAL dx, REAL dy, GpMa GpStatus WINGDIPAPI GdipScalePenTransform(GpPen *pen, REAL sx, REAL sy, GpMatrixOrder order) { - static int calls; - TRACE("(%p,%0.2f,%0.2f,%u)\n", pen, sx, sy, order); if(!pen) return InvalidParameter; - if(!(calls++)) - FIXME("(%p, %.2f, %.2f, %d) stub\n", pen, sx, sy, order); - - return NotImplemented; + return GdipScaleMatrix(&pen->transform, sx, sy, order); } GpStatus WINGDIPAPI GdipRotatePenTransform(GpPen *pen, REAL angle, GpMatrixOrder order) { - static int calls; - TRACE("(%p,%0.2f,%u)\n", pen, angle, order); if(!pen) return InvalidParameter; - if(!(calls++)) - FIXME("not implemented\n"); - - return NotImplemented; + return GdipRotateMatrix(&pen->transform, angle, order); } GpStatus WINGDIPAPI GdipMultiplyPenTransform(GpPen *pen, GDIPCONST GpMatrix *matrix, GpMatrixOrder order) { - static int calls; - TRACE("(%p,%p,%u)\n", pen, matrix, order); if(!pen) return InvalidParameter; - if(!(calls++)) - FIXME("not implemented\n"); - - return NotImplemented; + return GdipMultiplyMatrix(&pen->transform, matrix, order); } GpStatus WINGDIPAPI GdipSetPenBrushFill(GpPen *pen, GpBrush *brush) diff --git a/media/doc/README.WINE b/media/doc/README.WINE index d2f702ab60..b7be7ac790 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -68,7 +68,7 @@ reactos/dll/win32/dciman32 # Synced to WineStaging-3.3 reactos/dll/win32/faultrep # Synced to WineStaging-2.9 reactos/dll/win32/fontsub # Synced to WineStaging-2.9 reactos/dll/win32/fusion # Synced to WineStaging-3.17 -reactos/dll/win32/gdiplus # Synced to WineStaging-3.17 +reactos/dll/win32/gdiplus # Synced to WineStaging-4.0 reactos/dll/win32/hhctrl.ocx # Synced to WineStaging-3.17 reactos/dll/win32/hlink # Synced to WineStaging-3.3 reactos/dll/win32/hnetcfg # Synced to WineStaging-3.9
6 years
1
0
0
0
[reactos] 01/01: [DNSAPI_WINETEST] Sync with Wine Staging 4.0. CORE-15682
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4d5fa2bac787b04609416…
commit 4d5fa2bac787b046094168887f4a01b7acd27571 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Fri Jan 25 13:21:12 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Fri Jan 25 13:21:12 2019 +0100 [DNSAPI_WINETEST] Sync with Wine Staging 4.0. CORE-15682 --- modules/rostests/winetests/dnsapi/name.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/rostests/winetests/dnsapi/name.c b/modules/rostests/winetests/dnsapi/name.c index 3e543554e7..f4d5b9e691 100644 --- a/modules/rostests/winetests/dnsapi/name.c +++ b/modules/rostests/winetests/dnsapi/name.c @@ -146,7 +146,7 @@ static void test_DnsValidateName_A( void ) status = DnsValidateName_A( NULL, DnsNameDomain ); ok( status == ERROR_INVALID_NAME, "succeeded unexpectedly\n" ); - for (i = 0; i < sizeof(test_data) / sizeof(test_data[0]); i++) + for (i = 0; i < ARRAY_SIZE(test_data); i++) { status = DnsValidateName_A( test_data[i].name, test_data[i].format ); ok( status == test_data[i].status || broken(status == test_data[i].status_broken),
6 years
1
0
0
0
[reactos] 01/01: [CRYPTUI] Sync with Wine Staging 4.0. CORE-15682
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=20c427d29e0da68bd2eb5…
commit 20c427d29e0da68bd2eb51fe70db8de17a2fa337 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Fri Jan 25 13:20:18 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Fri Jan 25 13:20:18 2019 +0100 [CRYPTUI] Sync with Wine Staging 4.0. CORE-15682 --- dll/win32/cryptui/cryptuires.h | 12 + dll/win32/cryptui/lang/cryptui_De.rc | 17 + dll/win32/cryptui/lang/cryptui_En.rc | 17 + dll/win32/cryptui/lang/cryptui_Fr.rc | 17 + dll/win32/cryptui/lang/cryptui_He.rc | 17 + dll/win32/cryptui/lang/cryptui_It.rc | 17 + dll/win32/cryptui/lang/cryptui_Ko.rc | 17 + dll/win32/cryptui/lang/cryptui_Lt.rc | 17 + dll/win32/cryptui/lang/cryptui_Nl.rc | 17 + dll/win32/cryptui/lang/cryptui_No.rc | 17 + dll/win32/cryptui/lang/cryptui_Pl.rc | 17 + dll/win32/cryptui/lang/cryptui_Pt.rc | 17 + dll/win32/cryptui/lang/cryptui_Ro.rc | 17 + dll/win32/cryptui/lang/cryptui_Ru.rc | 17 + dll/win32/cryptui/lang/cryptui_Sq.rc | 17 + dll/win32/cryptui/lang/cryptui_Tr.rc | 17 + dll/win32/cryptui/lang/cryptui_Uk.rc | 17 + dll/win32/cryptui/lang/cryptui_Zh.rc | 17 +- dll/win32/cryptui/main.c | 599 +++++++++++++++++++++++++++++++++-- media/doc/README.WINE | 2 +- 20 files changed, 876 insertions(+), 26 deletions(-) diff --git a/dll/win32/cryptui/cryptuires.h b/dll/win32/cryptui/cryptuires.h index df321df463..e4f74242b3 100644 --- a/dll/win32/cryptui/cryptuires.h +++ b/dll/win32/cryptui/cryptuires.h @@ -173,6 +173,13 @@ #define IDS_EXPORT_PRIVATE_KEY_UNAVAILABLE 1225 #define IDS_EXPORT_PRIVATE_KEY_NON_EXPORTABLE 1226 +#define IDS_INTENDED_USE_COLUMN 1300 +#define IDS_LOCATION_COLUMN 1301 +#define IDS_SELECT_CERT_TITLE 1302 +#define IDS_SELECT_CERT 1303 + +#define IDS_NO_IMPL 1400 + #define IDD_GENERAL 100 #define IDD_DETAIL 101 #define IDD_HIERARCHY 102 @@ -192,6 +199,7 @@ #define IDD_EXPORT_FORMAT 116 #define IDD_EXPORT_FILE 117 #define IDD_EXPORT_FINISH 118 +#define IDD_SELECT_CERT 119 #define IDB_SMALL_ICONS 200 #define IDB_CERT 201 @@ -273,4 +281,8 @@ #define IDC_EXPORT_PASSWORD 2915 #define IDC_EXPORT_PASSWORD_CONFIRM 2916 +#define IDC_SELECT_DISPLAY_STRING 3000 +#define IDC_SELECT_CERTS 3001 +#define IDC_SELECT_VIEW_CERT 3002 + #endif /* ndef __CRYPTUIRES_H_ */ diff --git a/dll/win32/cryptui/lang/cryptui_De.rc b/dll/win32/cryptui/lang/cryptui_De.rc index 5686cf2716..f6d2178b94 100644 --- a/dll/win32/cryptui/lang/cryptui_De.rc +++ b/dll/win32/cryptui/lang/cryptui_De.rc @@ -171,6 +171,11 @@ STRINGTABLE IDS_EXPORT_PASSWORD_MISMATCH "Die Passwörter sind unterschiedlich." IDS_EXPORT_PRIVATE_KEY_UNAVAILABLE "Hinweis: Der private Schlüssel des Zertifikats konnte nicht geöffnet werden." IDS_EXPORT_PRIVATE_KEY_NON_EXPORTABLE "Hinweis: Der private Schlüssel des Zertifikats kann nicht exportiert werden." + IDS_INTENDED_USE_COLUMN "Intended Use" + IDS_LOCATION_COLUMN "Location" + IDS_SELECT_CERT_TITLE "Select Certificate" + IDS_SELECT_CERT "Select a certificate" + IDS_NO_IMPL "Not yet implemented" } IDD_GENERAL DIALOGEX 0, 0, 255, 236 @@ -455,3 +460,15 @@ BEGIN LVS_REPORT|LVS_NOCOLUMNHEADER|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 115,67,174,100 END + +IDD_SELECT_CERT DIALOG 0,0,278,157 +CAPTION "Select Certificate" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Select a certificate you want to use", IDC_SELECT_DISPLAY_STRING, 7,7,264,26 + CONTROL "", IDC_SELECT_CERTS, "SysListView32", + LVS_REPORT|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 7,40,264,89 + PUSHBUTTON "OK", IDOK, 91,136,51,14, BS_DEFPUSHBUTTON + PUSHBUTTON "Cancel", IDCANCEL, 149,136,51,14 + PUSHBUTTON "&View Certificate", IDC_SELECT_VIEW_CERT, 207,136,65,14, WS_DISABLED +END diff --git a/dll/win32/cryptui/lang/cryptui_En.rc b/dll/win32/cryptui/lang/cryptui_En.rc index a5561751fa..a3da8ed9a1 100644 --- a/dll/win32/cryptui/lang/cryptui_En.rc +++ b/dll/win32/cryptui/lang/cryptui_En.rc @@ -171,6 +171,11 @@ STRINGTABLE IDS_EXPORT_PASSWORD_MISMATCH "The passwords do not match." IDS_EXPORT_PRIVATE_KEY_UNAVAILABLE "Note: The private key for this certificate could not be opened." IDS_EXPORT_PRIVATE_KEY_NON_EXPORTABLE "Note: The private key for this certificate is not exportable." + IDS_INTENDED_USE_COLUMN "Intended Use" + IDS_LOCATION_COLUMN "Location" + IDS_SELECT_CERT_TITLE "Select Certificate" + IDS_SELECT_CERT "Select a certificate" + IDS_NO_IMPL "Not yet implemented" } IDD_GENERAL DIALOGEX 0, 0, 255, 236 @@ -457,3 +462,15 @@ BEGIN LVS_REPORT|LVS_NOCOLUMNHEADER|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 115,67,174,100 END + +IDD_SELECT_CERT DIALOG 0,0,278,157 +CAPTION "Select Certificate" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Select a certificate you want to use", IDC_SELECT_DISPLAY_STRING, 7,7,264,26 + CONTROL "", IDC_SELECT_CERTS, "SysListView32", + LVS_REPORT|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 7,40,264,89 + PUSHBUTTON "OK", IDOK, 91,136,51,14, BS_DEFPUSHBUTTON + PUSHBUTTON "Cancel", IDCANCEL, 149,136,51,14 + PUSHBUTTON "&View Certificate", IDC_SELECT_VIEW_CERT, 207,136,65,14, WS_DISABLED +END diff --git a/dll/win32/cryptui/lang/cryptui_Fr.rc b/dll/win32/cryptui/lang/cryptui_Fr.rc index 73c246b9af..489c6870af 100644 --- a/dll/win32/cryptui/lang/cryptui_Fr.rc +++ b/dll/win32/cryptui/lang/cryptui_Fr.rc @@ -171,6 +171,11 @@ STRINGTABLE IDS_EXPORT_PASSWORD_MISMATCH "Les mots de passe ne correspondent pas." IDS_EXPORT_PRIVATE_KEY_UNAVAILABLE "Note : la clé privée de ce certificat n'a pu être ouverte." IDS_EXPORT_PRIVATE_KEY_NON_EXPORTABLE "Note : la clé privée de ce certificat n'est pas exportable." + IDS_INTENDED_USE_COLUMN "Intended Use" + IDS_LOCATION_COLUMN "Location" + IDS_SELECT_CERT_TITLE "Select Certificate" + IDS_SELECT_CERT "Select a certificate" + IDS_NO_IMPL "Not yet implemented" } IDD_GENERAL DIALOGEX 0, 0, 255, 236 @@ -457,3 +462,15 @@ BEGIN LVS_REPORT|LVS_NOCOLUMNHEADER|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 115,67,174,100 END + +IDD_SELECT_CERT DIALOG 0,0,278,157 +CAPTION "Select Certificate" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Select a certificate you want to use", IDC_SELECT_DISPLAY_STRING, 7,7,264,26 + CONTROL "", IDC_SELECT_CERTS, "SysListView32", + LVS_REPORT|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 7,40,264,89 + PUSHBUTTON "OK", IDOK, 91,136,51,14, BS_DEFPUSHBUTTON + PUSHBUTTON "Cancel", IDCANCEL, 149,136,51,14 + PUSHBUTTON "&View Certificate", IDC_SELECT_VIEW_CERT, 207,136,65,14, WS_DISABLED +END diff --git a/dll/win32/cryptui/lang/cryptui_He.rc b/dll/win32/cryptui/lang/cryptui_He.rc index 7ab2d3ff94..eee5d952a6 100644 --- a/dll/win32/cryptui/lang/cryptui_He.rc +++ b/dll/win32/cryptui/lang/cryptui_He.rc @@ -171,6 +171,11 @@ STRINGTABLE IDS_EXPORT_PASSWORD_MISMATCH "The passwords do not match." IDS_EXPORT_PRIVATE_KEY_UNAVAILABLE "Note: The private key for this certificate could not be opened." IDS_EXPORT_PRIVATE_KEY_NON_EXPORTABLE "Note: The private key for this certificate is not exportable." + IDS_INTENDED_USE_COLUMN "Intended Use" + IDS_LOCATION_COLUMN "Location" + IDS_SELECT_CERT_TITLE "Select Certificate" + IDS_SELECT_CERT "Select a certificate" + IDS_NO_IMPL "Not yet implemented" } IDD_GENERAL DIALOGEX 0, 0, 255, 236 @@ -457,3 +462,15 @@ BEGIN LVS_REPORT|LVS_NOCOLUMNHEADER|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 115,67,174,100 END + +IDD_SELECT_CERT DIALOG 0,0,278,157 +CAPTION "Select Certificate" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Select a certificate you want to use", IDC_SELECT_DISPLAY_STRING, 7,7,264,26 + CONTROL "", IDC_SELECT_CERTS, "SysListView32", + LVS_REPORT|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 7,40,264,89 + PUSHBUTTON "OK", IDOK, 91,136,51,14, BS_DEFPUSHBUTTON + PUSHBUTTON "Cancel", IDCANCEL, 149,136,51,14 + PUSHBUTTON "&View Certificate", IDC_SELECT_VIEW_CERT, 207,136,65,14, WS_DISABLED +END diff --git a/dll/win32/cryptui/lang/cryptui_It.rc b/dll/win32/cryptui/lang/cryptui_It.rc index 53e092cdf4..bbbbb6026d 100644 --- a/dll/win32/cryptui/lang/cryptui_It.rc +++ b/dll/win32/cryptui/lang/cryptui_It.rc @@ -171,6 +171,11 @@ STRINGTABLE IDS_EXPORT_PASSWORD_MISMATCH "Le password non corrispondono." IDS_EXPORT_PRIVATE_KEY_UNAVAILABLE "Nota: impossibile aprire la chiave privata per questo certificato." IDS_EXPORT_PRIVATE_KEY_NON_EXPORTABLE "Nota: la chiave privata per questo certificato non è esportabile." + IDS_INTENDED_USE_COLUMN "Intended Use" + IDS_LOCATION_COLUMN "Location" + IDS_SELECT_CERT_TITLE "Select Certificate" + IDS_SELECT_CERT "Select a certificate" + IDS_NO_IMPL "Not yet implemented" } IDD_GENERAL DIALOGEX 0, 0, 255, 236 @@ -457,3 +462,15 @@ BEGIN LVS_REPORT|LVS_NOCOLUMNHEADER|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 115,67,174,100 END + +IDD_SELECT_CERT DIALOG 0,0,278,157 +CAPTION "Select Certificate" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Select a certificate you want to use", IDC_SELECT_DISPLAY_STRING, 7,7,264,26 + CONTROL "", IDC_SELECT_CERTS, "SysListView32", + LVS_REPORT|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 7,40,264,89 + PUSHBUTTON "OK", IDOK, 91,136,51,14, BS_DEFPUSHBUTTON + PUSHBUTTON "Cancel", IDCANCEL, 149,136,51,14 + PUSHBUTTON "&View Certificate", IDC_SELECT_VIEW_CERT, 207,136,65,14, WS_DISABLED +END diff --git a/dll/win32/cryptui/lang/cryptui_Ko.rc b/dll/win32/cryptui/lang/cryptui_Ko.rc index ce386773e4..2064b2308a 100644 --- a/dll/win32/cryptui/lang/cryptui_Ko.rc +++ b/dll/win32/cryptui/lang/cryptui_Ko.rc @@ -171,6 +171,11 @@ STRINGTABLE IDS_EXPORT_PASSWORD_MISMATCH "이 암호는 맞지 않습니다." IDS_EXPORT_PRIVATE_KEY_UNAVAILABLE "주의: 이 인증서를 위한 개인 키를 열 수 없습니다." IDS_EXPORT_PRIVATE_KEY_NON_EXPORTABLE "주의: 이 인증서를 위한 개인 키를 내보낼 수 없습니다." + IDS_INTENDED_USE_COLUMN "Intended Use" + IDS_LOCATION_COLUMN "Location" + IDS_SELECT_CERT_TITLE "Select Certificate" + IDS_SELECT_CERT "Select a certificate" + IDS_NO_IMPL "Not yet implemented" } IDD_GENERAL DIALOGEX 0, 0, 255, 236 @@ -457,3 +462,15 @@ BEGIN LVS_REPORT|LVS_NOCOLUMNHEADER|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 115,67,174,100 END + +IDD_SELECT_CERT DIALOG 0,0,278,157 +CAPTION "Select Certificate" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Select a certificate you want to use", IDC_SELECT_DISPLAY_STRING, 7,7,264,26 + CONTROL "", IDC_SELECT_CERTS, "SysListView32", + LVS_REPORT|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 7,40,264,89 + PUSHBUTTON "OK", IDOK, 91,136,51,14, BS_DEFPUSHBUTTON + PUSHBUTTON "Cancel", IDCANCEL, 149,136,51,14 + PUSHBUTTON "&View Certificate", IDC_SELECT_VIEW_CERT, 207,136,65,14, WS_DISABLED +END diff --git a/dll/win32/cryptui/lang/cryptui_Lt.rc b/dll/win32/cryptui/lang/cryptui_Lt.rc index 8ea7d0055c..ed37db639a 100644 --- a/dll/win32/cryptui/lang/cryptui_Lt.rc +++ b/dll/win32/cryptui/lang/cryptui_Lt.rc @@ -171,6 +171,11 @@ STRINGTABLE IDS_EXPORT_PASSWORD_MISMATCH "Slaptažodžiai nesutampa." IDS_EXPORT_PRIVATE_KEY_UNAVAILABLE "Pastaba: nepavyko atverti privačiojo rakto šiam liudijimui." IDS_EXPORT_PRIVATE_KEY_NON_EXPORTABLE "Pastaba: šio liudijimo privatusis raktas neišeksportuojamas." + IDS_INTENDED_USE_COLUMN "Intended Use" + IDS_LOCATION_COLUMN "Location" + IDS_SELECT_CERT_TITLE "Select Certificate" + IDS_SELECT_CERT "Select a certificate" + IDS_NO_IMPL "Not yet implemented" } IDD_GENERAL DIALOGEX 0, 0, 255, 236 @@ -457,3 +462,15 @@ BEGIN LVS_REPORT|LVS_NOCOLUMNHEADER|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 115,67,174,100 END + +IDD_SELECT_CERT DIALOG 0,0,278,157 +CAPTION "Select Certificate" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Select a certificate you want to use", IDC_SELECT_DISPLAY_STRING, 7,7,264,26 + CONTROL "", IDC_SELECT_CERTS, "SysListView32", + LVS_REPORT|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 7,40,264,89 + PUSHBUTTON "OK", IDOK, 91,136,51,14, BS_DEFPUSHBUTTON + PUSHBUTTON "Cancel", IDCANCEL, 149,136,51,14 + PUSHBUTTON "&View Certificate", IDC_SELECT_VIEW_CERT, 207,136,65,14, WS_DISABLED +END diff --git a/dll/win32/cryptui/lang/cryptui_Nl.rc b/dll/win32/cryptui/lang/cryptui_Nl.rc index dbb228bf74..2068e6e3aa 100644 --- a/dll/win32/cryptui/lang/cryptui_Nl.rc +++ b/dll/win32/cryptui/lang/cryptui_Nl.rc @@ -171,6 +171,11 @@ STRINGTABLE IDS_EXPORT_PASSWORD_MISMATCH "De wachtwoorden zijn niet gelijk." IDS_EXPORT_PRIVATE_KEY_UNAVAILABLE "Noot: De persoonlijke sleutel voor dit certificaat kon niet geopend worden." IDS_EXPORT_PRIVATE_KEY_NON_EXPORTABLE "Noot: De persoonlijke sleutel voor dit certificaat kan niet geëxporteerd worden." + IDS_INTENDED_USE_COLUMN "Intended Use" + IDS_LOCATION_COLUMN "Location" + IDS_SELECT_CERT_TITLE "Select Certificate" + IDS_SELECT_CERT "Select a certificate" + IDS_NO_IMPL "Not yet implemented" } IDD_GENERAL DIALOGEX 0, 0, 255, 236 @@ -455,3 +460,15 @@ BEGIN LVS_REPORT|LVS_NOCOLUMNHEADER|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 115,67,174,100 END + +IDD_SELECT_CERT DIALOG 0,0,278,157 +CAPTION "Select Certificate" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Select a certificate you want to use", IDC_SELECT_DISPLAY_STRING, 7,7,264,26 + CONTROL "", IDC_SELECT_CERTS, "SysListView32", + LVS_REPORT|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 7,40,264,89 + PUSHBUTTON "OK", IDOK, 91,136,51,14, BS_DEFPUSHBUTTON + PUSHBUTTON "Cancel", IDCANCEL, 149,136,51,14 + PUSHBUTTON "&View Certificate", IDC_SELECT_VIEW_CERT, 207,136,65,14, WS_DISABLED +END diff --git a/dll/win32/cryptui/lang/cryptui_No.rc b/dll/win32/cryptui/lang/cryptui_No.rc index 8f20a86862..640f3cde8a 100644 --- a/dll/win32/cryptui/lang/cryptui_No.rc +++ b/dll/win32/cryptui/lang/cryptui_No.rc @@ -171,6 +171,11 @@ STRINGTABLE IDS_EXPORT_PASSWORD_MISMATCH "Passordene er ikke like." IDS_EXPORT_PRIVATE_KEY_UNAVAILABLE "Merk: Klarte ikke åpne den private nøkkelen for dette sertifikatet." IDS_EXPORT_PRIVATE_KEY_NON_EXPORTABLE "Merk: Den private nøkkelen for dette sertifikatet kan ikke eksporteres." + IDS_INTENDED_USE_COLUMN "Intended Use" + IDS_LOCATION_COLUMN "Location" + IDS_SELECT_CERT_TITLE "Select Certificate" + IDS_SELECT_CERT "Select a certificate" + IDS_NO_IMPL "Not yet implemented" } IDD_GENERAL DIALOGEX 0, 0, 255, 236 @@ -453,3 +458,15 @@ BEGIN LVS_REPORT|LVS_NOCOLUMNHEADER|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 115,67,174,100 END + +IDD_SELECT_CERT DIALOG 0,0,278,157 +CAPTION "Select Certificate" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Select a certificate you want to use", IDC_SELECT_DISPLAY_STRING, 7,7,264,26 + CONTROL "", IDC_SELECT_CERTS, "SysListView32", + LVS_REPORT|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 7,40,264,89 + PUSHBUTTON "OK", IDOK, 91,136,51,14, BS_DEFPUSHBUTTON + PUSHBUTTON "Cancel", IDCANCEL, 149,136,51,14 + PUSHBUTTON "&View Certificate", IDC_SELECT_VIEW_CERT, 207,136,65,14, WS_DISABLED +END diff --git a/dll/win32/cryptui/lang/cryptui_Pl.rc b/dll/win32/cryptui/lang/cryptui_Pl.rc index 5fd726ad12..58c2bdb179 100644 --- a/dll/win32/cryptui/lang/cryptui_Pl.rc +++ b/dll/win32/cryptui/lang/cryptui_Pl.rc @@ -171,6 +171,11 @@ STRINGTABLE IDS_EXPORT_PASSWORD_MISMATCH "Niezgodność haseł." IDS_EXPORT_PRIVATE_KEY_UNAVAILABLE "Uwaga: Nie można otworzyć klucza prywatnego dla tego certyfikatu." IDS_EXPORT_PRIVATE_KEY_NON_EXPORTABLE "Uwaga: Klucz prywatny dla tego certyfikatu jest oznaczony jako nie do eksportu." + IDS_INTENDED_USE_COLUMN "Intended Use" + IDS_LOCATION_COLUMN "Location" + IDS_SELECT_CERT_TITLE "Select Certificate" + IDS_SELECT_CERT "Select a certificate" + IDS_NO_IMPL "Not yet implemented" } IDD_GENERAL DIALOGEX 0, 0, 255, 236 @@ -457,3 +462,15 @@ BEGIN LVS_REPORT|LVS_NOCOLUMNHEADER|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 115,67,174,100 END + +IDD_SELECT_CERT DIALOG 0,0,278,157 +CAPTION "Select Certificate" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Select a certificate you want to use", IDC_SELECT_DISPLAY_STRING, 7,7,264,26 + CONTROL "", IDC_SELECT_CERTS, "SysListView32", + LVS_REPORT|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 7,40,264,89 + PUSHBUTTON "OK", IDOK, 91,136,51,14, BS_DEFPUSHBUTTON + PUSHBUTTON "Cancel", IDCANCEL, 149,136,51,14 + PUSHBUTTON "&View Certificate", IDC_SELECT_VIEW_CERT, 207,136,65,14, WS_DISABLED +END diff --git a/dll/win32/cryptui/lang/cryptui_Pt.rc b/dll/win32/cryptui/lang/cryptui_Pt.rc index bfd43ab37c..a135c60aff 100644 --- a/dll/win32/cryptui/lang/cryptui_Pt.rc +++ b/dll/win32/cryptui/lang/cryptui_Pt.rc @@ -171,6 +171,11 @@ STRINGTABLE IDS_EXPORT_PASSWORD_MISMATCH "As palavras chave não coincidem." IDS_EXPORT_PRIVATE_KEY_UNAVAILABLE "Nota: A chave privada para este certificado não conseguiu ser aberta." IDS_EXPORT_PRIVATE_KEY_NON_EXPORTABLE "Nota: A chave privada para este certificado não é exportável." + IDS_INTENDED_USE_COLUMN "Intended Use" + IDS_LOCATION_COLUMN "Location" + IDS_SELECT_CERT_TITLE "Select Certificate" + IDS_SELECT_CERT "Select a certificate" + IDS_NO_IMPL "Not yet implemented" } IDD_GENERAL DIALOGEX 0, 0, 255, 236 @@ -453,3 +458,15 @@ BEGIN LVS_REPORT|LVS_NOCOLUMNHEADER|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 115,67,174,100 END + +IDD_SELECT_CERT DIALOG 0,0,278,157 +CAPTION "Select Certificate" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Select a certificate you want to use", IDC_SELECT_DISPLAY_STRING, 7,7,264,26 + CONTROL "", IDC_SELECT_CERTS, "SysListView32", + LVS_REPORT|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 7,40,264,89 + PUSHBUTTON "OK", IDOK, 91,136,51,14, BS_DEFPUSHBUTTON + PUSHBUTTON "Cancel", IDCANCEL, 149,136,51,14 + PUSHBUTTON "&View Certificate", IDC_SELECT_VIEW_CERT, 207,136,65,14, WS_DISABLED +END diff --git a/dll/win32/cryptui/lang/cryptui_Ro.rc b/dll/win32/cryptui/lang/cryptui_Ro.rc index d510a6132d..ce153d4827 100644 --- a/dll/win32/cryptui/lang/cryptui_Ro.rc +++ b/dll/win32/cryptui/lang/cryptui_Ro.rc @@ -174,6 +174,11 @@ STRINGTABLE IDS_EXPORT_PASSWORD_MISMATCH "Parolele nu se potrivesc." IDS_EXPORT_PRIVATE_KEY_UNAVAILABLE "Notă: Cheia privată pentru acest certificat nu a putut fi deschisă." IDS_EXPORT_PRIVATE_KEY_NON_EXPORTABLE "Notă: Cheia privată pentru acest certificat nu este exportabilă." + IDS_INTENDED_USE_COLUMN "Intended Use" + IDS_LOCATION_COLUMN "Location" + IDS_SELECT_CERT_TITLE "Select Certificate" + IDS_SELECT_CERT "Select a certificate" + IDS_NO_IMPL "Not yet implemented" } IDD_GENERAL DIALOGEX 0, 0, 255, 236 @@ -460,3 +465,15 @@ BEGIN LVS_REPORT|LVS_NOCOLUMNHEADER|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 115,67,174,100 END + +IDD_SELECT_CERT DIALOG 0,0,278,157 +CAPTION "Select Certificate" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Select a certificate you want to use", IDC_SELECT_DISPLAY_STRING, 7,7,264,26 + CONTROL "", IDC_SELECT_CERTS, "SysListView32", + LVS_REPORT|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 7,40,264,89 + PUSHBUTTON "OK", IDOK, 91,136,51,14, BS_DEFPUSHBUTTON + PUSHBUTTON "Cancel", IDCANCEL, 149,136,51,14 + PUSHBUTTON "&View Certificate", IDC_SELECT_VIEW_CERT, 207,136,65,14, WS_DISABLED +END diff --git a/dll/win32/cryptui/lang/cryptui_Ru.rc b/dll/win32/cryptui/lang/cryptui_Ru.rc index 516a15cb59..a4eaff7d70 100644 --- a/dll/win32/cryptui/lang/cryptui_Ru.rc +++ b/dll/win32/cryptui/lang/cryptui_Ru.rc @@ -173,6 +173,11 @@ STRINGTABLE IDS_EXPORT_PASSWORD_MISMATCH "Пароли не совпадают." IDS_EXPORT_PRIVATE_KEY_UNAVAILABLE "Замечание: Закрытый ключ для этого сертификата не может быть открыт." IDS_EXPORT_PRIVATE_KEY_NON_EXPORTABLE "Замечание: Закрытый ключ для этого сертификата не может быть экспортирован." + IDS_INTENDED_USE_COLUMN "Intended Use" + IDS_LOCATION_COLUMN "Location" + IDS_SELECT_CERT_TITLE "Select Certificate" + IDS_SELECT_CERT "Select a certificate" + IDS_NO_IMPL "Not yet implemented" } IDD_GENERAL DIALOGEX 0, 0, 255, 236 @@ -459,3 +464,15 @@ BEGIN LVS_REPORT|LVS_NOCOLUMNHEADER|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 115,67,174,100 END + +IDD_SELECT_CERT DIALOG 0,0,278,157 +CAPTION "Select Certificate" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Select a certificate you want to use", IDC_SELECT_DISPLAY_STRING, 7,7,264,26 + CONTROL "", IDC_SELECT_CERTS, "SysListView32", + LVS_REPORT|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 7,40,264,89 + PUSHBUTTON "OK", IDOK, 91,136,51,14, BS_DEFPUSHBUTTON + PUSHBUTTON "Cancel", IDCANCEL, 149,136,51,14 + PUSHBUTTON "&View Certificate", IDC_SELECT_VIEW_CERT, 207,136,65,14, WS_DISABLED +END diff --git a/dll/win32/cryptui/lang/cryptui_Sq.rc b/dll/win32/cryptui/lang/cryptui_Sq.rc index 29dec53c98..f261c42526 100644 --- a/dll/win32/cryptui/lang/cryptui_Sq.rc +++ b/dll/win32/cryptui/lang/cryptui_Sq.rc @@ -172,6 +172,11 @@ STRINGTABLE IDS_EXPORT_PASSWORD_MISMATCH "Passwordi nuk perputhet." IDS_EXPORT_PRIVATE_KEY_UNAVAILABLE "Shenim: Çelësi privat për këtë certifikatë nuk mund të hapet." IDS_EXPORT_PRIVATE_KEY_NON_EXPORTABLE "Shenim: Çelësi privat për këtë certifikatë nuk është eksportueshme." + IDS_INTENDED_USE_COLUMN "Intended Use" + IDS_LOCATION_COLUMN "Location" + IDS_SELECT_CERT_TITLE "Select Certificate" + IDS_SELECT_CERT "Select a certificate" + IDS_NO_IMPL "Not yet implemented" } IDD_GENERAL DIALOGEX 0, 0, 255, 236 @@ -458,3 +463,15 @@ BEGIN LVS_REPORT|LVS_NOCOLUMNHEADER|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 115,67,174,100 END + +IDD_SELECT_CERT DIALOG 0,0,278,157 +CAPTION "Select Certificate" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Select a certificate you want to use", IDC_SELECT_DISPLAY_STRING, 7,7,264,26 + CONTROL "", IDC_SELECT_CERTS, "SysListView32", + LVS_REPORT|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 7,40,264,89 + PUSHBUTTON "OK", IDOK, 91,136,51,14, BS_DEFPUSHBUTTON + PUSHBUTTON "Cancel", IDCANCEL, 149,136,51,14 + PUSHBUTTON "&View Certificate", IDC_SELECT_VIEW_CERT, 207,136,65,14, WS_DISABLED +END diff --git a/dll/win32/cryptui/lang/cryptui_Tr.rc b/dll/win32/cryptui/lang/cryptui_Tr.rc index 4f3e25173b..20fa37cb79 100644 --- a/dll/win32/cryptui/lang/cryptui_Tr.rc +++ b/dll/win32/cryptui/lang/cryptui_Tr.rc @@ -171,6 +171,11 @@ STRINGTABLE IDS_EXPORT_PASSWORD_MISMATCH "Şifreler uyuşmuyor." IDS_EXPORT_PRIVATE_KEY_UNAVAILABLE "Önemli: Bu onay belgesinin husûsî anahtarı açılamadı." IDS_EXPORT_PRIVATE_KEY_NON_EXPORTABLE "Önemli: Bu onay belgesinin husûsî anahtarı verilebilen değil." + IDS_INTENDED_USE_COLUMN "Intended Use" + IDS_LOCATION_COLUMN "Location" + IDS_SELECT_CERT_TITLE "Select Certificate" + IDS_SELECT_CERT "Select a certificate" + IDS_NO_IMPL "Not yet implemented" } IDD_GENERAL DIALOGEX 0, 0, 255, 236 @@ -457,3 +462,15 @@ BEGIN LVS_REPORT|LVS_NOCOLUMNHEADER|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 115,67,174,100 END + +IDD_SELECT_CERT DIALOG 0,0,278,157 +CAPTION "Select Certificate" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Select a certificate you want to use", IDC_SELECT_DISPLAY_STRING, 7,7,264,26 + CONTROL "", IDC_SELECT_CERTS, "SysListView32", + LVS_REPORT|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 7,40,264,89 + PUSHBUTTON "OK", IDOK, 91,136,51,14, BS_DEFPUSHBUTTON + PUSHBUTTON "Cancel", IDCANCEL, 149,136,51,14 + PUSHBUTTON "&View Certificate", IDC_SELECT_VIEW_CERT, 207,136,65,14, WS_DISABLED +END diff --git a/dll/win32/cryptui/lang/cryptui_Uk.rc b/dll/win32/cryptui/lang/cryptui_Uk.rc index 7664b0f432..e91766735f 100644 --- a/dll/win32/cryptui/lang/cryptui_Uk.rc +++ b/dll/win32/cryptui/lang/cryptui_Uk.rc @@ -171,6 +171,11 @@ STRINGTABLE IDS_EXPORT_PASSWORD_MISMATCH "Паролі не співпадають." IDS_EXPORT_PRIVATE_KEY_UNAVAILABLE "Увага: Приватний ключ для цього сертифікату не може бути відкритий." IDS_EXPORT_PRIVATE_KEY_NON_EXPORTABLE "Увага: Приватний ключ для цього сертифікату не може бути експортований." + IDS_INTENDED_USE_COLUMN "Intended Use" + IDS_LOCATION_COLUMN "Location" + IDS_SELECT_CERT_TITLE "Select Certificate" + IDS_SELECT_CERT "Select a certificate" + IDS_NO_IMPL "Not yet implemented" } IDD_GENERAL DIALOGEX 0, 0, 255, 236 @@ -453,3 +458,15 @@ BEGIN LVS_REPORT|LVS_NOCOLUMNHEADER|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 115,67,174,100 END + +IDD_SELECT_CERT DIALOG 0,0,278,157 +CAPTION "Select Certificate" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Select a certificate you want to use", IDC_SELECT_DISPLAY_STRING, 7,7,264,26 + CONTROL "", IDC_SELECT_CERTS, "SysListView32", + LVS_REPORT|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 7,40,264,89 + PUSHBUTTON "OK", IDOK, 91,136,51,14, BS_DEFPUSHBUTTON + PUSHBUTTON "Cancel", IDCANCEL, 149,136,51,14 + PUSHBUTTON "&View Certificate", IDC_SELECT_VIEW_CERT, 207,136,65,14, WS_DISABLED +END diff --git a/dll/win32/cryptui/lang/cryptui_Zh.rc b/dll/win32/cryptui/lang/cryptui_Zh.rc index a2efa87c53..7e3ba5da7b 100644 --- a/dll/win32/cryptui/lang/cryptui_Zh.rc +++ b/dll/win32/cryptui/lang/cryptui_Zh.rc @@ -175,6 +175,11 @@ STRINGTABLE IDS_EXPORT_PASSWORD_MISMATCH "密码不匹配。" IDS_EXPORT_PRIVATE_KEY_UNAVAILABLE "注意: 无法打开此证书的专用密钥。" IDS_EXPORT_PRIVATE_KEY_NON_EXPORTABLE "注: 此证书的私钥不可导出。" + IDS_INTENDED_USE_COLUMN "Intended Use" + IDS_LOCATION_COLUMN "Location" + IDS_SELECT_CERT_TITLE "Select Certificate" + IDS_SELECT_CERT "Select a certificate" + IDS_NO_IMPL "Not yet implemented" } IDD_GENERAL DIALOGEX 0, 0, 255, 236 @@ -462,4 +467,14 @@ BEGIN 115,67,174,100 END - +IDD_SELECT_CERT DIALOG 0,0,278,157 +CAPTION "Select Certificate" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Select a certificate you want to use", IDC_SELECT_DISPLAY_STRING, 7,7,264,26 + CONTROL "", IDC_SELECT_CERTS, "SysListView32", + LVS_REPORT|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER, 7,40,264,89 + PUSHBUTTON "OK", IDOK, 91,136,51,14, BS_DEFPUSHBUTTON + PUSHBUTTON "Cancel", IDCANCEL, 149,136,51,14 + PUSHBUTTON "&View Certificate", IDC_SELECT_VIEW_CERT, 207,136,65,14, WS_DISABLED +END diff --git a/dll/win32/cryptui/main.c b/dll/win32/cryptui/main.c index 4ac37c96df..41938f5177 100644 --- a/dll/win32/cryptui/main.c +++ b/dll/win32/cryptui/main.c @@ -46,6 +46,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(cryptui); static HINSTANCE hInstance; +static const WCHAR empty[] = {0}; + BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved); @@ -62,6 +64,14 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) return TRUE; } +static WCHAR *strdupAtoW( const char *str ) +{ + DWORD len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0 ); + WCHAR *ret = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ); + if (ret) MultiByteToWideChar( CP_ACP, 0, str, -1, ret, len ); + return ret; +} + #define MAX_STRING_LEN 512 static void add_cert_columns(HWND hwnd) @@ -796,8 +806,6 @@ static LRESULT CALLBACK cert_mgr_advanced_dlg_proc(HWND hwnd, UINT msg, static void cert_mgr_clear_cert_selection(HWND hwnd) { - WCHAR empty[] = { 0 }; - EnableWindow(GetDlgItem(hwnd, IDC_MGR_EXPORT), FALSE); EnableWindow(GetDlgItem(hwnd, IDC_MGR_REMOVE), FALSE); EnableWindow(GetDlgItem(hwnd, IDC_MGR_VIEW), FALSE); @@ -837,10 +845,8 @@ static void show_selected_cert(HWND hwnd, int index) } } -static void cert_mgr_show_cert_usages(HWND hwnd, int index) +static void get_cert_usages(PCCERT_CONTEXT cert, LPWSTR *str) { - HWND text = GetDlgItem(hwnd, IDC_MGR_PURPOSES); - PCCERT_CONTEXT cert = cert_mgr_index_to_cert(hwnd, index); PCERT_ENHKEY_USAGE usage; DWORD size; @@ -879,7 +885,7 @@ static void cert_mgr_show_cert_usages(HWND hwnd, int index) { static const WCHAR commaSpace[] = { ',',' ',0 }; DWORD i, len = 1; - LPWSTR str, ptr; + LPWSTR ptr; for (i = 0; i < usage->cUsageIdentifier; i++) { @@ -895,10 +901,10 @@ static void cert_mgr_show_cert_usages(HWND hwnd, int index) if (i < usage->cUsageIdentifier - 1) len += strlenW(commaSpace); } - str = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); - if (str) + *str = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + if (*str) { - for (i = 0, ptr = str; i < usage->cUsageIdentifier; i++) + for (i = 0, ptr = *str; i < usage->cUsageIdentifier; i++) { PCCRYPT_OID_INFO info = CryptFindOIDInfo(CRYPT_OID_INFO_OID_KEY, @@ -925,25 +931,37 @@ static void cert_mgr_show_cert_usages(HWND hwnd, int index) } } *ptr = 0; - SendMessageW(text, WM_SETTEXT, 0, (LPARAM)str); - HeapFree(GetProcessHeap(), 0, str); } HeapFree(GetProcessHeap(), 0, usage); } else { - WCHAR buf[MAX_STRING_LEN]; - - LoadStringW(hInstance, IDS_ALLOWED_PURPOSE_NONE, buf, ARRAY_SIZE(buf)); - SendMessageW(text, WM_SETTEXT, 0, (LPARAM)buf); + size = MAX_STRING_LEN * sizeof(WCHAR); + *str = HeapAlloc(GetProcessHeap(), 0, size); + if (*str) + LoadStringW(hInstance, IDS_ALLOWED_PURPOSE_NONE, *str, size); } } else { - WCHAR buf[MAX_STRING_LEN]; + size = MAX_STRING_LEN * sizeof(WCHAR); + *str = HeapAlloc(GetProcessHeap(), 0, size); + if (*str) + LoadStringW(hInstance, IDS_ALLOWED_PURPOSE_ALL, *str, size); + } +} + +static void cert_mgr_show_cert_usages(HWND hwnd, int index) +{ + HWND text = GetDlgItem(hwnd, IDC_MGR_PURPOSES); + PCCERT_CONTEXT cert = cert_mgr_index_to_cert(hwnd, index); + LPWSTR str = NULL; - LoadStringW(hInstance, IDS_ALLOWED_PURPOSE_ALL, buf, ARRAY_SIZE(buf)); - SendMessageW(text, WM_SETTEXT, 0, (LPARAM)buf); + get_cert_usages(cert, &str); + if (str) + { + SendMessageW(text, WM_SETTEXT, 0, (LPARAM)str); + HeapFree(GetProcessHeap(), 0, str); } } @@ -1148,7 +1166,6 @@ static LRESULT CALLBACK cert_mgr_dlg_proc(HWND hwnd, UINT msg, WPARAM wp, break; case LVN_ITEMCHANGED: { - WCHAR empty[] = { 0 }; NMITEMACTIVATE *nm = (NMITEMACTIVATE*)lp; HWND lv = GetDlgItem(hwnd, IDC_MGR_CERTS); int numSelected = SendMessageW(lv, LVM_GETSELECTEDCOUNT, 0, 0); @@ -3480,7 +3497,7 @@ static void set_general_cert_properties(HWND hwnd, struct edit_cert_data *data) static void set_cert_string_property(PCCERT_CONTEXT cert, DWORD prop, LPWSTR str) { - if (str && strlenW(str)) + if (str && *str) { CRYPT_DATA_BLOB blob; @@ -4887,7 +4904,7 @@ static const WCHAR filter_cms[] = { '*','.','s','p','c',';','*','.', 'p','7','b',0 }; static const WCHAR filter_all[] = { '*','.','*',0 }; -static struct StringToFilter +static const struct { int id; DWORD allowFlags; @@ -6983,16 +7000,550 @@ BOOL WINAPI CryptUIDlgViewSignerInfoA(CRYPTUI_VIEWSIGNERINFO_STRUCTA *pcvsi) return FALSE; } +static void init_columns(HWND lv, DWORD flags) +{ + WCHAR buf[MAX_STRING_LEN]; + LVCOLUMNW column; + DWORD i = 0; + + SendMessageW(lv, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT); + column.mask = LVCF_WIDTH | LVCF_TEXT; + column.cx = 90; + column.pszText = buf; + if (!(flags & CRYPTUI_SELECT_ISSUEDTO_COLUMN)) + { + LoadStringW(hInstance, IDS_SUBJECT_COLUMN, buf, ARRAY_SIZE(buf)); + SendMessageW(lv, LVM_INSERTCOLUMNW, i++, (LPARAM)&column); + } + if (!(flags & CRYPTUI_SELECT_ISSUEDBY_COLUMN)) + { + LoadStringW(hInstance, IDS_ISSUER_COLUMN, buf, ARRAY_SIZE(buf)); + SendMessageW(lv, LVM_INSERTCOLUMNW, i++, (LPARAM)&column); + } + if (!(flags & CRYPTUI_SELECT_INTENDEDUSE_COLUMN)) + { + LoadStringW(hInstance, IDS_INTENDED_USE_COLUMN, buf, ARRAY_SIZE(buf)); + SendMessageW(lv, LVM_INSERTCOLUMNW, i++, (LPARAM)&column); + } + if (!(flags & CRYPTUI_SELECT_FRIENDLYNAME_COLUMN)) + { + LoadStringW(hInstance, IDS_FRIENDLY_NAME_COLUMN, buf, ARRAY_SIZE(buf)); + SendMessageW(lv, LVM_INSERTCOLUMNW, i++, (LPARAM)&column); + } + if (!(flags & CRYPTUI_SELECT_EXPIRATION_COLUMN)) + { + LoadStringW(hInstance, IDS_EXPIRATION_COLUMN, buf, ARRAY_SIZE(buf)); + SendMessageW(lv, LVM_INSERTCOLUMNW, i++, (LPARAM)&column); + } + if (!(flags & CRYPTUI_SELECT_LOCATION_COLUMN)) + { + LoadStringW(hInstance, IDS_LOCATION_COLUMN, buf, ARRAY_SIZE(buf)); + SendMessageW(lv, LVM_INSERTCOLUMNW, i++, (LPARAM)&column); + } +} + +static void add_cert_to_list(HWND lv, PCCERT_CONTEXT cert, DWORD flags, DWORD *allocatedLen, + LPWSTR *str) +{ + DWORD len; + LVITEMW item; + WCHAR dateFmt[80]; /* sufficient for LOCALE_SSHORTDATE */ + WCHAR buf[80]; + SYSTEMTIME sysTime; + LPWSTR none, usages; + + item.mask = LVIF_IMAGE | LVIF_PARAM | LVIF_TEXT; + item.iItem = SendMessageW(lv, LVM_GETITEMCOUNT, 0, 0); + item.iSubItem = 0; + item.iImage = 0; + item.lParam = (LPARAM)CertDuplicateCertificateContext(cert); + if (!item.iItem) + { + item.mask |= LVIF_STATE; + item.state = LVIS_SELECTED; + item.stateMask = -1; + } + if (!(flags & CRYPTUI_SELECT_ISSUEDTO_COLUMN)) + { + len = CertGetNameStringW(cert, CERT_NAME_SIMPLE_DISPLAY_TYPE, 0, NULL, NULL, 0); + if (len > *allocatedLen) + { + HeapFree(GetProcessHeap(), 0, *str); + *str = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + if (*str) + *allocatedLen = len; + } + if (*str) + { + CertGetNameStringW(cert, CERT_NAME_SIMPLE_DISPLAY_TYPE, 0, NULL, *str, len); + item.pszText = *str; + SendMessageW(lv, LVM_INSERTITEMW, 0, (LPARAM)&item); + } + item.mask = LVIF_TEXT; + ++item.iSubItem; + } + if (!(flags & CRYPTUI_SELECT_ISSUEDBY_COLUMN)) + { + len = CertGetNameStringW(cert, CERT_NAME_SIMPLE_DISPLAY_TYPE, CERT_NAME_ISSUER_FLAG, NULL, + NULL, 0); + if (len > *allocatedLen) + { + HeapFree(GetProcessHeap(), 0, *str); + *str = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + if (*str) + *allocatedLen = len; + } + if (*str) + { + CertGetNameStringW(cert, CERT_NAME_SIMPLE_DISPLAY_TYPE, CERT_NAME_ISSUER_FLAG, NULL, + *str, len); + item.pszText = *str; + if (!item.iSubItem) + SendMessageW(lv, LVM_INSERTITEMW, 0, (LPARAM)&item); + else + SendMessageW(lv, LVM_SETITEMTEXTW, item.iItem, (LPARAM)&item); + } + item.mask = LVIF_TEXT; + ++item.iSubItem; + } + if (!(flags & CRYPTUI_SELECT_INTENDEDUSE_COLUMN)) + { + get_cert_usages(cert, &usages); + if (usages) + { + item.pszText = usages; + if (!item.iSubItem) + SendMessageW(lv, LVM_INSERTITEMW, 0, (LPARAM)&item); + else + SendMessageW(lv, LVM_SETITEMTEXTW, item.iItem, (LPARAM)&item); + HeapFree(GetProcessHeap(), 0, usages); + } + item.mask = LVIF_TEXT; + ++item.iSubItem; + } + if (!(flags & CRYPTUI_SELECT_FRIENDLYNAME_COLUMN)) + { + if (!CertGetCertificateContextProperty(cert, CERT_FRIENDLY_NAME_PROP_ID, NULL, &len)) + len = LoadStringW(hInstance, IDS_FRIENDLY_NAME_NONE, (LPWSTR)&none, 0); + if (len > *allocatedLen) + { + HeapFree(GetProcessHeap(), 0, *str); + *str = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + if (*str) + *allocatedLen = len; + } + if (*str) + { + if (!CertGetCertificateContextProperty(cert, CERT_FRIENDLY_NAME_PROP_ID, *str, &len)) + item.pszText = none; + else + item.pszText = *str; + if (!item.iSubItem) + SendMessageW(lv, LVM_INSERTITEMW, 0, (LPARAM)&item); + else + SendMessageW(lv, LVM_SETITEMTEXTW, item.iItem, (LPARAM)&item); + } + item.mask = LVIF_TEXT; + ++item.iSubItem; + } + if (!(flags & CRYPTUI_SELECT_EXPIRATION_COLUMN)) + { + GetLocaleInfoW(LOCALE_SYSTEM_DEFAULT, LOCALE_SSHORTDATE, dateFmt, ARRAY_SIZE(dateFmt)); + FileTimeToSystemTime(&cert->pCertInfo->NotAfter, &sysTime); + GetDateFormatW(LOCALE_SYSTEM_DEFAULT, 0, &sysTime, dateFmt, buf, ARRAY_SIZE(buf)); + item.pszText = buf; + if (!item.iSubItem) + SendMessageW(lv, LVM_INSERTITEMW, 0, (LPARAM)&item); + else + SendMessageW(lv, LVM_SETITEMTEXTW, item.iItem, (LPARAM)&item); + item.mask = LVIF_TEXT; + ++item.iSubItem; + } + if (!(flags & CRYPTUI_SELECT_LOCATION_COLUMN)) + { + static int show_fixme; + if (!show_fixme++) + FIXME("showing location is not implemented\n"); + LoadStringW(hInstance, IDS_NO_IMPL, buf, ARRAY_SIZE(buf)); + if (!item.iSubItem) + SendMessageW(lv, LVM_INSERTITEMW, 0, (LPARAM)&item); + else + SendMessageW(lv, LVM_SETITEMTEXTW, item.iItem, (LPARAM)&item); + } +} + +static void add_store_certs(HWND lv, HCERTSTORE store, DWORD flags, PFNCFILTERPROC filter, + void *callback_data) +{ + PCCERT_CONTEXT cert = NULL; + BOOL select = FALSE; + DWORD allocatedLen = 0; + LPWSTR str = NULL; + + do { + cert = CertEnumCertificatesInStore(store, cert); + if (cert && (!filter || filter(cert, &select, callback_data))) + add_cert_to_list(lv, cert, flags, &allocatedLen, &str); + } while (cert); + HeapFree(GetProcessHeap(), 0, str); +} + +static PCCERT_CONTEXT select_cert_get_selected(HWND hwnd, int selection) +{ + HWND lv = GetDlgItem(hwnd, IDC_SELECT_CERTS); + PCCERT_CONTEXT cert = NULL; + LVITEMW item; + + if (selection < 0) + selection = SendMessageW(lv, LVM_GETNEXTITEM, -1, LVNI_SELECTED); + if (selection < 0) + return NULL; + item.mask = LVIF_PARAM; + item.iItem = selection; + item.iSubItem = 0; + if (SendMessageW(lv, LVM_GETITEMW, 0, (LPARAM)&item)) + cert = (PCCERT_CONTEXT)item.lParam; + return cert; +} + +static void select_cert_update_view_button(HWND hwnd) +{ + HWND lv = GetDlgItem(hwnd, IDC_SELECT_CERTS); + int numSelected = SendMessageW(lv, LVM_GETSELECTEDCOUNT, 0, 0); + + EnableWindow(GetDlgItem(hwnd, IDC_SELECT_VIEW_CERT), numSelected == 1); +} + +struct SelectCertData +{ + PCCERT_CONTEXT *cert; + DWORD dateColumn; + HIMAGELIST imageList; + LPCWSTR title; + DWORD cStores; + HCERTSTORE *rghStores; + DWORD cPropSheetPages; + LPCPROPSHEETPAGEW rgPropSheetPages; + PFNCCERTDISPLAYPROC displayProc; + void *callbackData; +}; + +static void select_cert_view(HWND hwnd, PCCERT_CONTEXT cert, struct SelectCertData *data) +{ + CRYPTUI_VIEWCERTIFICATE_STRUCTW viewInfo; + + if (data->displayProc && data->displayProc(cert, hwnd, data->callbackData)) + return; + memset(&viewInfo, 0, sizeof(viewInfo)); + viewInfo.dwSize = sizeof(viewInfo); + viewInfo.hwndParent = hwnd; + viewInfo.pCertContext = cert; + viewInfo.cStores = data->cStores; + viewInfo.rghStores = data->rghStores; + viewInfo.cPropSheetPages = data->cPropSheetPages; + viewInfo.rgPropSheetPages = data->rgPropSheetPages; + /* FIXME: this should be modal */ + CryptUIDlgViewCertificateW(&viewInfo, NULL); +} + +struct SortData +{ + HWND hwnd; + int column; +}; + +static int CALLBACK select_cert_sort_by_text(LPARAM lp1, LPARAM lp2, LPARAM lp) +{ + struct SortData *data = (struct SortData *)lp; + return cert_mgr_sort_by_text(data->hwnd, data->column, lp1, lp2); +} + +struct SelectCertParam +{ + PCCRYPTUI_SELECTCERTIFICATE_STRUCTW pcsc; + PCCERT_CONTEXT cert; +}; + +static LRESULT CALLBACK select_cert_dlg_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) +{ + struct SelectCertData *data; + + switch (msg) + { + case WM_INITDIALOG: + { + struct SelectCertParam *param = (struct SelectCertParam *)lp; + PCCRYPTUI_SELECTCERTIFICATE_STRUCTW pcsc = param->pcsc; + HWND lv = GetDlgItem(hwnd, IDC_SELECT_CERTS); + DWORD i = 0; + + data = HeapAlloc(GetProcessHeap(), 0, sizeof(*data)); + if (!data) + return 0; + data->cert = ¶m->cert; + data->dateColumn = 4 - + ((pcsc->dwDontUseColumn & CRYPTUI_SELECT_ISSUEDTO_COLUMN) ? 1 : 0) - + ((pcsc->dwDontUseColumn & CRYPTUI_SELECT_ISSUEDBY_COLUMN) ? 1 : 0) - + ((pcsc->dwDontUseColumn & CRYPTUI_SELECT_INTENDEDUSE_COLUMN) ? 1 : 0) - + ((pcsc->dwDontUseColumn & CRYPTUI_SELECT_FRIENDLYNAME_COLUMN) ? 1 : 0); + data->imageList = ImageList_Create(16, 16, ILC_COLOR4 | ILC_MASK, 2, 0); + if (data->imageList) + { + HBITMAP bmp; + COLORREF backColor = RGB(255, 0, 255); + + bmp = LoadBitmapW(hInstance, MAKEINTRESOURCEW(IDB_SMALL_ICONS)); + ImageList_AddMasked(data->imageList, bmp, backColor); + DeleteObject(bmp); + ImageList_SetBkColor(data->imageList, CLR_NONE); + SendMessageW(GetDlgItem(hwnd, IDC_SELECT_CERTS), LVM_SETIMAGELIST, LVSIL_SMALL, + (LPARAM)data->imageList); + } + data->title = pcsc->szTitle; + data->cStores = pcsc->cStores; + data->rghStores = pcsc->rghStores; + data->cPropSheetPages = pcsc->cPropSheetPages; + data->rgPropSheetPages = pcsc->rgPropSheetPages; + data->displayProc = pcsc->pDisplayCallback; + data->callbackData = pcsc->pvCallbackData; + SetWindowLongPtrW(hwnd, DWLP_USER, (LPARAM)data); + + if (pcsc->szTitle) + SendMessageW(hwnd, WM_SETTEXT, 0, (LPARAM)pcsc->szTitle); + if (pcsc->szDisplayString) + SendMessageW(GetDlgItem(hwnd, IDC_SELECT_DISPLAY_STRING), WM_SETTEXT, 0, + (LPARAM)pcsc->szDisplayString); + init_columns(lv, pcsc->dwDontUseColumn); + while (i < pcsc->cDisplayStores) + add_store_certs(lv, pcsc->rghDisplayStores[i++], pcsc->dwDontUseColumn, + pcsc->pFilterCallback, pcsc->pvCallbackData); + select_cert_update_view_button(hwnd); + break; + } + case WM_NOTIFY: + { + NMHDR *hdr = (NMHDR *)lp; + + switch (hdr->code) + { + case NM_DBLCLK: + { + PCCERT_CONTEXT cert = select_cert_get_selected(hwnd, ((NMITEMACTIVATE *)lp)->iItem); + + data = (struct SelectCertData *)GetWindowLongPtrW(hwnd, DWLP_USER); + if (cert) + select_cert_view(hwnd, cert, data); + break; + } + case LVN_COLUMNCLICK: + { + NMLISTVIEW *nmlv = (NMLISTVIEW *)lp; + HWND lv = GetDlgItem(hwnd, IDC_SELECT_CERTS); + + /* FIXME: doesn't support swapping sort order between ascending and descending. */ + data = (struct SelectCertData *)GetWindowLongPtrW(hwnd, DWLP_USER); + if (nmlv->iSubItem == data->dateColumn) + SendMessageW(lv, LVM_SORTITEMS, 0, (LPARAM)cert_mgr_sort_by_date); + else + { + struct SortData sortData; + + sortData.hwnd = lv; + sortData.column = nmlv->iSubItem; + SendMessageW(lv, LVM_SORTITEMSEX, (WPARAM)&sortData, + (LPARAM)select_cert_sort_by_text); + } + break; + } + } + break; + } + case WM_COMMAND: + switch (wp) + { + case IDOK: + { + PCCERT_CONTEXT cert = select_cert_get_selected(hwnd, -1); + + data = (struct SelectCertData *)GetWindowLongPtrW(hwnd, DWLP_USER); + if (!cert) + { + WCHAR buf[40], title[40]; + + LoadStringW(hInstance, IDS_SELECT_CERT, buf, ARRAY_SIZE(buf)); + if (!data->title) + LoadStringW(hInstance, IDS_SELECT_CERT_TITLE, title, ARRAY_SIZE(title)); + MessageBoxW(hwnd, buf, data->title ? data->title : title, MB_OK | MB_ICONWARNING); + break; + } + *data->cert = CertDuplicateCertificateContext(cert); + free_certs(GetDlgItem(hwnd, IDC_SELECT_CERTS)); + ImageList_Destroy(data->imageList); + HeapFree(GetProcessHeap(), 0, data); + EndDialog(hwnd, IDOK); + break; + } + case IDCANCEL: + data = (struct SelectCertData *)GetWindowLongPtrW(hwnd, DWLP_USER); + free_certs(GetDlgItem(hwnd, IDC_SELECT_CERTS)); + ImageList_Destroy(data->imageList); + HeapFree(GetProcessHeap(), 0, data); + EndDialog(hwnd, IDCANCEL); + break; + case IDC_SELECT_VIEW_CERT: + { + PCCERT_CONTEXT cert = select_cert_get_selected(hwnd, -1); + + data = (struct SelectCertData *)GetWindowLongPtrW(hwnd, DWLP_USER); + if (cert) + select_cert_view(hwnd, cert, data); + break; + } + } + break; + } + return 0; +} + PCCERT_CONTEXT WINAPI CryptUIDlgSelectCertificateW(PCCRYPTUI_SELECTCERTIFICATE_STRUCTW pcsc) { - FIXME("%p: stub\n", pcsc); + struct SelectCertParam param; + + TRACE("%p\n", pcsc); + + if (pcsc->dwSize != sizeof(*pcsc) && pcsc->dwSize != sizeof(*pcsc) - sizeof(HCERTSTORE)) + { + WARN("unexpected size %d\n", pcsc->dwSize); + SetLastError(E_INVALIDARG); + return NULL; + } + if (pcsc->dwFlags & CRYPTUI_SELECTCERT_MULTISELECT) + FIXME("ignoring CRYPTUI_SELECTCERT_MULTISELECT\n"); + param.pcsc = pcsc; + param.cert = NULL; + DialogBoxParamW(hInstance, MAKEINTRESOURCEW(IDD_SELECT_CERT), pcsc->hwndParent, + select_cert_dlg_proc, (LPARAM)¶m); + return param.cert; +} + +static void free_prop_sheet_pages(PROPSHEETPAGEW *pages, DWORD num) +{ + DWORD i; + + for (i = 0; i < num; i++) + { + if (!(pages[i].dwFlags & PSP_DLGINDIRECT) && !IS_INTRESOURCE(pages[i].u.pszTemplate)) + HeapFree(GetProcessHeap(), 0, (void *)pages[i].u.pszTemplate); + if ((pages[i].dwFlags & PSP_USEICONID) && !IS_INTRESOURCE(pages[i].u2.pszIcon)) + HeapFree(GetProcessHeap(), 0, (void *)pages[i].u2.pszIcon); + if ((pages[i].dwFlags & PSP_USETITLE) && !IS_INTRESOURCE(pages[i].pszTitle)) + HeapFree(GetProcessHeap(), 0, (void *)pages[i].pszTitle); + if ((pages[i].dwFlags & PSP_USEHEADERTITLE) && !IS_INTRESOURCE(pages[i].pszHeaderTitle)) + HeapFree(GetProcessHeap(), 0, (void *)pages[i].pszHeaderTitle); + if ((pages[i].dwFlags & PSP_USEHEADERSUBTITLE) && + !IS_INTRESOURCE(pages[i].pszHeaderSubTitle)) + HeapFree(GetProcessHeap(), 0, (void *)pages[i].pszHeaderSubTitle); + } + HeapFree(GetProcessHeap(), 0, pages); +} + +static PROPSHEETPAGEW *prop_sheet_pages_AtoW(LPCPROPSHEETPAGEA pages, DWORD num) +{ + PROPSHEETPAGEW *psp; + DWORD i, size = sizeof(*psp) * num; + + psp = HeapAlloc(GetProcessHeap(), 0, size); + if (!psp) + return NULL; + memcpy(psp, pages, size); + for (i = 0; i < num; i++) + { + if (!(pages[i].dwFlags & PSP_DLGINDIRECT) && !IS_INTRESOURCE(pages[i].u.pszTemplate)) + psp[i].u.pszTemplate = NULL; + if ((pages[i].dwFlags & PSP_USEICONID) && !IS_INTRESOURCE(pages[i].u2.pszIcon)) + psp[i].u2.pszIcon = NULL; + if ((pages[i].dwFlags & PSP_USETITLE) && !IS_INTRESOURCE(pages[i].pszTitle)) + psp[i].pszTitle = NULL; + if (pages[i].dwFlags & PSP_USECALLBACK) + psp[i].pfnCallback = NULL; + if ((pages[i].dwFlags & PSP_USEHEADERTITLE) && !IS_INTRESOURCE(pages[i].pszHeaderTitle)) + psp[i].pszHeaderTitle = NULL; + if ((pages[i].dwFlags & PSP_USEHEADERSUBTITLE) && + !IS_INTRESOURCE(pages[i].pszHeaderSubTitle)) + psp[i].pszHeaderSubTitle = NULL; + } + for (i = 0; i < num; i++) + { + if (!(pages[i].dwFlags & PSP_DLGINDIRECT) && !IS_INTRESOURCE(pages[i].u.pszTemplate)) + { + if (!(psp[i].u.pszTemplate = strdupAtoW( pages[i].u.pszTemplate ))) goto error; + } + if ((pages[i].dwFlags & PSP_USEICONID) && !IS_INTRESOURCE(pages[i].u2.pszIcon)) + { + if (!(psp[i].u2.pszIcon = strdupAtoW( pages[i].u2.pszIcon ))) goto error; + } + if ((pages[i].dwFlags & PSP_USETITLE) && !IS_INTRESOURCE(pages[i].pszTitle)) + { + if (!(psp[i].pszTitle = strdupAtoW( pages[i].pszTitle ))) goto error; + } + if (pages[i].dwFlags & PSP_USECALLBACK) + FIXME("ignoring pfnCallback\n"); + if ((pages[i].dwFlags & PSP_USEHEADERTITLE) && !IS_INTRESOURCE(pages[i].pszHeaderTitle)) + { + if (!(psp[i].pszHeaderTitle = strdupAtoW( pages[i].pszHeaderTitle ))) goto error; + } + if ((pages[i].dwFlags & PSP_USEHEADERSUBTITLE) && + !IS_INTRESOURCE(pages[i].pszHeaderSubTitle)) + { + if (!(psp[i].pszHeaderSubTitle = strdupAtoW( pages[i].pszHeaderSubTitle ))) goto error; + } + } + return psp; +error: + free_prop_sheet_pages(psp, num); return NULL; } PCCERT_CONTEXT WINAPI CryptUIDlgSelectCertificateA(PCCRYPTUI_SELECTCERTIFICATE_STRUCTA pcsc) { - FIXME("%p: stub\n", pcsc); - return NULL; + PCCERT_CONTEXT cert = NULL; + CRYPTUI_SELECTCERTIFICATE_STRUCTW selCertInfo; + LPWSTR title = NULL, display_str = NULL; + PROPSHEETPAGEW *pages = NULL; + + TRACE("%p\n", pcsc); + + if (pcsc->dwSize != sizeof(*pcsc) && pcsc->dwSize != sizeof(*pcsc) - sizeof(HCERTSTORE)) + { + WARN("unexpected size %d\n", pcsc->dwSize); + SetLastError(E_INVALIDARG); + return NULL; + } + memcpy(&selCertInfo, pcsc, pcsc->dwSize); + if (pcsc->szTitle) + { + if (!(title = strdupAtoW( pcsc->szTitle ))) goto error; + selCertInfo.szTitle = title; + } + if (pcsc->szDisplayString) + { + if (!(display_str = strdupAtoW( pcsc->szDisplayString ))) goto error; + selCertInfo.szDisplayString = display_str; + } + if (pcsc->cPropSheetPages) + { + pages = prop_sheet_pages_AtoW(pcsc->rgPropSheetPages, pcsc->cPropSheetPages); + if (!pages) + goto error; + selCertInfo.rgPropSheetPages = pages; + } + cert = CryptUIDlgSelectCertificateW(&selCertInfo); +error: + HeapFree(GetProcessHeap(), 0, title); + HeapFree(GetProcessHeap(), 0, display_str); + if (pcsc->cPropSheetPages) + free_prop_sheet_pages(pages, pcsc->cPropSheetPages); + return cert; } PCCERT_CONTEXT WINAPI CryptUIDlgSelectCertificateFromStore(HCERTSTORE hCertStore, HWND hwnd, LPCWSTR pwszTitle, diff --git a/media/doc/README.WINE b/media/doc/README.WINE index cdf4cda9c6..d2f702ab60 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -62,7 +62,7 @@ reactos/dll/win32/crypt32 # Synced to WineStaging-4.0 reactos/dll/win32/cryptdlg # Synced to WineStaging-3.3 reactos/dll/win32/cryptdll # Synced to WineStaging-3.3 reactos/dll/win32/cryptnet # Synced to WineStaging-3.3 -reactos/dll/win32/cryptui # Synced to WineStaging-3.17 +reactos/dll/win32/cryptui # Synced to WineStaging-4.0 reactos/dll/win32/dbghelp # Synced to WineStaging-3.9 reactos/dll/win32/dciman32 # Synced to WineStaging-3.3 reactos/dll/win32/faultrep # Synced to WineStaging-2.9
6 years
1
0
0
0
← Newer
1
...
7
8
9
10
11
12
13
...
30
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
Results per page:
10
25
50
100
200