ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
April 2012
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
11 participants
156 discussions
Start a n
N
ew thread
[tkreuzer] 56394: [GDI32_APITEST] Fix build
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Apr 23 10:56:45 2012 New Revision: 56394 URL:
http://svn.reactos.org/svn/reactos?rev=56394&view=rev
Log: [GDI32_APITEST] Fix build Modified: trunk/rostests/apitests/gdi32/GetRandomRgn.c trunk/rostests/apitests/gdi32/PatBlt.c Modified: trunk/rostests/apitests/gdi32/GetRandomRgn.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32/GetRandomR…
============================================================================== --- trunk/rostests/apitests/gdi32/GetRandomRgn.c [iso-8859-1] (original) +++ trunk/rostests/apitests/gdi32/GetRandomRgn.c [iso-8859-1] Mon Apr 23 10:56:45 2012 @@ -17,11 +17,11 @@ #define ok_int(x, exp) \ ok((x) == (exp), "Failed test in line %d: value %s expected 0x%x, got 0x%x\n", \ - __LINE__, #x, exp, x) + (int)__LINE__, #x, (int)(exp), (int)(x)) #define ok_long(x, exp) \ - ok((x) == (exp), "Failed test in line %d: value %s expected 0x%lx, got 0x%lx\n", \ - __LINE__, #x, exp, x) + ok((x) == (exp), "Failed test in line %d: value %s expected 0x%x, got 0x%x\n", \ + (int)__LINE__, #x, (int)(exp), (int)(x)) HWND ghwnd; HDC ghdcWindow; Modified: trunk/rostests/apitests/gdi32/PatBlt.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32/PatBlt.c?r…
============================================================================== --- trunk/rostests/apitests/gdi32/PatBlt.c [iso-8859-1] (original) +++ trunk/rostests/apitests/gdi32/PatBlt.c [iso-8859-1] Mon Apr 23 10:56:45 2012 @@ -13,9 +13,13 @@ PULONG gpulTargetBits; HDC hdcTarget; +#define ok_int(x, exp) \ + ok((x) == (exp), "Failed test in line %d: value %s expected 0x%x, got 0x%x\n", \ + (int)__LINE__, #x, (int)(exp), (int)(x)) + #define ok_long(x, exp) \ - ok((x) == (exp), "Failed test in line %d: value %s expected 0x%lx, got 0x%lx\n", \ - __LINE__, #x, exp, x) + ok((x) == (exp), "Failed test in line %d: value %s expected 0x%x, got 0x%x\n", \ + (int)__LINE__, #x, (int)(exp), (int)(x)) void Test_BrushOrigin() {
12 years, 8 months
1
0
0
0
[tkreuzer] 56393: [GDI32_APITEST] Add tests for CreateBitmap, CreateIconIndirect, GetRandomRgn and PatBlt
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Apr 23 10:42:22 2012 New Revision: 56393 URL:
http://svn.reactos.org/svn/reactos?rev=56393&view=rev
Log: [GDI32_APITEST] Add tests for CreateBitmap, CreateIconIndirect, GetRandomRgn and PatBlt Added: trunk/rostests/apitests/gdi32/CreateBitmap.c (with props) trunk/rostests/apitests/gdi32/CreateIconIndirect.c (with props) trunk/rostests/apitests/gdi32/GetRandomRgn.c (with props) trunk/rostests/apitests/gdi32/PatBlt.c (with props) Modified: trunk/rostests/apitests/gdi32/CMakeLists.txt trunk/rostests/apitests/gdi32/testlist.c Modified: trunk/rostests/apitests/gdi32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32/CMakeLists…
============================================================================== --- trunk/rostests/apitests/gdi32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/apitests/gdi32/CMakeLists.txt [iso-8859-1] Mon Apr 23 10:42:22 2012 @@ -7,11 +7,13 @@ AddFontResourceEx.c BeginPath.c CombineTransform.c + CreateBitmap.c CreateBitmapIndirect.c CreateCompatibleDC.c CreateDIBitmap.c CreateFont.c CreateFontIndirect.c + CreateIconIndirect.c CreatePen.c CreateRectRgn.c DPtoLP.c @@ -36,11 +38,13 @@ GetCurrentObject.c GetDIBits.c GetObject.c + GetRandomRgn.c GetPixel.c GetStockObject.c GetTextExtentExPoint.c GetTextFace.c MaskBlt.c + PatBlt.c Rectangle.c SelectObject.c SetDCPenColor.c Added: trunk/rostests/apitests/gdi32/CreateBitmap.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32/CreateBitm…
============================================================================== --- trunk/rostests/apitests/gdi32/CreateBitmap.c (added) +++ trunk/rostests/apitests/gdi32/CreateBitmap.c [iso-8859-1] Mon Apr 23 10:42:22 2012 @@ -1,0 +1,49 @@ +/* + * PROJECT: ReactOS api tests + * LICENSE: GPL - See COPYING in the top level directory + * PURPOSE: Test for CreateBitmap + * PROGRAMMERS: Timo Kreuzer + */ + +#include <stdio.h> +#include <wine/test.h> +#include <windows.h> + +#define DEFAULT_BITMAP 21 + +void Test_CreateBitmap() +{ + HBITMAP hbmp; + BITMAP bitmap; + int result; + + hbmp = CreateBitmap(0, 0, 0, 0, NULL); + ok(hbmp != 0, "should get a 1x1 bitmap\n"); + ok(hbmp == GetStockObject(DEFAULT_BITMAP), "\n"); + + result = GetObject(hbmp, sizeof(bitmap), &bitmap); + ok(result > 0, "result = %d\n", result); + + ok(bitmap.bmType == 0, "bmType = %ld\n", bitmap.bmType); + ok(bitmap.bmWidth == 1, "bmWidth = %ld\n", bitmap.bmWidth); + ok(bitmap.bmHeight == 1, "bmHeight = %ld\n", bitmap.bmHeight); + ok(bitmap.bmWidthBytes == 2, "bmWidthBytes = %ld\n", bitmap.bmWidthBytes); + ok(bitmap.bmPlanes == 1, "bmPlanes = %d\n", bitmap.bmPlanes); + ok(bitmap.bmBitsPixel == 1, "bmBitsPixel = %d\n", bitmap.bmBitsPixel); + ok(bitmap.bmBits == 0, "bmBits = %p\n", bitmap.bmBits); + + DeleteObject(hbmp); + + hbmp = CreateBitmap(1, -1, 1, 0, NULL); + ok(hbmp == 0, "\n"); + + hbmp = CreateBitmap(-1, 1, 1, 0, NULL); + ok(hbmp == 0, "\n"); + +} + +START_TEST(CreateBitmap) +{ + Test_CreateBitmap(); +} + Propchange: trunk/rostests/apitests/gdi32/CreateBitmap.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/apitests/gdi32/CreateIconIndirect.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32/CreateIcon…
============================================================================== --- trunk/rostests/apitests/gdi32/CreateIconIndirect.c (added) +++ trunk/rostests/apitests/gdi32/CreateIconIndirect.c [iso-8859-1] Mon Apr 23 10:42:22 2012 @@ -1,0 +1,207 @@ + +#include <stdio.h> +#include <wine/test.h> +#include <windows.h> + + +// FIXME user32 + +void +Test_GetIconInfo(BOOL fIcon) +{ + HICON hicon; + ICONINFO iconinfo, iconinfo2; + BITMAP bitmap; + + iconinfo.fIcon = fIcon; + iconinfo.xHotspot = 0; + iconinfo.yHotspot = 0; + iconinfo.hbmMask = NULL; + iconinfo.hbmColor = NULL; + + hicon = CreateIconIndirect(&iconinfo); + ok(hicon == 0, "should fail\n"); + + iconinfo.hbmMask = CreateBitmap(8, 16, 1, 1, NULL); + hicon = CreateIconIndirect(&iconinfo); + ok(hicon != 0, "should not fail\n"); + + ok(GetIconInfo(hicon, &iconinfo2), "\n"); + ok(iconinfo2.fIcon == iconinfo.fIcon, "\n"); + if (fIcon) + { + ok(iconinfo2.xHotspot == 4, "%ld\n", iconinfo2.xHotspot); + ok(iconinfo2.yHotspot == 4, "%ld\n", iconinfo2.yHotspot); + } + else + { + ok(iconinfo2.xHotspot == 0, "%ld\n", iconinfo2.xHotspot); + ok(iconinfo2.yHotspot == 0, "%ld\n", iconinfo2.yHotspot); + } + ok(iconinfo2.hbmMask != NULL, "\n"); + ok(iconinfo2.hbmMask != iconinfo.hbmMask, "\n"); + ok(iconinfo2.hbmColor == NULL, "\n"); + + ok(GetIconInfo(hicon, &iconinfo2), "\n"); + ok(iconinfo2.fIcon == iconinfo.fIcon, "\n"); + if (fIcon) + { + ok(iconinfo2.xHotspot == 4, "%ld\n", iconinfo2.xHotspot); + ok(iconinfo2.yHotspot == 4, "%ld\n", iconinfo2.yHotspot); + } + else + { + ok(iconinfo2.xHotspot == 0, "%ld\n", iconinfo2.xHotspot); + ok(iconinfo2.yHotspot == 0, "%ld\n", iconinfo2.yHotspot); + } + ok(iconinfo2.hbmMask != NULL, "\n"); + ok(iconinfo2.hbmMask != iconinfo.hbmMask, "\n"); + ok(iconinfo2.hbmColor == NULL, "\n"); + + iconinfo.hbmColor = CreateBitmap(2, 2, 1, 1, NULL); + hicon = CreateIconIndirect(&iconinfo); + ok(hicon != 0, "should not fail\n"); + + ok(GetIconInfo(hicon, &iconinfo2), "\n"); + ok(iconinfo2.fIcon == iconinfo.fIcon, "\n"); + if (fIcon) + { + ok(iconinfo2.xHotspot == 4, "%ld\n", iconinfo2.xHotspot); + ok(iconinfo2.yHotspot == 8, "%ld\n", iconinfo2.yHotspot); + } + else + { + ok(iconinfo2.xHotspot == 0, "%ld\n", iconinfo2.xHotspot); + ok(iconinfo2.yHotspot == 0, "%ld\n", iconinfo2.yHotspot); + } + ok(iconinfo2.hbmMask != NULL, "\n"); + ok(iconinfo2.hbmMask != iconinfo.hbmMask, "\n"); + ok(iconinfo2.hbmColor != NULL, "\n"); + ok(iconinfo2.hbmMask != iconinfo.hbmColor, "\n"); + + ok(GetObject(iconinfo2.hbmMask, sizeof(bitmap), &bitmap), "GetObject failed\n"); + ok(bitmap.bmType == 0, "\n"); + ok(bitmap.bmWidth == 8, "\n"); + ok(bitmap.bmHeight == 16, "\n"); + ok(bitmap.bmWidthBytes == 2, "\n"); + ok(bitmap.bmPlanes == 1, "\n"); + ok(bitmap.bmBitsPixel == 1, "\n"); + ok(bitmap.bmBits == NULL, "\n"); + + ok(GetObject(iconinfo2.hbmColor, sizeof(bitmap), &bitmap), "GetObject failed\n"); + ok(bitmap.bmType == 0, "\n"); + ok(bitmap.bmWidth == 8, "\n"); + ok(bitmap.bmHeight == 16, "\n"); + ok(bitmap.bmWidthBytes == 8 * bitmap.bmBitsPixel / 8, "\n"); + ok(bitmap.bmPlanes == 1, "\n"); + ok(bitmap.bmBitsPixel == 32, "\n"); + ok(bitmap.bmBits == NULL, "\n"); + + DeleteObject(iconinfo.hbmMask); + iconinfo.hbmMask = NULL; + hicon = CreateIconIndirect(&iconinfo); + ok(hicon == 0, "should fail\n"); + + DeleteObject(iconinfo.hbmColor); + iconinfo.hbmColor = CreateCompatibleBitmap(GetDC(0), 16, 16); + hicon = CreateIconIndirect(&iconinfo); + ok(hicon == 0, "should fail\n"); + + iconinfo.hbmMask = CreateCompatibleBitmap(GetDC(0), 8, 16); + hicon = CreateIconIndirect(&iconinfo); + ok(hicon != 0, "should not fail\n"); + + ok(GetIconInfo(hicon, &iconinfo2), "\n"); + + ok(GetObject(iconinfo2.hbmMask, sizeof(bitmap), &bitmap), "GetObject failed\n"); + ok(bitmap.bmType == 0, "\n"); + ok(bitmap.bmWidth == 8, "%ld\n", bitmap.bmWidth); + ok(bitmap.bmHeight == 16, "%ld\n", bitmap.bmHeight); + ok(bitmap.bmWidthBytes == 2, "%ld\n", bitmap.bmWidthBytes); + ok(bitmap.bmPlanes == 1, "%d\n", bitmap.bmPlanes); + ok(bitmap.bmBitsPixel == 1, "%d\n", bitmap.bmBitsPixel); + ok(bitmap.bmBits == NULL, "\n"); + + ok(GetObject(iconinfo2.hbmColor, sizeof(bitmap), &bitmap), "GetObject failed\n"); + ok(bitmap.bmType == 0, "\n"); + ok(bitmap.bmWidth == 8, "%ld\n", bitmap.bmWidth); + ok(bitmap.bmHeight == 16, "%ld\n", bitmap.bmHeight); + ok(bitmap.bmWidthBytes == 32, "%ld\n", bitmap.bmWidthBytes); + ok(bitmap.bmPlanes == 1, "%d\n", bitmap.bmPlanes); + ok(bitmap.bmBitsPixel == 32, "%d\n", bitmap.bmBitsPixel); + ok(bitmap.bmBits == NULL, "\n"); + + +} + + +START_TEST(GetIconInfo) +{ + HCURSOR hcursor; + HICON hicon; + ICONINFO iconinfo2; + BITMAP bitmap; + DWORD data[] = {0, 0, 0, 0, 0, 0}; + + Test_GetIconInfo(0); + Test_GetIconInfo(1); + + hcursor = LoadCursor(NULL, IDC_APPSTARTING); + ok(hcursor != 0, "should not fail\n"); + ok(GetIconInfo(hcursor, &iconinfo2), "\n"); + ok(iconinfo2.fIcon == 0, "\n"); + ok(iconinfo2.xHotspot == 0, "%ld\n", iconinfo2.xHotspot); + ok(iconinfo2.yHotspot == 8, "%ld\n", iconinfo2.yHotspot); + ok(iconinfo2.hbmMask != NULL, "\n"); + ok(iconinfo2.hbmColor != NULL, "\n"); + + ok(GetObject(iconinfo2.hbmMask, sizeof(bitmap), &bitmap), "GetObject failed\n"); + ok(bitmap.bmType == 0, "\n"); + ok(bitmap.bmWidth == 32, "%ld\n", bitmap.bmWidth); + ok(bitmap.bmHeight == 32, "\n"); + ok(bitmap.bmWidthBytes == 4, "\n"); + ok(bitmap.bmPlanes == 1, "\n"); + ok(bitmap.bmBitsPixel == 1, "\n"); + ok(bitmap.bmBits == NULL, "\n"); + + ok(GetObject(iconinfo2.hbmColor, sizeof(bitmap), &bitmap), "GetObject failed\n"); + ok(bitmap.bmType == 0, "\n"); + ok(bitmap.bmWidth == 32, "\n"); + ok(bitmap.bmHeight == 32, "\n"); + ok(bitmap.bmWidthBytes == 32 * bitmap.bmBitsPixel / 8, "\n"); + ok(bitmap.bmPlanes == 1, "\n"); + ok(bitmap.bmBitsPixel == 32, "\n"); + ok(bitmap.bmBits == NULL, "\n"); + + hcursor = CreateCursor(NULL, 1, 2, 4, 4, data, data); + ok(hcursor != 0, "should not fail\n"); + ok(GetIconInfo(hcursor, &iconinfo2), "\n"); + ok(iconinfo2.fIcon == 0, "\n"); + ok(iconinfo2.xHotspot == 1, "%ld\n", iconinfo2.xHotspot); + ok(iconinfo2.yHotspot == 2, "%ld\n", iconinfo2.yHotspot); + ok(iconinfo2.hbmMask != NULL, "\n"); + ok(iconinfo2.hbmColor == NULL, "\n"); + + ok(GetObject(iconinfo2.hbmMask, sizeof(bitmap), &bitmap), "GetObject failed\n"); + ok(bitmap.bmType == 0, "\n"); + ok(bitmap.bmWidth == 4, "%ld\n", bitmap.bmWidth); + ok(bitmap.bmHeight == 8, "%ld\n", bitmap.bmHeight); + ok(bitmap.bmWidthBytes == 2, "%ld\n", bitmap.bmWidthBytes); + ok(bitmap.bmPlanes == 1, "\n"); + ok(bitmap.bmBitsPixel == 1, "\n"); + ok(bitmap.bmBits == NULL, "\n"); + + + hicon = CreateIcon(0, 4, 4, 1, 1, (PBYTE)data, (PBYTE)data); + ok(hicon != 0, "should not fail\n"); + + ok(GetIconInfo(hicon, &iconinfo2), "\n"); + ok(iconinfo2.fIcon == 0, "\n"); + ok(iconinfo2.xHotspot == 2, "%ld\n", iconinfo2.xHotspot); + ok(iconinfo2.yHotspot == 2, "%ld\n", iconinfo2.yHotspot); + ok(iconinfo2.hbmMask != NULL, "\n"); + ok(iconinfo2.hbmColor == NULL, "\n"); + +} + + Propchange: trunk/rostests/apitests/gdi32/CreateIconIndirect.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/apitests/gdi32/GetRandomRgn.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32/GetRandomR…
============================================================================== --- trunk/rostests/apitests/gdi32/GetRandomRgn.c (added) +++ trunk/rostests/apitests/gdi32/GetRandomRgn.c [iso-8859-1] Mon Apr 23 10:42:22 2012 @@ -1,0 +1,370 @@ +/* + * PROJECT: ReactOS api tests + * LICENSE: GPL - See COPYING in the top level directory + * PURPOSE: Test for ... + * PROGRAMMERS: Timo Kreuzer + */ + +#include <stdio.h> +#include <wine/test.h> +#include <windows.h> + +#define CLIPRGN 1 +#define METARGN 2 +#define APIRGN 3 +#define SYSRGN 4 +#define RGN5 5 + +#define ok_int(x, exp) \ + ok((x) == (exp), "Failed test in line %d: value %s expected 0x%x, got 0x%x\n", \ + __LINE__, #x, exp, x) + +#define ok_long(x, exp) \ + ok((x) == (exp), "Failed test in line %d: value %s expected 0x%lx, got 0x%lx\n", \ + __LINE__, #x, exp, x) + +HWND ghwnd; +HDC ghdcWindow; + +void Test_GetRandomRgn_Params() +{ + HDC hdc; + HRGN hrgn; + INT ret; + + hdc = CreateCompatibleDC(0); + if (!hdc) + { + printf("Coun't create a dc\n"); + return; + } + + hrgn = CreateRectRgn(11, 17, 23, 42); + if (!hrgn) + { + printf("Coun't create a region\n"); + return; + } + + SetLastError(0xbadbad00); + ret = GetRandomRgn(NULL, NULL, 0); + ok_int(ret, -1); + ok_long(GetLastError(), 0xbadbad00); + + SetLastError(0xbadbad00); + ret = GetRandomRgn(NULL, NULL, CLIPRGN); + ok_int(ret, -1); + ok_long(GetLastError(), 0xbadbad00); + + SetLastError(0xbadbad00); + ret = GetRandomRgn(NULL, hrgn, 0); + ok_int(ret, -1); + ok_long(GetLastError(), 0xbadbad00); + + SetLastError(0xbadbad00); + ret = GetRandomRgn(NULL, hrgn, CLIPRGN); + ok_int(ret, -1); + ok_long(GetLastError(), 0xbadbad00); + + SetLastError(0xbadbad00); + ret = GetRandomRgn(hdc, NULL, 0); + ok_int(ret, 0); + ok_long(GetLastError(), 0xbadbad00); + + SetLastError(0xbadbad00); + ret = GetRandomRgn(hdc, NULL, CLIPRGN); + ok_int(ret, 0); + ok_long(GetLastError(), 0xbadbad00); + + SetLastError(0xbadbad00); + ret = GetRandomRgn(hdc, hrgn, 0); + ok_int(ret, 0); + ok_long(GetLastError(), 0xbadbad00); + + SetLastError(0xbadbad00); + ret = GetRandomRgn(hdc, hrgn, 5); + ok_int(ret, 1); + ok_long(GetLastError(), 0xbadbad00); + + SetLastError(0xbadbad00); + ret = GetRandomRgn(hdc, hrgn, 6); + ok_int(ret, 0); + ok_long(GetLastError(), 0xbadbad00); + + SetLastError(0xbadbad00); + ret = GetRandomRgn(hdc, hrgn, 27); + ok_int(ret, 0); + ok_long(GetLastError(), 0xbadbad00); + + SetLastError(0xbadbad00); + ret = GetRandomRgn(hdc, hrgn, -1); + ok_int(ret, 0); + ok_long(GetLastError(), 0xbadbad00); + + SetLastError(0xbadbad00); + ret = GetRandomRgn(hdc, hrgn, CLIPRGN); + ok_int(ret, 0); + ok_long(GetLastError(), 0xbadbad00); + + SetLastError(0xbadbad00); + ret = GetRandomRgn((HDC)0x123, hrgn, CLIPRGN); + ok_int(ret, -1); + ok_long(GetLastError(), 0xbadbad00); + + DeleteObject(hrgn); + DeleteDC(hdc); +} + +void Test_GetRandomRgn_CLIPRGN() +{ + HDC hdc; + HRGN hrgn1, hrgn2; + INT ret; + RECT rect; + + hrgn1 = CreateRectRgn(11, 17, 23, 42); + if (!hrgn1) + { + printf("Coun't create a region\n"); + return; + } + + hdc = CreateCompatibleDC(0); + if (!hdc) + { + printf("Coun't create a dc\n"); + return; + } + + ret = GetRandomRgn(hdc, hrgn1, CLIPRGN); + ok_int(ret, 0); + GetRgnBox(hrgn1, &rect); + ok_long(rect.left, 11); + ok_long(rect.top, 17); + ok_long(rect.right, 23); + ok_long(rect.bottom, 42); + + hrgn2 = CreateRectRgn(1, 2, 3, 4); + SelectClipRgn(hdc, hrgn2); + DeleteObject(hrgn2); + ret = GetRandomRgn(hdc, hrgn1, CLIPRGN); + ok_int(ret, 1); + GetRgnBox(hrgn1, &rect); + ok_long(rect.left, 1); + ok_long(rect.top, 2); + ok_long(rect.right, 3); + ok_long(rect.bottom, 4); + + hrgn2 = CreateRectRgn(2, 3, 4, 5); + SelectClipRgn(ghdcWindow, hrgn2); + DeleteObject(hrgn2); + ret = GetRandomRgn(ghdcWindow, hrgn1, CLIPRGN); + ok_int(ret, 1); + GetRgnBox(hrgn1, &rect); + ok_long(rect.left, 2); + ok_long(rect.top, 3); + ok_long(rect.right, 4); + ok_long(rect.bottom, 5); + + MoveWindow(ghwnd, 200, 400, 100, 100, 0); + + ret = GetRandomRgn(ghdcWindow, hrgn1, CLIPRGN); + ok_int(ret, 1); + GetRgnBox(hrgn1, &rect); + ok_long(rect.left, 2); + ok_long(rect.top, 3); + ok_long(rect.right, 4); + ok_long(rect.bottom, 5); + + + DeleteObject(hrgn1); + DeleteDC(hdc); +} + +void Test_GetRandomRgn_METARGN() +{ +} + +void Test_GetRandomRgn_APIRGN() +{ +} + +void Test_GetRandomRgn_SYSRGN() +{ + HDC hdc; + HRGN hrgn1, hrgn2; + INT ret; + RECT rect, rect2; + HBITMAP hbmp; + + hrgn1 = CreateRectRgn(11, 17, 23, 42); + if (!hrgn1) + { + printf("Coun't create a region\n"); + return; + } + + hdc = CreateCompatibleDC(0); + if (!hdc) + { + printf("Coun't create a dc\n"); + return; + } + + ret = GetRandomRgn(hdc, hrgn1, SYSRGN); + ok_int(ret, 1); + GetRgnBox(hrgn1, &rect); + ok_long(rect.left, 0); + ok_long(rect.top, 0); + ok_long(rect.right, 1); + ok_long(rect.bottom, 1); + + hrgn2 = CreateRectRgn(1, 2, 3, 4); + SelectClipRgn(hdc, hrgn2); + DeleteObject(hrgn2); + ret = GetRandomRgn(hdc, hrgn1, SYSRGN); + ok_int(ret, 1); + GetRgnBox(hrgn1, &rect); + ok_long(rect.left, 0); + ok_long(rect.top, 0); + ok_long(rect.right, 1); + ok_long(rect.bottom, 1); + + hbmp = CreateCompatibleBitmap(hdc, 4, 7); + SelectObject(hdc, hbmp); + ret = GetRandomRgn(hdc, hrgn1, SYSRGN); + ok_int(ret, 1); + GetRgnBox(hrgn1, &rect); + ok_long(rect.left, 0); + ok_long(rect.top, 0); + ok_long(rect.right, 4); + ok_long(rect.bottom, 7); + DeleteObject(hbmp); + + MoveWindow(ghwnd, 100, 100, 100, 100, 0); + ret = GetRandomRgn(ghdcWindow, hrgn1, SYSRGN); + ok_int(ret, 1); + GetRgnBox(hrgn1, &rect); + DPtoLP(ghdcWindow, (LPPOINT)&rect, 2); + ok_long(rect.left, 104); + ok_long(rect.top, 124); + ok_long(rect.right, 209); + ok_long(rect.bottom, 196); + + MoveWindow(ghwnd, 200, 400, 200, 200, 0); + + ret = GetRandomRgn(ghdcWindow, hrgn1, SYSRGN); + ok_int(ret, 1); + GetRgnBox(hrgn1, &rect2); + DPtoLP(ghdcWindow, (LPPOINT)&rect2, 2); + ok_long(rect2.left, rect.left + 100); + ok_long(rect2.top, rect.top + 300); + ok_long(rect2.right, rect.right + 200 - 13); + ok_long(rect2.bottom, rect.bottom + 400); + + + DeleteObject(hrgn1); + DeleteDC(hdc); + +} + +void Test_GetRandomRgn_RGN5() +{ + HDC hdc; + HRGN hrgn1, hrgn2; + INT ret; + RECT rect, rect2; + HBITMAP hbmp; + + hrgn1 = CreateRectRgn(11, 17, 23, 42); + if (!hrgn1) + { + printf("Coun't create a region\n"); + return; + } + + hdc = CreateCompatibleDC(0); + if (!hdc) + { + printf("Coun't create a dc\n"); + return; + } + + ret = GetRandomRgn(hdc, hrgn1, RGN5); + ok_int(ret, 1); + GetRgnBox(hrgn1, &rect); + ok_long(rect.left, 0); + ok_long(rect.top, 0); + ok_long(rect.right, 1); + ok_long(rect.bottom, 1); + + hrgn2 = CreateRectRgn(1, 2, 3, 4); + SelectClipRgn(hdc, hrgn2); + DeleteObject(hrgn2); + ret = GetRandomRgn(hdc, hrgn1, RGN5); + ok_int(ret, 1); + GetRgnBox(hrgn1, &rect); + ok_long(rect.left, 0); + ok_long(rect.top, 0); + ok_long(rect.right, 1); + ok_long(rect.bottom, 1); + + hbmp = CreateCompatibleBitmap(hdc, 4, 7); + SelectObject(hdc, hbmp); + ret = GetRandomRgn(hdc, hrgn1, SYSRGN); + ok_int(ret, 1); + GetRgnBox(hrgn1, &rect); + ok_long(rect.left, 0); + ok_long(rect.top, 0); + ok_long(rect.right, 4); + ok_long(rect.bottom, 7); + DeleteObject(hbmp); + + MoveWindow(ghwnd, 100, 100, 100, 100, 0); + ret = GetRandomRgn(ghdcWindow, hrgn1, RGN5); + ok_int(ret, 1); + GetRgnBox(hrgn1, &rect); + DPtoLP(ghdcWindow, (LPPOINT)&rect, 2); + ok_long(rect.left, 104); + ok_long(rect.top, 124); + ok_long(rect.right, 209); + ok_long(rect.bottom, 196); + + MoveWindow(ghwnd, 200, 400, 200, 200, 0); + + ret = GetRandomRgn(ghdcWindow, hrgn1, RGN5); + ok_int(ret, 1); + GetRgnBox(hrgn1, &rect2); + DPtoLP(ghdcWindow, (LPPOINT)&rect2, 2); + ok_long(rect2.left, rect.left + 100); + ok_long(rect2.top, rect.top + 300); + ok_long(rect2.right, rect.right + 200 - 13); + ok_long(rect2.bottom, rect.bottom + 400); + + + DeleteObject(hrgn1); + DeleteDC(hdc); +} + +START_TEST(GetRandomRgn) +{ + + /* Create a window */ + ghwnd = CreateWindowW(L"BUTTON", L"TestWindow", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 100, 100, 100, 100, NULL, NULL, 0, 0); + ghdcWindow = GetDC(ghwnd); + if (!ghdcWindow) + { + printf("No window dc\n"); + return; + } + + Test_GetRandomRgn_Params(); + Test_GetRandomRgn_CLIPRGN(); + Test_GetRandomRgn_METARGN(); + Test_GetRandomRgn_APIRGN(); + Test_GetRandomRgn_SYSRGN(); + Test_GetRandomRgn_RGN5(); + +} + Propchange: trunk/rostests/apitests/gdi32/GetRandomRgn.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/apitests/gdi32/PatBlt.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32/PatBlt.c?r…
============================================================================== --- trunk/rostests/apitests/gdi32/PatBlt.c (added) +++ trunk/rostests/apitests/gdi32/PatBlt.c [iso-8859-1] Mon Apr 23 10:42:22 2012 @@ -1,0 +1,109 @@ +/* + * PROJECT: ReactOS api tests + * LICENSE: GPL - See COPYING in the top level directory + * PURPOSE: Test for ... + * PROGRAMMERS: Timo Kreuzer + */ + +#include <stdio.h> +#include <wine/test.h> +#include <windows.h> + +HBITMAP ghbmpTarget; +PULONG gpulTargetBits; +HDC hdcTarget; + +#define ok_long(x, exp) \ + ok((x) == (exp), "Failed test in line %d: value %s expected 0x%lx, got 0x%lx\n", \ + __LINE__, #x, exp, x) + +void Test_BrushOrigin() +{ + ULONG aulBits[2] = {0x5555AAAA, 0}; + HBITMAP hbmp; + HBRUSH hbr; + BOOL ret; + + hbmp = CreateBitmap(2, 2, 1, 1, aulBits); + if (!hbmp) + { + printf("Couln not create a bitmap\n"); + return; + } + + hbr = CreatePatternBrush(hbmp); + if (!hbr) + { + printf("Couln not create a bitmap\n"); + return; + } + + if (!SelectObject(hdcTarget, hbr)) + { + printf("failed to select pattern brush\n"); + return; + } + + ret = PatBlt(hdcTarget, 0, 0, 2, 2, PATCOPY); + ok_long(ret, 1); + ok_long(gpulTargetBits[0], 0xffffff); + ok_long(gpulTargetBits[1], 0); + ok_long(gpulTargetBits[16], 0); + ok_long(gpulTargetBits[17], 0xffffff); + //printf("0x%lx, 0x%lx\n", gpulTargetBits[0], gpulTargetBits[1]); + + ret = PatBlt(hdcTarget, 1, 0, 2, 2, PATCOPY); + ok_long(ret, 1); + ok_long(gpulTargetBits[0], 0xffffff); + ok_long(gpulTargetBits[1], 0); + ok_long(gpulTargetBits[2], 0xffffff); + ok_long(gpulTargetBits[16], 0); + ok_long(gpulTargetBits[17], 0xffffff); + ok_long(gpulTargetBits[18], 0); + +} + +START_TEST(PatBlt) +{ + BITMAPINFO bmi; + + bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + bmi.bmiHeader.biWidth = 16; + bmi.bmiHeader.biHeight = -16; + bmi.bmiHeader.biPlanes = 1; + bmi.bmiHeader.biBitCount = 32; + bmi.bmiHeader.biCompression = BI_RGB; + bmi.bmiHeader.biSizeImage = 0; + bmi.bmiHeader.biXPelsPerMeter = 1; + bmi.bmiHeader.biYPelsPerMeter = 1; + bmi.bmiHeader.biClrUsed = 0; + bmi.bmiHeader.biClrImportant = 0; + ghbmpTarget = CreateDIBSection(NULL, + &bmi, + DIB_RGB_COLORS, + (PVOID*)&gpulTargetBits, + NULL, + 0); + if (!ghbmpTarget) + { + printf("Couln not create target bitmap\n"); + return; + } + + hdcTarget = CreateCompatibleDC(0); + if (!hdcTarget) + { + printf("Couln not create target dc\n"); + return; + } + + + if (!SelectObject(hdcTarget, ghbmpTarget)) + { + printf("Failed to select bitmap\n"); + return; + } + + Test_BrushOrigin(); +} + Propchange: trunk/rostests/apitests/gdi32/PatBlt.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rostests/apitests/gdi32/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32/testlist.c…
============================================================================== --- trunk/rostests/apitests/gdi32/testlist.c [iso-8859-1] (original) +++ trunk/rostests/apitests/gdi32/testlist.c [iso-8859-1] Mon Apr 23 10:42:22 2012 @@ -9,11 +9,13 @@ extern void func_AddFontResourceEx(void); extern void func_BeginPath(void); extern void func_CombineTransform(void); +extern void func_CreateBitmap(void); extern void func_CreateBitmapIndirect(void); extern void func_CreateCompatibleDC(void); extern void func_CreateDIBitmap(void); extern void func_CreateFont(void); extern void func_CreateFontIndirect(void); +extern void func_CreateIconIndirect(void); extern void func_CreatePen(void); extern void func_CreateRectRgn(void); extern void func_DPtoLP(void); @@ -39,10 +41,12 @@ extern void func_GetDIBits(void); extern void func_GetPixel(void); extern void func_GetObject(void); +extern void func_GetRandomRgn(void); extern void func_GetStockObject(void); extern void func_GetTextExtentExPoint(void); extern void func_GetTextFace(void); extern void func_MaskBlt(void); +extern void func_PatBlt(void); extern void func_Rectangle(void); extern void func_SelectObject(void); extern void func_SetDCPenColor(void); @@ -58,11 +62,13 @@ { "AddFontResourceEx", func_AddFontResourceEx }, { "BeginPath", func_BeginPath }, { "CombineTransform", func_CombineTransform }, + { "CreateBitmap", func_CreateBitmap }, { "CreateBitmapIndirect", func_CreateBitmapIndirect }, { "CreateCompatibleDC", func_CreateCompatibleDC }, { "CreateDIBitmap", func_CreateDIBitmap }, { "CreateFont", func_CreateFont }, { "CreateFontIndirect", func_CreateFontIndirect }, + { "CreateIconIndirect", func_CreateFontIndirect }, { "CreatePen", func_CreatePen }, { "CreateRectRgn", func_CreateRectRgn }, { "DPtoLP", func_DPtoLP }, @@ -88,10 +94,12 @@ { "GetDIBits", func_GetDIBits }, { "GetPixel", func_GetPixel }, { "GetObject", func_GetObject }, + { "GetRandomRgn", func_GetRandomRgn }, { "GetStockObject", func_GetStockObject }, { "GetTextExtentExPoint", func_GetTextExtentExPoint }, { "GetTextFace", func_GetTextFace }, { "MaskBlt", func_MaskBlt }, + { "PatBlt", func_PatBlt }, { "Rectangle", func_Rectangle }, { "SelectObject", func_SelectObject }, { "SetDCPenColor", func_SetDCPenColor },
12 years, 8 months
1
0
0
0
[tkreuzer] 56392: [WIN32K] - Fix calculation of the brush origin. The coordinates passed to EngBitBlt "defines which pixel in the mask corresponds to the upper left corner of the destination rectan...
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Apr 23 10:12:35 2012 New Revision: 56392 URL:
http://svn.reactos.org/svn/reactos?rev=56392&view=rev
Log: [WIN32K] - Fix calculation of the brush origin. The coordinates passed to EngBitBlt "defines which pixel in the mask corresponds to the upper left corner of the destination rectangle." Our code was using it as corresponding to the surface origin. The fix is currently only used when the new dib code is compiled. The old dib code is broken and expects the broken behaviour Modified: trunk/reactos/win32ss/gdi/eng/bitblt.c trunk/reactos/win32ss/gdi/ntgdi/bitblt.c Modified: trunk/reactos/win32ss/gdi/eng/bitblt.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/bitblt.c?r…
============================================================================== --- trunk/reactos/win32ss/gdi/eng/bitblt.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/eng/bitblt.c [iso-8859-1] Mon Apr 23 10:12:35 2012 @@ -471,6 +471,13 @@ ClipRect.bottom = ClipRegion->rclBounds.bottom; if (RECTL_bIntersectRect(&CombinedRect, &OutputRect, &ClipRect)) { +#ifdef _USE_DIBLIB_ + if (BrushOrigin) + { + AdjustedBrushOrigin.x = BrushOrigin->x + CombinedRect.left - OutputRect.left; + AdjustedBrushOrigin.y = BrushOrigin->y + CombinedRect.top - OutputRect.top; + } +#endif Pt.x = InputPoint.x + CombinedRect.left - OutputRect.left; Pt.y = InputPoint.y + CombinedRect.top - OutputRect.top; Ret = (*BltRectFunc)(OutputObj, InputObj, Mask, ColorTranslation, @@ -511,6 +518,13 @@ ClipRect.bottom = RectEnum.arcl[i].bottom; if (RECTL_bIntersectRect(&CombinedRect, &OutputRect, &ClipRect)) { +#ifdef _USE_DIBLIB_ + if (BrushOrigin) + { + AdjustedBrushOrigin.x = BrushOrigin->x + CombinedRect.left - OutputRect.left; + AdjustedBrushOrigin.y = BrushOrigin->y + CombinedRect.top - OutputRect.top; + } +#endif Pt.x = InputPoint.x + CombinedRect.left - OutputRect.left; Pt.y = InputPoint.y + CombinedRect.top - OutputRect.top; Ret = (*BltRectFunc)(OutputObj, InputObj, Mask, @@ -546,6 +560,7 @@ BOOL bResult; RECTL rclClipped; RECTL rclSrc; + POINTL ptlBrush; PFN_DrvBitBlt pfnBitBlt; ASSERT(psoTrg); @@ -589,6 +604,16 @@ { psoSrc = NULL; psurfSrc = NULL; + } + + if (pptlBrush) + { +#ifdef _USE_DIBLIB_ + ptlBrush.x = pptlBrush->x + rclClipped.left - prclTrg->left; + ptlBrush.y = pptlBrush->y + rclClipped.top - prclTrg->top; +#else + ptlBrush = *pptlBrush; +#endif } /* Is the target surface device managed? */ @@ -623,7 +648,7 @@ (POINTL*)&rclSrc, pptlMask, pbo, - pptlBrush, + pptlBrush ? &ptlBrush : NULL, Rop4); // FIXME: cleanup temp surface! Modified: trunk/reactos/win32ss/gdi/ntgdi/bitblt.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/bitblt.c…
============================================================================== --- trunk/reactos/win32ss/gdi/ntgdi/bitblt.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/bitblt.c [iso-8859-1] Mon Apr 23 10:12:35 2012 @@ -778,9 +778,13 @@ DestRect.top += pdc->ptlDCOrig.y; DestRect.right += pdc->ptlDCOrig.x; DestRect.bottom += pdc->ptlDCOrig.y; - +#ifdef _USE_DIBLIB_ + BrushOrigin.x = pbrush->ptOrigin.x + pdc->ptlDCOrig.x + XLeft; + BrushOrigin.y = pbrush->ptOrigin.y + pdc->ptlDCOrig.y + YLeft; +#else BrushOrigin.x = pbrush->ptOrigin.x + pdc->ptlDCOrig.x; BrushOrigin.y = pbrush->ptOrigin.y + pdc->ptlDCOrig.y; +#endif DC_vPrepareDCsForBlit(pdc, DestRect, NULL, DestRect); @@ -881,6 +885,8 @@ return NtGdiMaskBlt(hDC, XLeft, YLeft, Width, Height, 0,0,0,0,0,0,ROP,0); } +if ((XLeft == 0) && (YLeft == 0) && (Width == 592) && (Height == 362)) __debugbreak(); + dc = DC_LockDc(hDC); if (dc == NULL) {
12 years, 8 months
1
0
0
0
[spetreolle] 56391: [ADVAPI32/SERVICES] Fix changing a service description in (R)ChangeServiceConfig2W. Fixes bad service description in Vmware Tools.
by spetreolle@svn.reactos.org
Author: spetreolle Date: Mon Apr 23 00:17:01 2012 New Revision: 56391 URL:
http://svn.reactos.org/svn/reactos?rev=56391&view=rev
Log: [ADVAPI32/SERVICES] Fix changing a service description in (R)ChangeServiceConfig2W. Fixes bad service description in Vmware Tools. Modified: trunk/reactos/base/system/services/rpcserver.c trunk/reactos/dll/win32/advapi32/service/scm.c Modified: trunk/reactos/base/system/services/rpcserver.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/rpcse…
============================================================================== --- trunk/reactos/base/system/services/rpcserver.c [iso-8859-1] (original) +++ trunk/reactos/base/system/services/rpcserver.c [iso-8859-1] Mon Apr 23 00:17:01 2012 @@ -4775,7 +4775,6 @@ LPSERVICE_DESCRIPTIONW lpServiceDescription; lpServiceDescription = (LPSERVICE_DESCRIPTIONW)Info.psd; - lpServiceDescription->lpDescription = (LPWSTR)((ULONG_PTR)lpServiceDescription + sizeof(LPSERVICE_DESCRIPTIONW)); if (lpServiceDescription != NULL && lpServiceDescription->lpDescription != NULL) Modified: trunk/reactos/dll/win32/advapi32/service/scm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/service…
============================================================================== --- trunk/reactos/dll/win32/advapi32/service/scm.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/service/scm.c [iso-8859-1] Mon Apr 23 00:17:01 2012 @@ -229,7 +229,7 @@ switch (dwInfoLevel) { case SERVICE_CONFIG_DESCRIPTION: - Info.psd = (LPSERVICE_DESCRIPTIONW)&lpInfo; + Info.psd = (LPSERVICE_DESCRIPTIONW)lpInfo; break; case SERVICE_CONFIG_FAILURE_ACTIONS: @@ -543,7 +543,7 @@ LPCSTR lpStr; TRACE("CreateServiceA() called\n"); - TRACE("%p %s %s\n", hSCManager, + TRACE("%p %s %s\n", hSCManager, lpServiceName, lpDisplayName); if (!hSCManager) @@ -631,7 +631,7 @@ LPCWSTR lpStr; TRACE("CreateServiceW() called\n"); - TRACE("%p %S %S\n", hSCManager, + TRACE("%p %S %S\n", hSCManager, lpServiceName, lpDisplayName); if (!hSCManager)
12 years, 8 months
1
0
0
0
[ekohl] 56390: [USETUP] Treat REG_DWORD values in inf files as unsigned values.
by ekohl@svn.reactos.org
Author: ekohl Date: Sun Apr 22 22:40:43 2012 New Revision: 56390 URL:
http://svn.reactos.org/svn/reactos?rev=56390&view=rev
Log: [USETUP] Treat REG_DWORD values in inf files as unsigned values. Modified: trunk/reactos/base/setup/usetup/registry.c Modified: trunk/reactos/base/setup/usetup/registry.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/registry…
============================================================================== --- trunk/reactos/base/setup/usetup/registry.c [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/registry.c [iso-8859-1] Sun Apr 22 22:40:43 2012 @@ -306,7 +306,7 @@ if (Type == REG_DWORD) { - ULONG dw = Str ? wcstol (Str, NULL, 0) : 0; + ULONG dw = Str ? wcstoul (Str, NULL, 0) : 0; DPRINT("setting dword %wZ to %lx\n", ValueName, dw);
12 years, 8 months
1
0
0
0
[tfaber] 56389: [AFD/FORMATTING] - Try to fix indentation nightmare
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Apr 22 13:11:54 2012 New Revision: 56389 URL:
http://svn.reactos.org/svn/reactos?rev=56389&view=rev
Log: [AFD/FORMATTING] - Try to fix indentation nightmare Modified: trunk/reactos/drivers/network/afd/afd/bind.c trunk/reactos/drivers/network/afd/afd/connect.c trunk/reactos/drivers/network/afd/afd/context.c trunk/reactos/drivers/network/afd/afd/event.c trunk/reactos/drivers/network/afd/afd/info.c trunk/reactos/drivers/network/afd/afd/listen.c trunk/reactos/drivers/network/afd/afd/lock.c trunk/reactos/drivers/network/afd/afd/main.c trunk/reactos/drivers/network/afd/afd/read.c trunk/reactos/drivers/network/afd/afd/select.c trunk/reactos/drivers/network/afd/afd/tdi.c trunk/reactos/drivers/network/afd/afd/tdiconn.c trunk/reactos/drivers/network/afd/afd/write.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/drivers/network/afd/afd/bind.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/bi…
Modified: trunk/reactos/drivers/network/afd/afd/connect.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/co…
Modified: trunk/reactos/drivers/network/afd/afd/context.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/co…
Modified: trunk/reactos/drivers/network/afd/afd/event.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/ev…
Modified: trunk/reactos/drivers/network/afd/afd/info.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/in…
Modified: trunk/reactos/drivers/network/afd/afd/listen.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/li…
Modified: trunk/reactos/drivers/network/afd/afd/lock.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/lo…
Modified: trunk/reactos/drivers/network/afd/afd/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/ma…
Modified: trunk/reactos/drivers/network/afd/afd/read.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/re…
Modified: trunk/reactos/drivers/network/afd/afd/select.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/se…
Modified: trunk/reactos/drivers/network/afd/afd/tdi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/td…
Modified: trunk/reactos/drivers/network/afd/afd/tdiconn.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/td…
Modified: trunk/reactos/drivers/network/afd/afd/write.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/wr…
12 years, 8 months
1
0
0
0
[tkreuzer] 56388: [DIBLIB] Fix calculation of pattern pointer [WIN32K] Fix (almost) calculation of pattern origin. There's still a bugger left.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Apr 21 21:00:08 2012 New Revision: 56388 URL:
http://svn.reactos.org/svn/reactos?rev=56388&view=rev
Log: [DIBLIB] Fix calculation of pattern pointer [WIN32K] Fix (almost) calculation of pattern origin. There's still a bugger left. Modified: trunk/reactos/win32ss/gdi/diblib/DibLib_BitBlt.h trunk/reactos/win32ss/gdi/eng/bitblt_new.c Modified: trunk/reactos/win32ss/gdi/diblib/DibLib_BitBlt.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/diblib/DibLib_…
============================================================================== --- trunk/reactos/win32ss/gdi/diblib/DibLib_BitBlt.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/diblib/DibLib_BitBlt.h [iso-8859-1] Sat Apr 21 21:00:08 2012 @@ -44,10 +44,7 @@ #if __USES_PATTERN pjPatBase = pBltData->siPat.pjBase; pjPatBase += pBltData->siPat.ptOrig.y * pBltData->siPat.lDelta; - pjPattern = pjPatBase + pBltData->siPat.ptOrig.x * _DEST_BPP / 8; - _CALCSHIFT(_DEST_BPP, &jPatShift, pBltData->siPat.ptOrig.x); cPatLines = pBltData->ulPatHeight - pBltData->siPat.ptOrig.y; - cPatRows = pBltData->ulPatWidth - pBltData->siPat.ptOrig.x; #endif pjDestBase = pBltData->siDst.pjBase; #if __USES_SOURCE @@ -68,6 +65,11 @@ #if __USES_MASK pjMask = pjMaskBase; _CALCSHIFT_1(&jMskShift, pBltData->siMsk.ptOrig.x); +#endif +#if __USES_PATTERN + pjPattern = pjPatBase + pBltData->siPat.ptOrig.x * _DEST_BPP / 8; + _CALCSHIFT(_DEST_BPP, &jPatShift, pBltData->siPat.ptOrig.x); + cPatRows = pBltData->ulPatWidth - pBltData->siPat.ptOrig.x; #endif /* Loop all rows */ Modified: trunk/reactos/win32ss/gdi/eng/bitblt_new.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/bitblt_new…
============================================================================== --- trunk/reactos/win32ss/gdi/eng/bitblt_new.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/eng/bitblt_new.c [iso-8859-1] Sat Apr 21 21:00:08 2012 @@ -72,10 +72,22 @@ { /* Calculate start point and bitpointer for pattern */ pbltdata->siPat.ptOrig.x = (pptlPat->x + cx) % psizlPat->cx; - pbltdata->siPat.ptOrig.y = (pptlPat->x + cy) % psizlPat->cy; + pbltdata->siPat.ptOrig.y = (pptlPat->y + cy) % psizlPat->cy; pbltdata->siPat.pjBase = pbltdata->siPat.pvScan0; - pbltdata->siPat.pjBase += pbltdata->siPat.ptOrig.y * pbltdata->siPat.lDelta; - pbltdata->siPat.pjBase += pbltdata->siPat.ptOrig.x * pbltdata->siPat.jBpp / 8; + + /* Check for bottom-up case */ + if (pbltdata->dy < 0) + { + pbltdata->siPat.pjBase += (psizlPat->cy - 1) * pbltdata->siPat.lDelta; + pbltdata->siPat.ptOrig.y = psizlPat->cy - 1 - pbltdata->siPat.ptOrig.y; + } + + /* Check for right-to-left case */ + if (pbltdata->siDst.iFormat == 0) + { + pbltdata->siPat.pjBase += (psizlPat->cx - 1) * pbltdata->siMsk.jBpp / 8; + pbltdata->siPat.ptOrig.x = psizlPat->cx - 1 - pbltdata->siPat.ptOrig.x; + } } } @@ -369,7 +381,7 @@ { BOOL bResult; RECTL rcClipped; - POINTL ptOffset, ptSrc, ptMask; + POINTL ptOffset, ptSrc, ptMask, ptBrush; SIZEL sizTrg; PFN_DrvBitBlt pfnBitBlt; @@ -460,6 +472,14 @@ ptSrc.y += ptOffset.y; ptMask.x += ptOffset.x; ptMask.y += ptOffset.y; + + /* Check if we have a brush origin */ + if (pptlBrush) + { + /* calculate the new brush origin */ + ptBrush.x = pptlBrush->x + ptOffset.x; + ptBrush.y = pptlBrush->y + ptOffset.y; + } /* Recalculate the target rect */ rcClipped.left = prclTrg->left + ptOffset.x; @@ -499,7 +519,7 @@ psoSrc ? &ptSrc : NULL, psoMask ? &ptMask : NULL, pbo, - pptlBrush, + pptlBrush ? &ptBrush : NULL, rop4); // FIXME: cleanup temp surface!
12 years, 8 months
1
0
0
0
[tkreuzer] 56387: [DIBLIB] Fix a bug that caused all BitBlt functions with for a solid brush to ignore the XLATEOBJ
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Apr 21 18:42:14 2012 New Revision: 56387 URL:
http://svn.reactos.org/svn/reactos?rev=56387&view=rev
Log: [DIBLIB] Fix a bug that caused all BitBlt functions with for a solid brush to ignore the XLATEOBJ Modified: trunk/reactos/win32ss/gdi/diblib/DibLib_AllSrcBPP.h Modified: trunk/reactos/win32ss/gdi/diblib/DibLib_AllSrcBPP.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/diblib/DibLib_…
============================================================================== --- trunk/reactos/win32ss/gdi/diblib/DibLib_AllSrcBPP.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/diblib/DibLib_AllSrcBPP.h [iso-8859-1] Sat Apr 21 18:42:14 2012 @@ -41,6 +41,9 @@ #include "diblib_alldstbpp.h" #undef _SOURCE_BPP #undef _NextPixel_ + +#undef _DibXlate +#define _DibXlate(pBltData, ulColor) (pBltData->pfnXlate(pBltData->pxlo, ulColor)) PFN_DIBFUNCTION __PASTE(gapfn, __FUNCTIONNAME)[7][7] =
12 years, 8 months
1
0
0
0
[jimtabor] 56386: [Win32k] - Troubleshooting bug 5630, moved DestroyProcessClasses from process to thread since process is called first. This way, it is assured the class destruction is on queue, b...
by jimtabor@svn.reactos.org
Author: jimtabor Date: Sat Apr 21 18:18:59 2012 New Revision: 56386 URL:
http://svn.reactos.org/svn/reactos?rev=56386&view=rev
Log: [Win32k] - Troubleshooting bug 5630, moved DestroyProcessClasses from process to thread since process is called first. This way, it is assured the class destruction is on queue, but not before thread death. - Added a global pointer to be used in a later commit. - Warning: this does not fix bug 5630. Modified: trunk/reactos/win32ss/user/ntuser/class.c trunk/reactos/win32ss/user/ntuser/main.c trunk/reactos/win32ss/user/ntuser/ntuser.c trunk/reactos/win32ss/user/ntuser/ntuser.h Modified: trunk/reactos/win32ss/user/ntuser/class.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/class.…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/class.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/class.c [iso-8859-1] Sat Apr 21 18:18:59 2012 @@ -128,6 +128,7 @@ IntDestroyClass(IN OUT PCLS Class) { PDESKTOP pDesk; + /* There shouldn't be any clones anymore */ ASSERT(Class->cWndReferenceCount == 0); ASSERT(Class->pclsClone == NULL); @@ -620,9 +621,11 @@ { PCLS *PrevLink, BaseClass, CurrentClass; + ASSERT(Class->cWndReferenceCount >= 1); + BaseClass = Class->pclsBase; - if (--Class->cWndReferenceCount <= 0) + if (--Class->cWndReferenceCount == 0) { if (BaseClass == Class) { Modified: trunk/reactos/win32ss/user/ntuser/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/main.c…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/main.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/main.c [iso-8859-1] Sat Apr 21 18:18:59 2012 @@ -175,9 +175,6 @@ IntCleanupMenus(Process, ppiCurrent); IntCleanupCurIcons(Process, ppiCurrent); - /* no process windows should exist at this point, or the function will assert! */ - DestroyProcessClasses(ppiCurrent); - ppiCurrent->W32PF_flags &= ~W32PF_CLASSESREGISTERED; GDI_CleanupForProcess(Process); @@ -204,6 +201,8 @@ GdiPoolDestroy(ppiCurrent->pPoolDcAttr); GdiPoolDestroy(ppiCurrent->pPoolBrushAttr); GdiPoolDestroy(ppiCurrent->pPoolRgnAttr); + + if (gppiInputProvider == ppiCurrent) gppiInputProvider = NULL; TRACE_CH(UserProcess,"Freeing ppi 0x%x\n", ppiCurrent); @@ -432,7 +431,22 @@ DestroyTimersForThread(ptiCurrent); KeSetEvent(ptiCurrent->MessageQueue->NewMessages, IO_NO_INCREMENT, FALSE); UnregisterThreadHotKeys(Thread); +/* + if (IsListEmpty(&ptiCurrent->WindowListHead)) + { + ERR_CH(UserThread,"Thread Window List is Empty!\n"); + } +*/ co_DestroyThreadWindows(Thread); + + if (ppiCurrent && ppiCurrent->ptiList == ptiCurrent && !ptiCurrent->ptiSibling) + { + //ERR_CH(UserThread,"DestroyProcessClasses\n"); + /* no process windows should exist at this point, or the function will assert! */ + DestroyProcessClasses(ppiCurrent); + ppiCurrent->W32PF_flags &= ~W32PF_CLASSESREGISTERED; + } + IntBlockInput(ptiCurrent, FALSE); IntCleanupThreadCallbacks(ptiCurrent); Modified: trunk/reactos/win32ss/user/ntuser/ntuser.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/ntuser…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/ntuser.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/ntuser.c [iso-8859-1] Sat Apr 21 18:18:59 2012 @@ -11,6 +11,7 @@ /* GLOBALS *******************************************************************/ PTHREADINFO gptiCurrent = NULL; +PPROCESSINFO gppiInputProvider = NULL; ERESOURCE UserLock; ATOM AtomMessage; // Window Message atom. ATOM AtomWndObj; // Window Object atom. Modified: trunk/reactos/win32ss/user/ntuser/ntuser.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/ntuser…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/ntuser.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/ntuser.h [iso-8859-1] Sat Apr 21 18:18:59 2012 @@ -13,6 +13,7 @@ extern PSERVERINFO gpsi; extern PTHREADINFO gptiCurrent; extern PPROCESSINFO ppiScrnSaver; +extern PPROCESSINFO gppiInputProvider; INIT_FUNCTION NTSTATUS NTAPI InitUserImpl(VOID); VOID FASTCALL CleanupUserImpl(VOID);
12 years, 8 months
1
0
0
0
[tfaber] 56385: [NTOSKRNL] - Export base MCB functions
by tfaber@svn.reactos.org
Author: tfaber Date: Sat Apr 21 17:52:29 2012 New Revision: 56385 URL:
http://svn.reactos.org/svn/reactos?rev=56385&view=rev
Log: [NTOSKRNL] - Export base MCB functions Modified: trunk/reactos/ntoskrnl/ntoskrnl.spec Modified: trunk/reactos/ntoskrnl/ntoskrnl.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntoskrnl.spec?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ntoskrnl.spec [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ntoskrnl.spec [iso-8859-1] Sat Apr 21 17:52:29 2012 @@ -184,7 +184,7 @@ @ fastcall -arch=i386 ExiReleaseFastMutex(ptr) ExReleaseFastMutex @ fastcall -arch=i386 ExiTryToAcquireFastMutex(ptr) ExTryToAcquireFastMutex @ stdcall FsRtlAcquireFileExclusive(ptr) -;FsRtlAddBaseMcbEntry +@ stdcall FsRtlAddBaseMcbEntry(ptr long long long long long long) @ stdcall FsRtlAddLargeMcbEntry(ptr long long long long long long) @ stdcall FsRtlAddMcbEntry(ptr long long long) @ stdcall FsRtlAddToTunnelCache(ptr long long ptr ptr long long ptr) @@ -218,7 +218,7 @@ @ stdcall FsRtlFindInTunnelCache(ptr long long ptr ptr ptr ptr ptr) @ stdcall FsRtlFreeFileLock(ptr) @ stdcall FsRtlGetFileSize(ptr ptr) -;FsRtlGetNextBaseMcbEntry +@ stdcall FsRtlGetNextBaseMcbEntry(ptr long ptr ptr ptr) @ stdcall FsRtlGetNextFileLock(ptr long) @ stdcall FsRtlGetNextLargeMcbEntry(ptr long ptr ptr ptr) @ stdcall FsRtlGetNextMcbEntry(ptr long ptr ptr ptr) @@ -226,7 +226,7 @@ @ stdcall FsRtlIncrementCcFastReadNotPossible() @ stdcall FsRtlIncrementCcFastReadResourceMiss() @ stdcall FsRtlIncrementCcFastReadWait() -;FsRtlInitializeBaseMcb +@ stdcall FsRtlInitializeBaseMcb(ptr ptr) @ stdcall FsRtlInitializeFileLock(ptr ptr ptr) @ stdcall FsRtlInitializeLargeMcb(ptr long) @ stdcall FsRtlInitializeMcb(ptr long) @@ -242,10 +242,10 @@ @ stdcall FsRtlIsPagingFile(ptr) @ stdcall FsRtlIsTotalDeviceFailure(ptr) @ extern FsRtlLegalAnsiCharacterArray _FsRtlLegalAnsiCharacterArray -;FsRtlLookupBaseMcbEntry +@ stdcall FsRtlLookupBaseMcbEntry(ptr long long ptr ptr ptr ptr ptr) @ stdcall FsRtlLookupLargeMcbEntry(ptr long long ptr ptr ptr ptr ptr) -;FsRtlLookupLastBaseMcbEntry -;FsRtlLookupLastBaseMcbEntryAndIndex +@ stdcall FsRtlLookupLastBaseMcbEntry(ptr ptr ptr) +@ stdcall FsRtlLookupLastBaseMcbEntryAndIndex(ptr ptr ptr ptr) @ stdcall FsRtlLookupLastLargeMcbEntry(ptr ptr ptr) @ stdcall FsRtlLookupLastLargeMcbEntryAndIndex(ptr ptr ptr ptr) @ stdcall FsRtlLookupLastMcbEntry(ptr ptr ptr) @@ -269,7 +269,7 @@ @ stdcall FsRtlNotifyReportChange(ptr ptr ptr ptr long) @ stdcall FsRtlNotifyUninitializeSync(ptr) @ stdcall FsRtlNotifyVolumeEvent(ptr long) -;FsRtlNumberOfRunsInBaseMcb +@ stdcall FsRtlNumberOfRunsInBaseMcb(ptr) @ stdcall FsRtlNumberOfRunsInLargeMcb(ptr) @ stdcall FsRtlNumberOfRunsInMcb(ptr) @ stdcall FsRtlOplockFsctrl(ptr ptr long) @@ -283,21 +283,21 @@ @ stdcall FsRtlRegisterFileSystemFilterCallbacks(ptr ptr) @ stdcall FsRtlRegisterUncProvider(ptr ptr long) @ stdcall FsRtlReleaseFile(ptr) -;FsRtlRemoveBaseMcbEntry +@ stdcall FsRtlRemoveBaseMcbEntry(ptr long long long long) @ stdcall FsRtlRemoveLargeMcbEntry(ptr long long long long) @ stdcall FsRtlRemoveMcbEntry(ptr long long) @ stdcall FsRtlRemovePerFileObjectContext(ptr ptr ptr) @ stdcall FsRtlRemovePerStreamContext(ptr ptr ptr) -;FsRtlResetBaseMcb +@ stdcall FsRtlResetBaseMcb(ptr) @ stdcall FsRtlResetLargeMcb(ptr long) -;FsRtlSplitBaseMcb +@ stdcall FsRtlSplitBaseMcb(ptr long long long long) @ stdcall FsRtlSplitLargeMcb(ptr long long long long) @ stdcall FsRtlSyncVolumes(long long long) @ stdcall FsRtlTeardownPerStreamContexts(ptr) -;FsRtlTruncateBaseMcb +@ stdcall FsRtlTruncateBaseMcb(ptr long long) @ stdcall FsRtlTruncateLargeMcb(ptr long long) @ stdcall FsRtlTruncateMcb(ptr long) -;FsRtlUninitializeBaseMcb +@ stdcall FsRtlUninitializeBaseMcb(ptr) @ stdcall FsRtlUninitializeFileLock(ptr) @ stdcall FsRtlUninitializeLargeMcb(ptr) @ stdcall FsRtlUninitializeMcb(ptr)
12 years, 8 months
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
16
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Results per page:
10
25
50
100
200