winehq.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
February
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
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
July 2008
----- 2025 -----
February 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
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
1114 discussions
Start a n
N
ew thread
Jacek Caban : mshtml: Set doc to NULL in NSContainer_Release.
by Alexandre Julliard
03 Jul '08
03 Jul '08
Module: wine Branch: master Commit: f9e3f81de2403a91c4a6ab3b86ae4cb015c906f0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f9e3f81de2403a91c4a6ab3b8…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Jul 2 18:43:22 2008 +0200 mshtml: Set doc to NULL in NSContainer_Release. --- dlls/mshtml/nsembed.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c index 73aba16..78563d3 100644 --- a/dlls/mshtml/nsembed.c +++ b/dlls/mshtml/nsembed.c @@ -1748,6 +1748,8 @@ void NSContainer_Release(NSContainer *This) { TRACE("(%p)\n", This); + This->doc = NULL; + ShowWindow(This->hwnd, SW_HIDE); SetParent(This->hwnd, NULL);
1
0
0
0
Juan Lang : inetmib1: Fix test failures on some systems.
by Alexandre Julliard
03 Jul '08
03 Jul '08
Module: wine Branch: master Commit: 52fcae9909a480f66b5667d4652e89f652bc7643 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=52fcae9909a480f66b5667d46…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Wed Jul 2 08:15:20 2008 -0700 inetmib1: Fix test failures on some systems. --- dlls/inetmib1/tests/main.c | 29 +++++++++++++++++------------ 1 files changed, 17 insertions(+), 12 deletions(-) diff --git a/dlls/inetmib1/tests/main.c b/dlls/inetmib1/tests/main.c index e2e63f2..6eead89 100644 --- a/dlls/inetmib1/tests/main.c +++ b/dlls/inetmib1/tests/main.c @@ -157,7 +157,7 @@ static void testQuery(void) SnmpUtilOidCpy(&vars2[2].name, &vars[2].name); list.list = vars2; moreData = TRUE; - entry = 1; + entry = 0; do { SetLastError(0xdeadbeef); error = 0xdeadbeef; @@ -182,28 +182,33 @@ static void testQuery(void) moreData = FALSE; if (moreData) { + UINT lastID; + /* Check the OIDs. For these types of values (display strings and - * integers) they increase by 1 for each element of the table. + * integers) they should increase by 1 for each element of the table + * according to RFC 1158. Windows sometimes has a weird value in the + * table, so allow any value as long as it's greater than the previous + * value on Windows. */ ok(vars2[0].name.idLength == vars[0].name.idLength + 1, "expected length %d, got %d\n", vars[0].name.idLength + 1, vars2[0].name.idLength); - ok(vars2[0].name.ids[vars2[0].name.idLength - 1] == entry, - "expected %d, got %d\n", entry, - vars2[0].name.ids[vars2[0].name.idLength - 1]); + lastID = vars2[0].name.ids[vars2[0].name.idLength - 1]; + ok(lastID == entry + 1 || broken(lastID > entry), + "expected %d, got %d\n", entry + 1, lastID); ok(vars2[1].name.idLength == vars[1].name.idLength + 1, "expected length %d, got %d\n", vars[1].name.idLength + 1, vars2[1].name.idLength); - ok(vars2[1].name.ids[vars2[1].name.idLength - 1] == entry, - "expected %d, got %d\n", entry, - vars2[1].name.ids[vars2[1].name.idLength - 1]); + lastID = vars2[1].name.ids[vars2[1].name.idLength - 1]; + ok(lastID == entry + 1 || broken(lastID > entry), + "expected %d, got %d\n", entry + 1, lastID); ok(vars2[2].name.idLength == vars[2].name.idLength + 1, "expected length %d, got %d\n", vars[2].name.idLength + 1, vars2[2].name.idLength); - ok(vars2[2].name.ids[vars2[2].name.idLength - 1] == entry, - "expected %d, got %d\n", entry, - vars2[2].name.ids[vars2[2].name.idLength - 1]); - ++entry; + lastID = vars2[2].name.ids[vars2[2].name.idLength - 1]; + ok(lastID == entry + 1 || broken(lastID > entry), + "expected %d, got %d\n", entry + 1, lastID); + entry = lastID; /* Check the types while we're at it */ ok(vars2[0].value.asnType == ASN_OCTETSTRING, "expected ASN_OCTETSTRING, got %02x\n", vars2[0].value.asnType);
1
0
0
0
Alistair Leslie-Hughes : msxml3: Added support to create an Attribute in createNode.
by Alexandre Julliard
03 Jul '08
03 Jul '08
Module: wine Branch: master Commit: d659e63d73d7f3dffb263bb0132709533f642cf8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d659e63d73d7f3dffb263bb01…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Wed Jul 2 22:49:50 2008 +1000 msxml3: Added support to create an Attribute in createNode. --- dlls/msxml3/domdoc.c | 11 +++++++++++ dlls/msxml3/tests/domdoc.c | 18 ++++++++++++++++++ 2 files changed, 29 insertions(+), 0 deletions(-) diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c index c860d90..07166ca 100644 --- a/dlls/msxml3/domdoc.c +++ b/dlls/msxml3/domdoc.c @@ -1224,6 +1224,17 @@ static HRESULT WINAPI domdoc_createNode( *node = create_node(xmlnode); TRACE("created %p\n", xmlnode); break; + case NODE_ATTRIBUTE: + xmlnode = (xmlNode *)xmlNewProp(NULL, xml_name, NULL); + if(xmlnode) + { + xmlnode->doc = get_doc( This ); + + *node = (IXMLDOMNode*)create_attribute(xmlnode); + } + + TRACE("created %p\n", xmlnode); + break; default: FIXME("unhandled node type %d\n", node_type); diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index d5c463d..6f3e8e0 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -1491,6 +1491,24 @@ static void test_create(void) VariantClear(&var); SysFreeString(name); + /* Create an Attribute */ + V_VT(&var) = VT_I4; + V_I4(&var) = NODE_ATTRIBUTE; + str = SysAllocString( szAttribute ); + r = IXMLDOMDocument_createNode( doc, var, str, NULL, &node ); + ok( r == S_OK, "returns %08x\n", r ); + ok( node != NULL, "node was null\n"); + SysFreeString(str); + + if(r == S_OK) + { + r = IXMLDOMNode_get_nodeTypeString(node, &str); + ok( r == S_OK, "returns %08x\n", r ); + ok( !lstrcmpW( str, _bstr_("attribute") ), "incorrect nodeTypeString string\n"); + SysFreeString(str); + IXMLDOMNode_Release( node ); + } + IXMLDOMElement_Release( element ); IXMLDOMNode_Release( root ); IXMLDOMDocument_Release( doc );
1
0
0
0
Paul Vriens : quartz/tests: Make tests run on everything lower then Vista.
by Alexandre Julliard
03 Jul '08
03 Jul '08
Module: wine Branch: master Commit: 0435574aedfbc0dc0a47f9800d588c7e87fa076e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0435574aedfbc0dc0a47f9800…
Author: Paul Vriens <paul.vriens.wine(a)gmail.com> Date: Wed Jul 2 13:59:22 2008 +0200 quartz/tests: Make tests run on everything lower then Vista. --- dlls/quartz/tests/filtermapper.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/quartz/tests/filtermapper.c b/dlls/quartz/tests/filtermapper.c index e09497b..fb77eb8 100644 --- a/dlls/quartz/tests/filtermapper.c +++ b/dlls/quartz/tests/filtermapper.c @@ -271,8 +271,8 @@ static void test_legacy_filter_registration(void) lRet = StringFromGUID2(&clsidFilter, wszRegKey, MAX_PATH); ok(lRet > 0, "StringFromGUID2 failed\n"); - lRet = RegDeleteTreeW(hKey, wszRegKey); - ok(lRet == ERROR_SUCCESS, "RegDeleteTreeW failed with %x\n", HRESULT_FROM_WIN32(lRet)); + lRet = RegDeleteKeyW(hKey, wszRegKey); + ok(lRet == ERROR_SUCCESS, "RegDeleteKeyW failed with %x\n", HRESULT_FROM_WIN32(lRet)); if (hKey) RegCloseKey(hKey); hKey = NULL;
1
0
0
0
Huw Davies : gdiplus: Add some more region stubs.
by Alexandre Julliard
03 Jul '08
03 Jul '08
Module: wine Branch: master Commit: 9c3c516cc2a63a4367bf8decf9d883745c6503cc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9c3c516cc2a63a4367bf8decf…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Jul 2 11:53:54 2008 +0100 gdiplus: Add some more region stubs. --- dlls/gdiplus/gdiplus.spec | 24 ++++++------ dlls/gdiplus/region.c | 87 +++++++++++++++++++++++++++++++++++++++++++++ include/gdiplusflat.h | 12 ++++++ 3 files changed, 111 insertions(+), 12 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 4067873..7d38ab0 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -57,11 +57,11 @@ @ stdcall GdipCloneMatrix(ptr ptr) @ stdcall GdipClonePath(ptr ptr) @ stdcall GdipClonePen(ptr ptr) -@ stub GdipCloneRegion +@ stdcall GdipCloneRegion(ptr ptr) @ stdcall GdipCloneStringFormat(ptr ptr) @ stdcall GdipClosePathFigure(ptr) @ stdcall GdipClosePathFigures(ptr) -@ stub GdipCombineRegionPath +@ stdcall GdipCombineRegionPath(ptr ptr long) @ stdcall GdipCombineRegionRect(ptr ptr long) @ stdcall GdipCombineRegionRectI(ptr ptr long) @ stdcall GdipCombineRegionRegion(ptr ptr long) @@ -123,11 +123,11 @@ @ stdcall GdipCreatePen1(long long long ptr) @ stdcall GdipCreatePen2(ptr long long ptr) @ stdcall GdipCreateRegion(ptr) -@ stub GdipCreateRegionHrgn +@ stdcall GdipCreateRegionHrgn(ptr ptr) @ stdcall GdipCreateRegionPath(ptr ptr) @ stdcall GdipCreateRegionRect(ptr ptr) @ stdcall GdipCreateRegionRectI(ptr ptr) -@ stub GdipCreateRegionRgnData +@ stdcall GdipCreateRegionRgnData(ptr long ptr) @ stdcall GdipCreateSolidFill(long ptr) @ stdcall GdipCreateStreamOnFile(ptr long ptr) @ stdcall GdipCreateStringFormat(long long ptr) @@ -375,8 +375,8 @@ @ stub GdipGetPropertyItem @ stdcall GdipGetPropertyItemSize(ptr long ptr) @ stub GdipGetPropertySize -@ stub GdipGetRegionBounds -@ stub GdipGetRegionBoundsI +@ stdcall GdipGetRegionBounds(ptr ptr ptr) +@ stdcall GdipGetRegionBoundsI(ptr ptr ptr) @ stdcall GdipGetRegionData(ptr ptr long ptr) @ stdcall GdipGetRegionDataSize(ptr ptr) @ stdcall GdipGetRegionHRgn(ptr ptr ptr) @@ -415,9 +415,9 @@ @ stub GdipInitializePalette @ stub GdipInvertMatrix @ stub GdipIsClipEmpty -@ stub GdipIsEmptyRegion -@ stub GdipIsEqualRegion -@ stub GdipIsInfiniteRegion +@ stdcall GdipIsEmptyRegion(ptr ptr ptr) +@ stdcall GdipIsEqualRegion(ptr ptr ptr ptr) +@ stdcall GdipIsInfiniteRegion(ptr ptr ptr) @ stdcall GdipIsMatrixEqual(ptr ptr ptr) @ stdcall GdipIsMatrixIdentity(ptr ptr) @ stub GdipIsMatrixInvertible @@ -608,15 +608,15 @@ @ stdcall GdipTransformPath(ptr ptr) @ stub GdipTransformPoints @ stub GdipTransformPointsI -@ stub GdipTransformRegion +@ stdcall GdipTransformRegion(ptr ptr) @ stub GdipTranslateClip @ stub GdipTranslateClipI @ stub GdipTranslateLineTransform @ stdcall GdipTranslateMatrix(ptr long long long) @ stub GdipTranslatePathGradientTransform @ stub GdipTranslatePenTransform -@ stub GdipTranslateRegion -@ stub GdipTranslateRegionI +@ stdcall GdipTranslateRegion(ptr long long) +@ stdcall GdipTranslateRegionI(ptr long long) @ stub GdipTranslateTextureTransform @ stdcall GdipTranslateWorldTransform(ptr long long long) @ stdcall GdipVectorTransformMatrixPoints(ptr ptr long) diff --git a/dlls/gdiplus/region.c b/dlls/gdiplus/region.c index 92239ff..3d95723 100644 --- a/dlls/gdiplus/region.c +++ b/dlls/gdiplus/region.c @@ -67,6 +67,20 @@ WINE_DEFAULT_DEBUG_CHANNEL(gdiplus); * */ +GpStatus WINGDIPAPI GdipCloneRegion(GpRegion *region, GpRegion **clone) +{ + FIXME("(%p %p): stub\n", region, clone); + + *clone = NULL; + return NotImplemented; +} + +GpStatus WINGDIPAPI GdipCombineRegionPath(GpRegion *region, GpPath *path, CombineMode mode) +{ + FIXME("(%p %p %d): stub\n", region, path, mode); + return NotImplemented; +} + GpStatus WINGDIPAPI GdipCombineRegionRect(GpRegion *region, GDIPCONST GpRectF *rect, CombineMode mode) { @@ -120,12 +134,42 @@ GpStatus WINGDIPAPI GdipCreateRegionRectI(GDIPCONST GpRect *rect, GpRegion **reg return NotImplemented; } +GpStatus WINGDIPAPI GdipCreateRegionRgnData(GDIPCONST BYTE *data, INT size, GpRegion **region) +{ + FIXME("(%p, %d, %p): stub\n", data, size, region); + + *region = NULL; + return NotImplemented; +} + +GpStatus WINGDIPAPI GdipCreateRegionHrgn(HRGN hrgn, GpRegion **region) +{ + FIXME("(%p, %p): stub\n", hrgn, region); + + *region = NULL; + return NotImplemented; +} + GpStatus WINGDIPAPI GdipDeleteRegion(GpRegion *region) { FIXME("(%p): stub\n", region); return NotImplemented; } +GpStatus WINGDIPAPI GdipGetRegionBounds(GpRegion *region, GpGraphics *graphics, GpRectF *rect) +{ + FIXME("(%p, %p, %p): stub\n", region, graphics, rect); + + return NotImplemented; +} + +GpStatus WINGDIPAPI GdipGetRegionBoundsI(GpRegion *region, GpGraphics *graphics, GpRect *rect) +{ + FIXME("(%p, %p, %p): stub\n", region, graphics, rect); + + return NotImplemented; +} + GpStatus WINGDIPAPI GdipGetRegionData(GpRegion *region, BYTE *buffer, UINT size, UINT *needed) { FIXME("(%p, %p, %d, %p): stub\n", region, buffer, size, needed); @@ -148,6 +192,28 @@ GpStatus WINGDIPAPI GdipGetRegionHRgn(GpRegion *region, GpGraphics *graphics, HR return NotImplemented; } +GpStatus WINGDIPAPI GdipIsEmptyRegion(GpRegion *region, GpGraphics *graphics, BOOL *res) +{ + FIXME("(%p, %p, %p): stub\n", region, graphics, res); + + return NotImplemented; +} + +GpStatus WINGDIPAPI GdipIsEqualRegion(GpRegion *region, GpRegion *region2, GpGraphics *graphics, + BOOL *res) +{ + FIXME("(%p, %p, %p, %p): stub\n", region, region2, graphics, res); + + return NotImplemented; +} + +GpStatus WINGDIPAPI GdipIsInfiniteRegion(GpRegion *region, GpGraphics *graphics, BOOL *res) +{ + FIXME("(%p, %p, %p): stub\n", region, graphics, res); + + return NotImplemented; +} + GpStatus WINGDIPAPI GdipSetEmpty(GpRegion *region) { static int calls; @@ -167,3 +233,24 @@ GpStatus WINGDIPAPI GdipSetInfinite(GpRegion *region) return NotImplemented; } + +GpStatus WINGDIPAPI GdipTransformRegion(GpRegion *region, GpMatrix *matrix) +{ + FIXME("(%p, %p): stub\n", region, matrix); + + return NotImplemented; +} + +GpStatus WINGDIPAPI GdipTranslateRegion(GpRegion *region, REAL dx, REAL dy) +{ + FIXME("(%p, %f, %f): stub\n", region, dx, dy); + + return NotImplemented; +} + +GpStatus WINGDIPAPI GdipTranslateRegionI(GpRegion *region, INT dx, INT dy) +{ + FIXME("(%p, %d, %d): stub\n", region, dx, dy); + + return NotImplemented; +} diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 4a5146c..9799296 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -391,6 +391,8 @@ GpStatus WINGDIPAPI GdipCloneStringFormat(GDIPCONST GpStringFormat*,GpStringForm GpStatus WINGDIPAPI GdipGetDpiX(GpGraphics*,REAL*); GpStatus WINGDIPAPI GdipGetDpiY(GpGraphics*,REAL*); +GpStatus WINGDIPAPI GdipCloneRegion(GpRegion *, GpRegion **); +GpStatus WINGDIPAPI GdipCombineRegionPath(GpRegion *, GpPath *, CombineMode); GpStatus WINGDIPAPI GdipCombineRegionRect(GpRegion *, GDIPCONST GpRectF *, CombineMode); GpStatus WINGDIPAPI GdipCombineRegionRectI(GpRegion *, GDIPCONST GpRect *, CombineMode); GpStatus WINGDIPAPI GdipCombineRegionRegion(GpRegion *, GpRegion *, CombineMode); @@ -398,12 +400,22 @@ GpStatus WINGDIPAPI GdipCreateRegion(GpRegion **); GpStatus WINGDIPAPI GdipCreateRegionPath(GpPath *, GpRegion **); GpStatus WINGDIPAPI GdipCreateRegionRect(GDIPCONST GpRectF *, GpRegion **); GpStatus WINGDIPAPI GdipCreateRegionRectI(GDIPCONST GpRect *, GpRegion **); +GpStatus WINGDIPAPI GdipCreateRegionRgnData(GDIPCONST BYTE *, INT, GpRegion **); +GpStatus WINGDIPAPI GdipCreateRegionHrgn(HRGN, GpRegion **); GpStatus WINGDIPAPI GdipDeleteRegion(GpRegion *); +GpStatus WINGDIPAPI GdipGetRegionBounds(GpRegion *, GpGraphics *, GpRectF *); +GpStatus WINGDIPAPI GdipGetRegionBoundsI(GpRegion *, GpGraphics *, GpRect *); GpStatus WINGDIPAPI GdipGetRegionData(GpRegion *, BYTE *, UINT, UINT *); GpStatus WINGDIPAPI GdipGetRegionDataSize(GpRegion *, UINT *); GpStatus WINGDIPAPI GdipGetRegionHRgn(GpRegion *, GpGraphics *, HRGN *); +GpStatus WINGDIPAPI GdipIsEmptyRegion(GpRegion *, GpGraphics *, BOOL *); +GpStatus WINGDIPAPI GdipIsEqualRegion(GpRegion *, GpRegion *, GpGraphics *, BOOL *); +GpStatus WINGDIPAPI GdipIsInfiniteRegion(GpRegion *, GpGraphics *, BOOL *); GpStatus WINGDIPAPI GdipSetEmpty(GpRegion *); GpStatus WINGDIPAPI GdipSetInfinite(GpRegion *); +GpStatus WINGDIPAPI GdipTransformRegion(GpRegion *, GpMatrix *); +GpStatus WINGDIPAPI GdipTranslateRegion(GpRegion *, REAL, REAL); +GpStatus WINGDIPAPI GdipTranslateRegionI(GpRegion *, INT, INT); GpStatus WINGDIPAPI GdipFlush(GpGraphics*, GpFlushIntention);
1
0
0
0
Kai Blin : netapi32: Make sure NetUserGetInfo can find the current user.
by Alexandre Julliard
03 Jul '08
03 Jul '08
Module: wine Branch: master Commit: 20213e49f2938dc659df8eb35b775e6b223b8030 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=20213e49f2938dc659df8eb35…
Author: Kai Blin <kai.blin(a)gmail.com> Date: Wed Jul 2 12:26:35 2008 +0200 netapi32: Make sure NetUserGetInfo can find the current user. --- dlls/netapi32/access.c | 30 +++++++++++++++++++++++++++++- dlls/netapi32/tests/access.c | 5 +++++ 2 files changed, 34 insertions(+), 1 deletions(-) diff --git a/dlls/netapi32/access.c b/dlls/netapi32/access.c index f793239..4fdf60a 100644 --- a/dlls/netapi32/access.c +++ b/dlls/netapi32/access.c @@ -105,6 +105,34 @@ static struct sam_user* NETAPI_FindUser(LPCWSTR UserName) return NULL; } +static BOOL NETAPI_IsCurrentUser(LPCWSTR username) +{ + LPWSTR curr_user = NULL; + DWORD dwSize; + BOOL ret = FALSE; + + dwSize = LM20_UNLEN+1; + curr_user = HeapAlloc(GetProcessHeap(), 0, dwSize); + if(!curr_user) + { + ERR("Failed to allocate memory for user name.\n"); + goto end; + } + if(!GetUserNameW(curr_user, &dwSize)) + { + ERR("Failed to get current user's user name.\n"); + goto end; + } + if (!lstrcmpW(curr_user, username)) + { + ret = TRUE; + } + +end: + HeapFree(GetProcessHeap(), 0, curr_user); + return ret; +} + /************************************************************ * NetUserAdd (NETAPI32.@) */ @@ -226,7 +254,7 @@ NetUserGetInfo(LPCWSTR servername, LPCWSTR username, DWORD level, return NERR_InvalidComputer; } - if(!NETAPI_FindUser(username)) + if(!NETAPI_FindUser(username) && !NETAPI_IsCurrentUser(username)) { TRACE("User %s is unknown.\n", debugstr_w(username)); return NERR_UserNotFound; diff --git a/dlls/netapi32/tests/access.c b/dlls/netapi32/tests/access.c index 1e1dbf2..f46cb7f 100644 --- a/dlls/netapi32/tests/access.c +++ b/dlls/netapi32/tests/access.c @@ -142,6 +142,11 @@ static void run_usergetinfo_tests(void) pNetApiBufferFree(ui0); pNetApiBufferFree(ui10); + /* NetUserGetInfo should always work for the current user. */ + rc=pNetUserGetInfo(NULL, user_name, 0, (LPBYTE*)&ui0); + ok(rc == NERR_Success, "NetUsetGetInfo for current user failed: 0x%08x.\n", rc); + pNetApiBufferFree(ui0); + /* errors handling */ rc=pNetUserGetInfo(NULL, sTestUserName, 10000, (LPBYTE *)&ui0); ok(rc == ERROR_INVALID_LEVEL,"Invalid Level: rc=%d\n",rc);
1
0
0
0
Alexandre Julliard : iphlpapi: Fix the return value of GetPerAdapterInfo, with tests.
by Alexandre Julliard
03 Jul '08
03 Jul '08
Module: wine Branch: master Commit: bdf180d2a2400d04cb6ce273c0a9ae5de66f8f67 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bdf180d2a2400d04cb6ce273c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jul 2 17:27:37 2008 +0200 iphlpapi: Fix the return value of GetPerAdapterInfo, with tests. --- dlls/iphlpapi/iphlpapi_main.c | 27 +++++++++------------------ dlls/iphlpapi/tests/iphlpapi.c | 24 +++++++++++++++++++++++- 2 files changed, 32 insertions(+), 19 deletions(-) diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c index f624dde..430a943 100644 --- a/dlls/iphlpapi/iphlpapi_main.c +++ b/dlls/iphlpapi/iphlpapi_main.c @@ -1513,28 +1513,19 @@ DWORD WINAPI GetNumberOfInterfaces(PDWORD pdwNumIf) DWORD WINAPI GetPerAdapterInfo(ULONG IfIndex, PIP_PER_ADAPTER_INFO pPerAdapterInfo, PULONG pOutBufLen) { ULONG bytesNeeded = sizeof(IP_PER_ADAPTER_INFO); - DWORD ret; - TRACE("(IfIndex %d, pPerAdapterInfo %p, pOutBufLen %p)\n", IfIndex, - pPerAdapterInfo, pOutBufLen); - if (!pOutBufLen) - ret = ERROR_INVALID_PARAMETER; - else if (!pPerAdapterInfo) - { - *pOutBufLen = bytesNeeded; - ret = NO_ERROR; - } - else if (*pOutBufLen < bytesNeeded) + TRACE("(IfIndex %d, pPerAdapterInfo %p, pOutBufLen %p)\n", IfIndex, pPerAdapterInfo, pOutBufLen); + + if (!pOutBufLen) return ERROR_INVALID_PARAMETER; + + if (!pPerAdapterInfo || *pOutBufLen < bytesNeeded) { *pOutBufLen = bytesNeeded; - ret = ERROR_BUFFER_OVERFLOW; - } - else - { - memset(pPerAdapterInfo, 0, bytesNeeded); - ret = NO_ERROR; + return ERROR_BUFFER_OVERFLOW; } - return ret; + + memset(pPerAdapterInfo, 0, bytesNeeded); + return NO_ERROR; } diff --git a/dlls/iphlpapi/tests/iphlpapi.c b/dlls/iphlpapi/tests/iphlpapi.c index 79a2446..01eab25 100644 --- a/dlls/iphlpapi/tests/iphlpapi.c +++ b/dlls/iphlpapi/tests/iphlpapi.c @@ -61,6 +61,7 @@ typedef DWORD (WINAPI *GetTcpStatisticsFunc)(PMIB_TCPSTATS); typedef DWORD (WINAPI *GetUdpStatisticsFunc)(PMIB_UDPSTATS); typedef DWORD (WINAPI *GetTcpTableFunc)(PMIB_TCPTABLE,PDWORD,BOOL); typedef DWORD (WINAPI *GetUdpTableFunc)(PMIB_UDPTABLE,PDWORD,BOOL); +typedef DWORD (WINAPI *GetPerAdapterInfoFunc)(ULONG,PIP_PER_ADAPTER_INFO,PULONG); static GetNumberOfInterfacesFunc gGetNumberOfInterfaces = NULL; static GetIpAddrTableFunc gGetIpAddrTable = NULL; @@ -78,6 +79,7 @@ static GetTcpStatisticsFunc gGetTcpStatistics = NULL; static GetUdpStatisticsFunc gGetUdpStatistics = NULL; static GetTcpTableFunc gGetTcpTable = NULL; static GetUdpTableFunc gGetUdpTable = NULL; +static GetPerAdapterInfoFunc gGetPerAdapterInfo = NULL; static void loadIPHlpApi(void) { @@ -115,6 +117,7 @@ static void loadIPHlpApi(void) hLibrary, "GetTcpTable"); gGetUdpTable = (GetUdpTableFunc)GetProcAddress( hLibrary, "GetUdpTable"); + gGetPerAdapterInfo = (GetPerAdapterInfoFunc)GetProcAddress(hLibrary, "GetPerAdapterInfo"); } } @@ -584,6 +587,25 @@ static void testWin98Functions(void) testGetNetworkParams(); } +static void testGetPerAdapterInfo(void) +{ + DWORD ret, needed; + void *buffer; + + if (!gGetPerAdapterInfo) return; + ret = gGetPerAdapterInfo(1, NULL, NULL); + ok( ret == ERROR_INVALID_PARAMETER, "got %u instead of ERROR_INVALID_PARAMETER\n", ret ); + needed = 0xdeadbeef; + ret = gGetPerAdapterInfo(1, NULL, &needed); + if (ret == ERROR_NO_DATA) return; /* no such adapter */ + ok( ret == ERROR_BUFFER_OVERFLOW, "got %u instead of ERROR_BUFFER_OVERFLOW\n", ret ); + ok( needed != 0xdeadbeef, "needed not set\n" ); + buffer = HeapAlloc( GetProcessHeap(), 0, needed ); + ret = gGetPerAdapterInfo(1, buffer, &needed); + ok( ret == NO_ERROR, "got %u instead of NO_ERROR\n", ret ); + HeapFree( GetProcessHeap(), 0, buffer ); +} + /* still-to-be-tested 2K-onward functions: AddIPAddress @@ -593,7 +615,6 @@ DeleteProxyArpEntry EnableRouter FlushIpNetTable GetAdapterIndex -GetPerAdapterInfo NotifyAddrChange NotifyRouteChange SendARP @@ -601,6 +622,7 @@ UnenableRouter */ static void testWin2KFunctions(void) { + testGetPerAdapterInfo(); } START_TEST(iphlpapi)
1
0
0
0
Alexandre Julliard : user32: Split the SetWindowPos driver backend in WindowPosChanging/Changed.
by Alexandre Julliard
03 Jul '08
03 Jul '08
Module: wine Branch: master Commit: 89a3bd0c1514eb59c537d0f0fa318395c33156cf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=89a3bd0c1514eb59c537d0f0f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jul 2 15:40:10 2008 +0200 user32: Split the SetWindowPos driver backend in WindowPosChanging/Changed. This is needed to allow updating the visible rect before invalidating the DCEs. --- dlls/user32/driver.c | 55 ++++++++++++++++++++----------- dlls/user32/user_private.h | 3 +- dlls/user32/winpos.c | 36 ++++++++++++++++---- dlls/winex11.drv/window.c | 65 ++++++++++++++++++------------------- dlls/winex11.drv/winex11.drv.spec | 3 +- 5 files changed, 100 insertions(+), 62 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=89a3bd0c1514eb59c537d…
1
0
0
0
Detlef Riekenberg : winspool: Use the backend for EnumMonitors.
by Alexandre Julliard
02 Jul '08
02 Jul '08
Module: wine Branch: master Commit: 0848be6a60c80a299b31687cee94fbbe3dc82ab2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0848be6a60c80a299b31687ce…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Mon Jun 30 21:54:57 2008 +0200 winspool: Use the backend for EnumMonitors. --- dlls/winspool.drv/info.c | 139 +-------------------------------------------- 1 files changed, 4 insertions(+), 135 deletions(-) diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c index b49dd53..b7b290f 100644 --- a/dlls/winspool.drv/info.c +++ b/dlls/winspool.drv/info.c @@ -762,98 +762,6 @@ static inline DWORD set_reg_szW(HKEY hkey, const WCHAR *keyname, const WCHAR *va return ERROR_FILE_NOT_FOUND; } -/***************************************************************************** - * enumerate the local monitors (INTERNAL) - * - * returns the needed size (in bytes) for pMonitors - * and *lpreturned is set to number of entries returned in pMonitors - * - */ -static DWORD get_local_monitors(DWORD level, LPBYTE pMonitors, DWORD cbBuf, LPDWORD lpreturned) -{ - HKEY hroot = NULL; - HKEY hentry = NULL; - LPWSTR ptr; - LPMONITOR_INFO_2W mi; - WCHAR buffer[MAX_PATH]; - WCHAR dllname[MAX_PATH]; - DWORD dllsize; - DWORD len; - DWORD index = 0; - DWORD needed = 0; - DWORD numentries; - DWORD entrysize; - - entrysize = (level == 1) ? sizeof(MONITOR_INFO_1W) : sizeof(MONITOR_INFO_2W); - - numentries = *lpreturned; /* this is 0, when we scan the registry */ - len = entrysize * numentries; - ptr = (LPWSTR) &pMonitors[len]; - - numentries = 0; - len = sizeof(buffer)/sizeof(buffer[0]); - buffer[0] = '\0'; - - /* Windows creates the "Monitors"-Key on reboot / start "spooler" */ - if (RegCreateKeyW(HKEY_LOCAL_MACHINE, MonitorsW, &hroot) == ERROR_SUCCESS) { - /* Scan all Monitor-Registry-Keys */ - while (RegEnumKeyExW(hroot, index, buffer, &len, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) { - TRACE("Monitor_%d: %s\n", numentries, debugstr_w(buffer)); - dllsize = sizeof(dllname); - dllname[0] = '\0'; - - /* The Monitor must have a Driver-DLL */ - if (RegOpenKeyExW(hroot, buffer, 0, KEY_READ, &hentry) == ERROR_SUCCESS) { - if (RegQueryValueExW(hentry, DriverW, NULL, NULL, (LPBYTE) dllname, &dllsize) == ERROR_SUCCESS) { - /* We found a valid DLL for this Monitor. */ - TRACE("using Driver: %s\n", debugstr_w(dllname)); - } - RegCloseKey(hentry); - } - - /* Windows returns only Port-Monitors here, but to simplify our code, - we do no filtering for Language-Monitors */ - if (dllname[0]) { - numentries++; - needed += entrysize; - needed += (len+1) * sizeof(WCHAR); /* len is lstrlenW(monitorname) */ - if (level > 1) { - /* we install and return only monitors for "Windows NT x86" */ - needed += (lstrlenW(envname_x86W) +1) * sizeof(WCHAR); - needed += dllsize; - } - - /* required size is calculated. Now fill the user-buffer */ - if (pMonitors && (cbBuf >= needed)){ - mi = (LPMONITOR_INFO_2W) pMonitors; - pMonitors += entrysize; - - TRACE("%p: writing MONITOR_INFO_%dW #%d\n", mi, level, numentries); - mi->pName = ptr; - lstrcpyW(ptr, buffer); /* Name of the Monitor */ - ptr += (len+1); /* len is lstrlenW(monitorname) */ - if (level > 1) { - mi->pEnvironment = ptr; - lstrcpyW(ptr, envname_x86W); /* fixed to "Windows NT x86" */ - ptr += (lstrlenW(envname_x86W)+1); - - mi->pDLLName = ptr; - lstrcpyW(ptr, dllname); /* Name of the Driver-DLL */ - ptr += (dllsize / sizeof(WCHAR)); - } - } - } - index++; - len = sizeof(buffer)/sizeof(buffer[0]); - buffer[0] = '\0'; - } - RegCloseKey(hroot); - } - *lpreturned = numentries; - TRACE("need %d byte for %d entries\n", needed, numentries); - return needed; -} - /****************************************************************** * monitor_unload [internal] * @@ -7328,67 +7236,28 @@ emA_cleanup: * Success: TRUE * Failure: FALSE and in pcbNeeded the Bytes required for buffer, if cbBuf is too small * - * NOTES - * Windows reads the Registry once and cache the Results. - * - *| Language-Monitors are also installed in the same Registry-Location but - *| they are filtered in Windows (not returned by EnumMonitors). - *| We do no filtering to simplify our Code. - * */ BOOL WINAPI EnumMonitorsW(LPWSTR pName, DWORD Level, LPBYTE pMonitors, DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned) { - DWORD needed = 0; - DWORD numentries = 0; - BOOL res = FALSE; TRACE("(%s, %d, %p, %d, %p, %p)\n", debugstr_w(pName), Level, pMonitors, cbBuf, pcbNeeded, pcReturned); - if (pName && (lstrlenW(pName))) { - FIXME("for Server %s not implemented\n", debugstr_w(pName)); - SetLastError(ERROR_ACCESS_DENIED); - goto emW_cleanup; - } + if ((backend == NULL) && !load_backend()) return FALSE; /* Level is not checked in win9x */ if (!Level || (Level > 2)) { WARN("level (%d) is ignored in win9x\n", Level); SetLastError(ERROR_INVALID_LEVEL); - goto emW_cleanup; + return FALSE; } if (!pcbNeeded) { SetLastError(RPC_X_NULL_REF_POINTER); - goto emW_cleanup; - } - - /* Scan all Monitor-Keys */ - numentries = 0; - needed = get_local_monitors(Level, NULL, 0, &numentries); - - /* we calculated the needed buffersize. now do the error-checks */ - if (cbBuf < needed) { - SetLastError(ERROR_INSUFFICIENT_BUFFER); - goto emW_cleanup; - } - else if (!pMonitors || !pcReturned) { - SetLastError(RPC_X_NULL_REF_POINTER); - goto emW_cleanup; + return FALSE; } - /* fill the Buffer with the Monitor-Keys */ - needed = get_local_monitors(Level, pMonitors, cbBuf, &numentries); - res = TRUE; - -emW_cleanup: - if (pcbNeeded) *pcbNeeded = needed; - if (pcReturned) *pcReturned = numentries; - - TRACE("returning %d with %d (%d byte for %d entries)\n", - res, GetLastError(), needed, numentries); - - return (res); + return backend->fpEnumMonitors(pName, Level, pMonitors, cbBuf, pcbNeeded, pcReturned); } /******************************************************************************
1
0
0
0
Detlef Riekenberg : localspl: Implement fpEnumMonitors.
by Alexandre Julliard
02 Jul '08
02 Jul '08
Module: wine Branch: master Commit: 2f08621d6217b93ab5cb2334588baa7f01a0d7a6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2f08621d6217b93ab5cb23345…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Mon Jun 30 21:49:31 2008 +0200 localspl: Implement fpEnumMonitors. --- dlls/localspl/localspl_main.c | 185 ++++++++++++++++++++++++++++++++++++++++- 1 files changed, 183 insertions(+), 2 deletions(-) diff --git a/dlls/localspl/localspl_main.c b/dlls/localspl/localspl_main.c index 1b828f0..b27ae7d 100644 --- a/dlls/localspl/localspl_main.c +++ b/dlls/localspl/localspl_main.c @@ -31,6 +31,7 @@ #include "ddk/winsplp.h" #include "winuser.h" +#include "wine/list.h" #include "wine/debug.h" #include "wine/unicode.h" #include "localspl_private.h" @@ -49,6 +50,17 @@ typedef struct { } apd_data_t; typedef struct { + struct list entry; + LPWSTR name; + LPWSTR dllname; + PMONITORUI monitorUI; + LPMONITOR monitor; + HMODULE hdll; + DWORD refcount; + DWORD dwMonitorSize; +} monitor_t; + +typedef struct { LPCWSTR envname; LPCWSTR subdir; DWORD driverversion; @@ -56,13 +68,13 @@ typedef struct { LPCWSTR versionsubdir; } printenv_t; + /* ############################### */ HINSTANCE LOCALSPL_hInstance = NULL; static const PRINTPROVIDOR * pp = NULL; - static const WCHAR backslashW[] = {'\\',0}; static const WCHAR configuration_fileW[] = {'C','o','n','f','i','g','u','r','a','t','i','o','n',' ','F','i','l','e',0}; static const WCHAR datatypeW[] = {'D','a','t','a','t','y','p','e',0}; @@ -82,6 +94,11 @@ static const WCHAR help_fileW[] = {'H','e','l','p',' ','F','i','l','e',0}; static const WCHAR locationW[] = {'L','o','c','a','t','i','o','n',0}; static const WCHAR manufacturerW[] = {'M','a','n','u','f','a','c','t','u','r','e','r',0}; static const WCHAR monitorW[] = {'M','o','n','i','t','o','r',0}; +static const WCHAR monitorsW[] = {'S','y','s','t','e','m','\\', + 'C','u', 'r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', + 'C','o','n','t','r','o','l','\\', + 'P','r','i','n','t','\\', + 'M','o','n','i','t','o','r','s','\\',0}; static const WCHAR monitorUIW[] = {'M','o','n','i','t','o','r','U','I',0}; static const WCHAR nameW[] = {'N','a','m','e',0}; static const WCHAR oem_urlW[] = {'O','E','M',' ','U','r','l',0}; @@ -116,6 +133,7 @@ static const DWORD di_sizeof[] = {0, sizeof(DRIVER_INFO_1W), sizeof(DRIVER_INFO_ sizeof(DRIVER_INFO_5W), sizeof(DRIVER_INFO_6W), 0, sizeof(DRIVER_INFO_8W)}; + /****************************************************************** * apd_copyfile [internal] * @@ -284,6 +302,102 @@ static const printenv_t * validate_envW(LPCWSTR env) } /***************************************************************************** + * enumerate the local monitors (INTERNAL) + * + * returns the needed size (in bytes) for pMonitors + * and *lpreturned is set to number of entries returned in pMonitors + * + * Language-Monitors are also installed in the same Registry-Location but + * they are filtered in Windows (not returned by EnumMonitors). + * We do no filtering to simplify our Code. + * + */ +static DWORD get_local_monitors(DWORD level, LPBYTE pMonitors, DWORD cbBuf, LPDWORD lpreturned) +{ + HKEY hroot = NULL; + HKEY hentry = NULL; + LPWSTR ptr; + LPMONITOR_INFO_2W mi; + WCHAR buffer[MAX_PATH]; + WCHAR dllname[MAX_PATH]; + DWORD dllsize; + DWORD len; + DWORD index = 0; + DWORD needed = 0; + DWORD numentries; + DWORD entrysize; + + entrysize = (level == 1) ? sizeof(MONITOR_INFO_1W) : sizeof(MONITOR_INFO_2W); + + numentries = *lpreturned; /* this is 0, when we scan the registry */ + len = entrysize * numentries; + ptr = (LPWSTR) &pMonitors[len]; + + numentries = 0; + len = sizeof(buffer)/sizeof(buffer[0]); + buffer[0] = '\0'; + + /* Windows creates the "Monitors"-Key on reboot / start "spooler" */ + if (RegCreateKeyW(HKEY_LOCAL_MACHINE, monitorsW, &hroot) == ERROR_SUCCESS) { + /* Scan all Monitor-Registry-Keys */ + while (RegEnumKeyExW(hroot, index, buffer, &len, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) { + TRACE("Monitor_%d: %s\n", numentries, debugstr_w(buffer)); + dllsize = sizeof(dllname); + dllname[0] = '\0'; + + /* The Monitor must have a Driver-DLL */ + if (RegOpenKeyExW(hroot, buffer, 0, KEY_READ, &hentry) == ERROR_SUCCESS) { + if (RegQueryValueExW(hentry, driverW, NULL, NULL, (LPBYTE) dllname, &dllsize) == ERROR_SUCCESS) { + /* We found a valid DLL for this Monitor. */ + TRACE("using Driver: %s\n", debugstr_w(dllname)); + } + RegCloseKey(hentry); + } + + /* Windows returns only Port-Monitors here, but to simplify our code, + we do no filtering for Language-Monitors */ + if (dllname[0]) { + numentries++; + needed += entrysize; + needed += (len+1) * sizeof(WCHAR); /* len is lstrlenW(monitorname) */ + if (level > 1) { + /* we install and return only monitors for "Windows NT x86" */ + needed += (lstrlenW(x86_envnameW) +1) * sizeof(WCHAR); + needed += dllsize; + } + + /* required size is calculated. Now fill the user-buffer */ + if (pMonitors && (cbBuf >= needed)){ + mi = (LPMONITOR_INFO_2W) pMonitors; + pMonitors += entrysize; + + TRACE("%p: writing MONITOR_INFO_%dW #%d\n", mi, level, numentries); + mi->pName = ptr; + lstrcpyW(ptr, buffer); /* Name of the Monitor */ + ptr += (len+1); /* len is lstrlenW(monitorname) */ + if (level > 1) { + mi->pEnvironment = ptr; + lstrcpyW(ptr, x86_envnameW); /* fixed to "Windows NT x86" */ + ptr += (lstrlenW(x86_envnameW)+1); + + mi->pDLLName = ptr; + lstrcpyW(ptr, dllname); /* Name of the Driver-DLL */ + ptr += (dllsize / sizeof(WCHAR)); + } + } + } + index++; + len = sizeof(buffer)/sizeof(buffer[0]); + buffer[0] = '\0'; + } + RegCloseKey(hroot); + } + *lpreturned = numentries; + TRACE("need %d byte for %d entries\n", needed, numentries); + return needed; +} + +/***************************************************************************** * open_driver_reg [internal] * * opens the registry for the printer drivers depending on the given input @@ -583,6 +697,73 @@ static BOOL WINAPI fpAddPrinterDriverEx(LPWSTR pName, DWORD level, LPBYTE pDrive return myAddPrinterDriverEx(level, pDriverInfo, dwFileCopyFlags, TRUE); } +/***************************************************************************** + * fpEnumMonitors [exported through PRINTPROVIDOR] + * + * Enumerate available Port-Monitors + * + * PARAMS + * pName [I] Servername or NULL (local Computer) + * Level [I] Structure-Level (1:Win9x+NT or 2:NT only) + * pMonitors [O] PTR to Buffer that receives the Result + * cbBuf [I] Size of Buffer at pMonitors + * pcbNeeded [O] PTR to DWORD that receives the size in Bytes used / required for pMonitors + * pcReturned [O] PTR to DWORD that receives the number of Monitors in pMonitors + * + * RETURNS + * Success: TRUE + * Failure: FALSE and in pcbNeeded the Bytes required for buffer, if cbBuf is too small + * + * NOTES + * Windows reads the Registry once and cache the Results. + * + */ +BOOL WINAPI fpEnumMonitors(LPWSTR pName, DWORD Level, LPBYTE pMonitors, DWORD cbBuf, + LPDWORD pcbNeeded, LPDWORD pcReturned) +{ + DWORD numentries = 0; + DWORD needed = 0; + LONG lres; + BOOL res = FALSE; + + TRACE("(%s, %d, %p, %d, %p, %p)\n", debugstr_w(pName), Level, pMonitors, + cbBuf, pcbNeeded, pcReturned); + + lres = copy_servername_from_name(pName, NULL); + if (lres) { + FIXME("server %s not supported\n", debugstr_w(pName)); + SetLastError(ERROR_INVALID_NAME); + goto em_cleanup; + } + + /* Scan all Monitor-Keys */ + numentries = 0; + needed = get_local_monitors(Level, NULL, 0, &numentries); + + /* we calculated the needed buffersize. now do more error-checks */ + if (cbBuf < needed) { + SetLastError(ERROR_INSUFFICIENT_BUFFER); + goto em_cleanup; + } + else if (!pMonitors || !pcReturned) { + SetLastError(RPC_X_NULL_REF_POINTER); + goto em_cleanup; + } + + /* fill the Buffer with the Monitor-Keys */ + needed = get_local_monitors(Level, pMonitors, cbBuf, &numentries); + res = TRUE; + +em_cleanup: + if (pcbNeeded) *pcbNeeded = needed; + if (pcReturned) *pcReturned = numentries; + + TRACE("returning %d with %d (%d byte for %d entries)\n", + res, GetLastError(), needed, numentries); + + return (res); +} + /***************************************************** * get_backend [internal] */ @@ -626,7 +807,7 @@ static const PRINTPROVIDOR * get_backend(void) NULL, /* fpGetForm */ NULL, /* fpSetForm */ NULL, /* fpEnumForms */ - NULL, /* fpEnumMonitors */ + fpEnumMonitors, NULL, /* fpEnumPorts */ NULL, /* fpAddPort */ NULL, /* fpConfigurePort */
1
0
0
0
← Newer
1
...
98
99
100
101
102
103
104
...
112
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
Results per page:
10
25
50
100
200