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
January 2009
----- 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
1348 discussions
Start a n
N
ew thread
Nikolay Sivov : gdiplus: Implemented GdipCreateRegionHrgn for rectangular regions.
by Alexandre Julliard
30 Jan '09
30 Jan '09
Module: wine Branch: master Commit: 67f9570332b20dcecd3d771e1f060eb6d50819ad URL:
http://source.winehq.org/git/wine.git/?a=commit;h=67f9570332b20dcecd3d771e1…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Fri Jan 30 03:49:54 2009 +0300 gdiplus: Implemented GdipCreateRegionHrgn for rectangular regions. --- dlls/gdiplus/region.c | 51 +++++++++++++++++++++++++++++++++++++++--- dlls/gdiplus/tests/region.c | 49 +++++++++++++++++++++++++++++++---------- 2 files changed, 84 insertions(+), 16 deletions(-) diff --git a/dlls/gdiplus/region.c b/dlls/gdiplus/region.c index 89b107f..e4cc7d8 100644 --- a/dlls/gdiplus/region.c +++ b/dlls/gdiplus/region.c @@ -567,15 +567,58 @@ GpStatus WINGDIPAPI GdipCreateRegionRgnData(GDIPCONST BYTE *data, INT size, GpRe return NotImplemented; } + +/****************************************************************************** + * GdipCreateRegionHrgn [GDIPLUS.@] + */ GpStatus WINGDIPAPI GdipCreateRegionHrgn(HRGN hrgn, GpRegion **region) { - FIXME("(%p, %p): stub\n", hrgn, region); + union { + RGNDATA data; + char buf[sizeof(RGNDATAHEADER) + sizeof(RECT)]; + } rdata; + DWORD size; + GpRectF rectf; + GpPath *path; + GpStatus stat; + + TRACE("(%p, %p)\n", hrgn, region); - if(!hrgn || !region) + if(!region || !(size = GetRegionData(hrgn, 0, NULL))) return InvalidParameter; - *region = NULL; - return NotImplemented; + if(size > sizeof(RGNDATAHEADER) + sizeof(RECT)){ + FIXME("Only simple rect regions supported.\n"); + *region = NULL; + return NotImplemented; + } + + if(!GetRegionData(hrgn, sizeof(rdata), &rdata.data)) + return GenericError; + + /* return empty region */ + if(IsRectEmpty(&rdata.data.rdh.rcBound)){ + stat = GdipCreateRegion(region); + if(stat == Ok) + GdipSetEmpty(*region); + return stat; + } + + rectf.X = (REAL)rdata.data.rdh.rcBound.left; + rectf.Y = (REAL)rdata.data.rdh.rcBound.top; + rectf.Width = (REAL)rdata.data.rdh.rcBound.right - rectf.X; + rectf.Height = (REAL)rdata.data.rdh.rcBound.bottom - rectf.Y; + + stat = GdipCreatePath(FillModeAlternate, &path); + if(stat != Ok) + return stat; + + GdipAddPathRectangle(path, rectf.X, rectf.Y, rectf.Width, rectf.Height); + + stat = GdipCreateRegionPath(path, region); + GdipDeletePath(path); + + return stat; } GpStatus WINGDIPAPI GdipDeleteRegion(GpRegion *region) diff --git a/dlls/gdiplus/tests/region.c b/dlls/gdiplus/tests/region.c index 9ac0e9a..784b1b9 100644 --- a/dlls/gdiplus/tests/region.c +++ b/dlls/gdiplus/tests/region.c @@ -709,6 +709,9 @@ static void test_fromhrgn(void) UINT needed; DWORD buf[220]; RegionDataPoint *point; + GpGraphics *graphics = NULL; + HDC hdc; + BOOL res; /* NULL */ status = GdipCreateRegionHrgn(NULL, NULL); @@ -716,24 +719,42 @@ static void test_fromhrgn(void) status = GdipCreateRegionHrgn(NULL, ®ion); expect(InvalidParameter, status); status = GdipCreateRegionHrgn((HRGN)0xdeadbeef, ®ion); - todo_wine expect(InvalidParameter, status); + expect(InvalidParameter, status); + + /* empty rectangle */ + hrgn = CreateRectRgn(0, 0, 0, 0); + status = GdipCreateRegionHrgn(hrgn, ®ion); + expect(Ok, status); + if(status == Ok) { + + hdc = GetDC(0); + status = GdipCreateFromHDC(hdc, &graphics); + expect(Ok, status); + res = FALSE; + status = GdipIsEmptyRegion(region, graphics, &res); + expect(Ok, status); + expect(TRUE, res); + GdipDeleteGraphics(graphics); + ReleaseDC(0, hdc); + GdipDeleteRegion(region); + + } + DeleteObject(hrgn); /* rectangle */ hrgn = CreateRectRgn(0, 0, 100, 10); status = GdipCreateRegionHrgn(hrgn, ®ion); - todo_wine expect(Ok, status); + expect(Ok, status); status = GdipGetRegionDataSize(region, &needed); -todo_wine{ expect(Ok, status); expect(56, needed); -} status = GdipGetRegionData(region, (BYTE*)buf, sizeof(buf), &needed); - todo_wine expect(Ok, status); + expect(Ok, status); if(status == Ok){ -todo_wine{ + expect(56, needed); expect_dword(buf, 48); expect_magic((DWORD*)(buf + 2)); @@ -742,25 +763,23 @@ todo_wine{ expect_dword(buf + 5, 0x00000020); expect_magic((DWORD*)(buf + 6)); expect_dword(buf + 7, 0x00000004); - expect_dword(buf + 8, 0x00006000); /* ?? */ -} + todo_wine expect_dword(buf + 8, 0x00006000); /* ?? */ + point = (RegionDataPoint*)buf + 9; expect(0, point[0].X); expect(0, point[0].Y); -todo_wine{ expect(100,point[1].X); /* buf + 10 */ expect(0, point[1].Y); expect(100,point[2].X); /* buf + 11 */ expect(10, point[2].Y); -} + expect(0, point[3].X); /* buf + 12 */ -todo_wine{ expect(10, point[3].Y); expect_dword(buf + 13, 0x81010100); /* closed */ -} + } GdipDeleteRegion(region); @@ -777,6 +796,10 @@ todo_wine{ expect(216, needed); } status = GdipGetRegionData(region, (BYTE*)buf, sizeof(buf), &needed); + todo_wine expect(Ok, status); + + if(status == Ok) + { todo_wine{ expect(Ok, status); expect(216, needed); @@ -789,6 +812,8 @@ todo_wine{ expect_dword(buf + 7, 0x00000024); expect_dword(buf + 8, 0x00006000); /* ?? */ } + } + GdipDeleteRegion(region); DeleteObject(hrgn); }
1
0
0
0
Aric Stewart : oleaut32: Implement de/serialize_param of types VT_ARRAY|< type>.
by Alexandre Julliard
30 Jan '09
30 Jan '09
Module: wine Branch: master Commit: bbf4835568096cf4949d07d323b40e6f502d347c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bbf4835568096cf4949d07d32…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Thu Jan 29 09:52:29 2009 -0600 oleaut32: Implement de/serialize_param of types VT_ARRAY|<type>. --- dlls/oleaut32/tmarshal.c | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/dlls/oleaut32/tmarshal.c b/dlls/oleaut32/tmarshal.c index a7b4009..10149f2 100644 --- a/dlls/oleaut32/tmarshal.c +++ b/dlls/oleaut32/tmarshal.c @@ -606,10 +606,15 @@ serialize_param( marshal_state *buf) { HRESULT hres = S_OK; + VARTYPE vartype; TRACE("(tdesc.vt %s)\n",debugstr_vt(tdesc->vt)); - switch (tdesc->vt) { + vartype = tdesc->vt; + if ((vartype & 0xf000) == VT_ARRAY) + vartype = VT_SAFEARRAY; + + switch (vartype) { case VT_EMPTY: /* nothing. empty variant for instance */ return S_OK; case VT_I8: @@ -919,11 +924,16 @@ deserialize_param( marshal_state *buf) { HRESULT hres = S_OK; + VARTYPE vartype; TRACE("vt %s at %p\n",debugstr_vt(tdesc->vt),arg); + vartype = tdesc->vt; + if ((vartype & 0xf000) == VT_ARRAY) + vartype = VT_SAFEARRAY; + while (1) { - switch (tdesc->vt) { + switch (vartype) { case VT_EMPTY: if (debugout) TRACE_(olerelay)("<empty>\n"); return S_OK;
1
0
0
0
Aric Stewart : mlang: Implementation of base functionality of IMultiLanguage2:: ValidateCodePage and IMultiLanguage2::ValidateCodePageEx.
by Alexandre Julliard
30 Jan '09
30 Jan '09
Module: wine Branch: master Commit: 70131341c7460a73e436c9777d7affcc194fd4a1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=70131341c7460a73e436c9777…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Wed Jan 28 07:38:11 2009 -0600 mlang: Implementation of base functionality of IMultiLanguage2::ValidateCodePage and IMultiLanguage2::ValidateCodePageEx. Does not handle automatically installing language packs. With help from Dmitry Timoshkov. --- dlls/mlang/mlang.c | 25 ++++++++++++++++++++++--- include/mlang.idl | 3 +++ 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/dlls/mlang/mlang.c b/dlls/mlang/mlang.c index 375f102..e002046 100644 --- a/dlls/mlang/mlang.c +++ b/dlls/mlang/mlang.c @@ -2910,8 +2910,7 @@ static HRESULT WINAPI fnIMultiLanguage2_ValidateCodePage( UINT uiCodePage, HWND hwnd) { - FIXME("%u, %p\n", uiCodePage, hwnd); - return E_NOTIMPL; + return IMultiLanguage2_ValidateCodePageEx(iface,uiCodePage,hwnd,0); } static HRESULT WINAPI fnIMultiLanguage2_GetCodePageDescription( @@ -2989,8 +2988,28 @@ static HRESULT WINAPI fnIMultiLanguage2_ValidateCodePageEx( HWND hwnd, DWORD dwfIODControl) { + int i; ICOM_THIS_MULTI(MLang_impl, vtbl_IMultiLanguage3, iface); - FIXME("%p %u %p %08x: stub!\n", This, uiCodePage, hwnd, dwfIODControl); + + TRACE("%p %u %p %08x\n", This, uiCodePage, hwnd, dwfIODControl); + + /* quick check for kernel32 supported code pages */ + if (IsValidCodePage(uiCodePage)) + return S_OK; + + /* check for mlang supported code pages */ + for (i = 0; i < sizeof(mlang_data)/sizeof(mlang_data[0]); i++) + { + int n; + for (n = 0; n < mlang_data[i].number_of_cp; n++) + { + if (mlang_data[i].mime_cp_info[n].cp == uiCodePage) + return S_OK; + } + } + + if (dwfIODControl != CPIOD_PEEK) + FIXME("Request to install codepage language pack not handled\n"); return S_FALSE; } diff --git a/include/mlang.idl b/include/mlang.idl index 6f00734..bcc0917 100644 --- a/include/mlang.idl +++ b/include/mlang.idl @@ -27,6 +27,9 @@ cpp_quote("#ifndef _WINNT_") typedef WORD LANGID; cpp_quote("#endif") +cpp_quote("#define CPIOD_PEEK 0x40000000") +cpp_quote("#define CPIOD_FORCE_PROMPT 0x80000000") + [ object, uuid(359f3443-bd4a-11d0-b188-00aa0038c969),
1
0
0
0
Paul Vriens : rsaenh/tests: Fix the remaining test failures on Win9x up to W2K.
by Alexandre Julliard
30 Jan '09
30 Jan '09
Module: wine Branch: master Commit: ce20f6c687f189dbfebb0c3c15fa1bf607363ce3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ce20f6c687f189dbfebb0c3c1…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Fri Jan 30 09:49:40 2009 +0100 rsaenh/tests: Fix the remaining test failures on Win9x up to W2K. --- dlls/rsaenh/tests/rsaenh.c | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/dlls/rsaenh/tests/rsaenh.c b/dlls/rsaenh/tests/rsaenh.c index b5af81f..ad53c72 100644 --- a/dlls/rsaenh/tests/rsaenh.c +++ b/dlls/rsaenh/tests/rsaenh.c @@ -1577,9 +1577,8 @@ static void test_rsa_encrypt(void) /* but its private key may not be. */ SetLastError(0xdeadbeef); result = CryptExportKey(hRSAKey, 0, PRIVATEKEYBLOB, 0, NULL, &dwLen); - ok(!result && - (GetLastError() == NTE_BAD_KEY_STATE || - broken(GetLastError() == 0xdeadbeef) /* Win9x/NT4 */), + ok((!result && GetLastError() == NTE_BAD_KEY_STATE) || + broken(result), /* Win9x/NT4 */ "expected NTE_BAD_KEY_STATE, got %08x\n", GetLastError()); /* Setting the permissions of the key exchange key isn't allowed, either. */ dwVal |= CRYPT_EXPORT; @@ -1612,9 +1611,8 @@ static void test_rsa_encrypt(void) /* but its private key may not be. */ SetLastError(0xdeadbeef); result = CryptExportKey(hRSAKey, 0, PRIVATEKEYBLOB, 0, NULL, &dwLen); - ok(!result && - (GetLastError() == NTE_BAD_KEY_STATE || - broken(GetLastError() == 0xdeadbeef) /* Win9x/NT4 */), + ok((!result && GetLastError() == NTE_BAD_KEY_STATE) || + broken(result), /* Win9x/NT4 */ "expected NTE_BAD_KEY_STATE, got %08x\n", GetLastError()); /* Setting the permissions of the signature key isn't allowed, either. */ dwVal |= CRYPT_EXPORT; @@ -2159,7 +2157,10 @@ static void test_key_permissions(void) /* Turning off the key's export permissions is "allowed".. */ dwVal &= ~CRYPT_EXPORT; result = CryptSetKeyParam(hKey1, KP_PERMISSIONS, (BYTE *)&dwVal, 0); - ok(result, "%08x\n", GetLastError()); + ok(result || + broken(!result && GetLastError() == NTE_BAD_DATA) || /* W2K */ + broken(!result && GetLastError() == NTE_BAD_FLAGS), /* Win9x/WinME/NT4 */ + "%08x\n", GetLastError()); /* but it has no effect. */ dwVal = 0xdeadbeef; dwLen = sizeof(DWORD);
1
0
0
0
Michael Stefaniuc : riched20: Remove superfluous pointer casts.
by Alexandre Julliard
30 Jan '09
30 Jan '09
Module: wine Branch: master Commit: d1a7e41b71cb12b102b68112e1250e8d84f7c7f4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d1a7e41b71cb12b102b68112e…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Fri Jan 30 10:40:02 2009 +0100 riched20: Remove superfluous pointer casts. --- dlls/riched20/clipboard.c | 4 ++-- dlls/riched20/reader.c | 2 +- dlls/riched20/richole.c | 2 +- dlls/riched20/string.c | 6 +++--- dlls/riched20/tests/editor.c | 6 +++--- dlls/riched20/txthost.c | 2 +- dlls/riched20/txtsrv.c | 2 +- dlls/riched20/undo.c | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dlls/riched20/clipboard.c b/dlls/riched20/clipboard.c index b26222d..648f0c5 100644 --- a/dlls/riched20/clipboard.c +++ b/dlls/riched20/clipboard.c @@ -54,7 +54,7 @@ static HRESULT WINAPI EnumFormatImpl_QueryInterface(IEnumFORMATETC *iface, REFII if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IEnumFORMATETC)) { IEnumFORMATETC_AddRef(iface); - *ppvObj = (LPVOID)This; + *ppvObj = This; return S_OK; } *ppvObj = NULL; @@ -170,7 +170,7 @@ static HRESULT WINAPI DataObjectImpl_QueryInterface(IDataObject *iface, REFIID r if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDataObject)) { IDataObject_AddRef(iface); - *ppvObj = (LPVOID)This; + *ppvObj = This; return S_OK; } *ppvObj = NULL; diff --git a/dlls/riched20/reader.c b/dlls/riched20/reader.c index 17f530d..3df7109 100644 --- a/dlls/riched20/reader.c +++ b/dlls/riched20/reader.c @@ -2727,7 +2727,7 @@ RTFFlushCPOutputBuffer(RTF_Info *info) info->dwCPOutputCount = 0; RTFPutUnicodeString(info, buffer, length); - heap_free((char *)buffer); + heap_free(buffer); } void diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c index 658f0d3..ee8ea60 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c @@ -1694,7 +1694,7 @@ LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *ppObj) return 0; } TRACE("Created %p\n",reo); - *ppObj = (LPVOID) reo; + *ppObj = reo; return 1; } diff --git a/dlls/riched20/string.c b/dlls/riched20/string.c index ee33214..0bd751c 100644 --- a/dlls/riched20/string.c +++ b/dlls/riched20/string.c @@ -357,12 +357,12 @@ LPWSTR ME_ToUnicode(BOOL unicode, LPVOID psz) assert(psz != NULL); if (unicode) - return (LPWSTR)psz; + return psz; else { WCHAR *tmp; - int nChars = MultiByteToWideChar(CP_ACP, 0, (char *)psz, -1, NULL, 0); + int nChars = MultiByteToWideChar(CP_ACP, 0, psz, -1, NULL, 0); if((tmp = ALLOC_N_OBJ(WCHAR, nChars)) != NULL) - MultiByteToWideChar(CP_ACP, 0, (char *)psz, -1, tmp, nChars); + MultiByteToWideChar(CP_ACP, 0, psz, -1, tmp, nChars); return tmp; } } diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index da284d4..29d3124 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -3407,7 +3407,7 @@ static void test_EM_SETTEXTEX(void) cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(0); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "ParentTestClass"; @@ -5413,7 +5413,7 @@ static void test_eventMask(void) cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(0); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "EventMaskParentClass"; @@ -5503,7 +5503,7 @@ static void test_WM_NOTIFY(void) cls.cbWndExtra = 0; cls.hInstance = GetModuleHandleA(0); cls.hIcon = 0; - cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hCursor = LoadCursorA(0, IDC_ARROW); cls.hbrBackground = GetStockObject(WHITE_BRUSH); cls.lpszMenuName = NULL; cls.lpszClassName = "WM_NOTIFY_ParentClass"; diff --git a/dlls/riched20/txthost.c b/dlls/riched20/txthost.c index dc000dc..5b52b9f 100644 --- a/dlls/riched20/txthost.c +++ b/dlls/riched20/txthost.c @@ -466,7 +466,7 @@ HRESULT WINAPI ITextHostImpl_TxNotify(ITextHost *iface, case EN_STOPNOUNDO: { /* FIXME: Verify this assumption that pv starts with NMHDR. */ - NMHDR *info = (NMHDR*)pv; + NMHDR *info = pv; if (!info) return E_FAIL; diff --git a/dlls/riched20/txtsrv.c b/dlls/riched20/txtsrv.c index 0c3fc55..d7b915c 100644 --- a/dlls/riched20/txtsrv.c +++ b/dlls/riched20/txtsrv.c @@ -110,7 +110,7 @@ static HRESULT WINAPI fnTextSrv_QueryInterface(ITextServices * iface, TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppv); *ppv = NULL; if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_ITextServices)) - *ppv = (LPVOID)This; + *ppv = This; if (*ppv) { diff --git a/dlls/riched20/undo.c b/dlls/riched20/undo.c index d845550..423a6d4 100644 --- a/dlls/riched20/undo.c +++ b/dlls/riched20/undo.c @@ -55,7 +55,7 @@ ME_UndoItem *ME_AddUndoItem(ME_TextEditor *editor, ME_DIType type, const ME_Disp return NULL; else { - ME_DisplayItem *pItem = (ME_DisplayItem *)ALLOC_OBJ(ME_UndoItem); + ME_DisplayItem *pItem = ALLOC_OBJ(ME_UndoItem); switch(type) { case diUndoPotentialEndTransaction:
1
0
0
0
Michael Stefaniuc : psapi: Remove superfluous pointer casts.
by Alexandre Julliard
30 Jan '09
30 Jan '09
Module: wine Branch: master Commit: 5358233561c72562046467df8eab97ee7838c21c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5358233561c72562046467df8…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Fri Jan 30 10:39:42 2009 +0100 psapi: Remove superfluous pointer casts. --- dlls/psapi/psapi_main.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/psapi/psapi_main.c b/dlls/psapi/psapi_main.c index 7f90a21..72484dc 100644 --- a/dlls/psapi/psapi_main.c +++ b/dlls/psapi/psapi_main.c @@ -135,7 +135,7 @@ static BOOL PSAPI_GetLdrModule(HANDLE hProcess, HMODULE hModule, while ((ret = PSAPI_ModuleIteratorNext(&iter)) > 0) /* When hModule is NULL we return the process image - which will be * the first module since our iterator uses InLoadOrderModuleList */ - if (!hModule || hModule == (HMODULE)iter.LdrModule.BaseAddress) + if (!hModule || hModule == iter.LdrModule.BaseAddress) { *pLdrModule = iter.LdrModule; return TRUE; @@ -256,7 +256,7 @@ BOOL WINAPI EnumProcessModules(HANDLE hProcess, HMODULE *lphModule, { if (cb >= sizeof(HMODULE)) { - *lphModule++ = (HMODULE)iter.LdrModule.BaseAddress; + *lphModule++ = iter.LdrModule.BaseAddress; cb -= sizeof(HMODULE); } *lpcbNeeded += sizeof(HMODULE);
1
0
0
0
Juan Lang : shell32: Allow PIDLs to have alternate types to support more recent versions of Windows .
by Alexandre Julliard
30 Jan '09
30 Jan '09
Module: wine Branch: master Commit: f209d1154178ab406ccfd2631b5193a63facbc96 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f209d1154178ab406ccfd2631…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Jan 29 18:06:33 2009 -0800 shell32: Allow PIDLs to have alternate types to support more recent versions of Windows. --- dlls/shell32/tests/shellpath.c | 148 +++++++++++++++++++++++---------------- 1 files changed, 87 insertions(+), 61 deletions(-) diff --git a/dlls/shell32/tests/shellpath.c b/dlls/shell32/tests/shellpath.c index 3fcd638..7c7cc52 100644 --- a/dlls/shell32/tests/shellpath.c +++ b/dlls/shell32/tests/shellpath.c @@ -76,6 +76,7 @@ static GUID CLSID_CommonDocuments = { 0x0000000c, 0x0000, 0x0000, { 0x00, 0x00, struct shellExpectedValues { int folder; BYTE pidlType; + BYTE altPidlType; }; static HRESULT (WINAPI *pDllGetVersion)(DLLVERSIONINFO *); @@ -90,69 +91,73 @@ static HRESULT (WINAPI *pSHGetMalloc)(LPMALLOC *); static DLLVERSIONINFO shellVersion = { 0 }; static LPMALLOC pMalloc; static const struct shellExpectedValues requiredShellValues[] = { - { CSIDL_BITBUCKET, PT_GUID }, - { CSIDL_CONTROLS, PT_SHELLEXT }, - { CSIDL_COOKIES, PT_FOLDER }, - { CSIDL_DESKTOPDIRECTORY, PT_FOLDER }, - { CSIDL_DRIVES, PT_GUID }, - { CSIDL_FAVORITES, PT_FOLDER }, - { CSIDL_FONTS, PT_FOLDER }, + { CSIDL_BITBUCKET, PT_GUID, 0 }, + { CSIDL_CONTROLS, PT_SHELLEXT, PT_GUID }, + { CSIDL_COOKIES, PT_FOLDER, 0 }, + { CSIDL_DESKTOPDIRECTORY, PT_FOLDER, 0 }, + { CSIDL_DRIVES, PT_GUID, 0 }, +/* Note that 0 is an expected type for CSIDL_FAVORITES. Inverting the order + * will cause the test to fail, as it'll only check for PT_FOLDER. + */ + { CSIDL_FAVORITES, 0, PT_FOLDER }, + { CSIDL_FONTS, PT_FOLDER, PT_IESPECIAL2 }, /* FIXME: the following fails in Wine, returns type PT_FOLDER - { CSIDL_HISTORY, PT_IESPECIAL2 }, + { CSIDL_HISTORY, PT_IESPECIAL2, 0 }, */ - { CSIDL_INTERNET, PT_GUID }, - { CSIDL_NETHOOD, PT_FOLDER }, - { CSIDL_NETWORK, PT_GUID }, - { CSIDL_PRINTERS, PT_YAGUID }, - { CSIDL_PRINTHOOD, PT_FOLDER }, - { CSIDL_PROGRAMS, PT_FOLDER }, - { CSIDL_RECENT, PT_FOLDER }, - { CSIDL_SENDTO, PT_FOLDER }, - { CSIDL_STARTMENU, PT_FOLDER }, - { CSIDL_STARTUP, PT_FOLDER }, - { CSIDL_TEMPLATES, PT_FOLDER }, + { CSIDL_INTERNET, PT_GUID, 0 }, + { CSIDL_NETHOOD, PT_FOLDER, 0 }, + { CSIDL_NETWORK, PT_GUID, 0 }, +/* FIXME: don't know the type of 0x71 returned by Vista/2008 for printers */ + { CSIDL_PRINTERS, PT_YAGUID, 0x71 }, + { CSIDL_PRINTHOOD, PT_FOLDER, 0 }, + { CSIDL_PROGRAMS, PT_FOLDER, 0 }, + { CSIDL_RECENT, PT_FOLDER, PT_IESPECIAL2 }, + { CSIDL_SENDTO, PT_FOLDER, 0 }, + { CSIDL_STARTMENU, PT_FOLDER, 0 }, + { CSIDL_STARTUP, PT_FOLDER, 0 }, + { CSIDL_TEMPLATES, PT_FOLDER, 0 }, }; static const struct shellExpectedValues optionalShellValues[] = { /* FIXME: the following only semi-succeed; they return NULL PIDLs on XP.. hmm. - { CSIDL_ALTSTARTUP, PT_FOLDER }, - { CSIDL_COMMON_ALTSTARTUP, PT_FOLDER }, - { CSIDL_COMMON_OEM_LINKS, PT_FOLDER }, + { CSIDL_ALTSTARTUP, PT_FOLDER, 0 }, + { CSIDL_COMMON_ALTSTARTUP, PT_FOLDER, 0 }, + { CSIDL_COMMON_OEM_LINKS, PT_FOLDER, 0 }, */ /* Windows NT-only: */ - { CSIDL_COMMON_DESKTOPDIRECTORY, PT_FOLDER }, - { CSIDL_COMMON_DOCUMENTS, PT_SHELLEXT }, - { CSIDL_COMMON_FAVORITES, PT_FOLDER }, - { CSIDL_COMMON_PROGRAMS, PT_FOLDER }, - { CSIDL_COMMON_STARTMENU, PT_FOLDER }, - { CSIDL_COMMON_STARTUP, PT_FOLDER }, - { CSIDL_COMMON_TEMPLATES, PT_FOLDER }, + { CSIDL_COMMON_DESKTOPDIRECTORY, PT_FOLDER, 0 }, + { CSIDL_COMMON_DOCUMENTS, PT_SHELLEXT, 0 }, + { CSIDL_COMMON_FAVORITES, PT_FOLDER, 0 }, + { CSIDL_COMMON_PROGRAMS, PT_FOLDER, 0 }, + { CSIDL_COMMON_STARTMENU, PT_FOLDER, 0 }, + { CSIDL_COMMON_STARTUP, PT_FOLDER, 0 }, + { CSIDL_COMMON_TEMPLATES, PT_FOLDER, 0 }, /* first appearing in shell32 version 4.71: */ - { CSIDL_APPDATA, PT_FOLDER }, + { CSIDL_APPDATA, PT_FOLDER, 0 }, /* first appearing in shell32 version 4.72: */ - { CSIDL_INTERNET_CACHE, PT_IESPECIAL2 }, + { CSIDL_INTERNET_CACHE, PT_IESPECIAL2, 0 }, /* first appearing in shell32 version 5.0: */ - { CSIDL_ADMINTOOLS, PT_FOLDER }, - { CSIDL_COMMON_APPDATA, PT_FOLDER }, - { CSIDL_LOCAL_APPDATA, PT_FOLDER }, - { OLD_CSIDL_MYDOCUMENTS, PT_FOLDER }, - { CSIDL_MYMUSIC, PT_FOLDER }, - { CSIDL_MYPICTURES, PT_FOLDER }, - { CSIDL_MYVIDEO, PT_FOLDER }, - { CSIDL_PROFILE, PT_FOLDER }, - { CSIDL_PROGRAM_FILES, PT_FOLDER }, - { CSIDL_PROGRAM_FILESX86, PT_FOLDER }, - { CSIDL_PROGRAM_FILES_COMMON, PT_FOLDER }, - { CSIDL_PROGRAM_FILES_COMMONX86, PT_FOLDER }, - { CSIDL_SYSTEM, PT_FOLDER }, - { CSIDL_WINDOWS, PT_FOLDER }, + { CSIDL_ADMINTOOLS, PT_FOLDER, 0 }, + { CSIDL_COMMON_APPDATA, PT_FOLDER, 0 }, + { CSIDL_LOCAL_APPDATA, PT_FOLDER, 0 }, + { OLD_CSIDL_MYDOCUMENTS, PT_FOLDER, 0 }, + { CSIDL_MYMUSIC, PT_FOLDER, 0 }, + { CSIDL_MYPICTURES, PT_FOLDER, 0 }, + { CSIDL_MYVIDEO, PT_FOLDER, 0 }, + { CSIDL_PROFILE, PT_FOLDER, 0 }, + { CSIDL_PROGRAM_FILES, PT_FOLDER, 0 }, + { CSIDL_PROGRAM_FILESX86, PT_FOLDER, 0 }, + { CSIDL_PROGRAM_FILES_COMMON, PT_FOLDER, 0 }, + { CSIDL_PROGRAM_FILES_COMMONX86, PT_FOLDER, 0 }, + { CSIDL_SYSTEM, PT_FOLDER, 0 }, + { CSIDL_WINDOWS, PT_FOLDER, 0 }, /* first appearing in shell32 6.0: */ - { CSIDL_CDBURN_AREA, PT_FOLDER }, - { CSIDL_COMMON_MUSIC, PT_FOLDER }, - { CSIDL_COMMON_PICTURES, PT_FOLDER }, - { CSIDL_COMMON_VIDEO, PT_FOLDER }, - { CSIDL_COMPUTERSNEARME, PT_WORKGRP }, - { CSIDL_RESOURCES, PT_FOLDER }, - { CSIDL_RESOURCES_LOCALIZED, PT_FOLDER }, + { CSIDL_CDBURN_AREA, PT_FOLDER, 0 }, + { CSIDL_COMMON_MUSIC, PT_FOLDER, 0 }, + { CSIDL_COMMON_PICTURES, PT_FOLDER, 0 }, + { CSIDL_COMMON_VIDEO, PT_FOLDER, 0 }, + { CSIDL_COMPUTERSNEARME, PT_WORKGRP, 0 }, + { CSIDL_RESOURCES, PT_FOLDER, 0 }, + { CSIDL_RESOURCES_LOCALIZED, PT_FOLDER, 0 }, }; static void loadShell32(void) @@ -473,16 +478,36 @@ static void testShellValues(const struct shellExpectedValues testEntries[], if (pSHGetFolderLocation) { type = testSHGetFolderLocation(optional, testEntries[i].folder); - ok(type == testEntries[i].pidlType || optional, + if (!testEntries[i].altPidlType) + ok(type == testEntries[i].pidlType || optional || + broken(type == 0xff) /* Win9x */, + "%s has type %d (0x%02x), expected %d (0x%02x)\n", + getFolderName(testEntries[i].folder), type, type, + testEntries[i].pidlType, testEntries[i].pidlType); + else + ok(type == testEntries[i].pidlType || + type == testEntries[i].altPidlType || + optional || broken(type == 0xff) /* Win9x */, + "%s has type %d (0x%02x), expected %d (0x%02x) or %d (0x%02x)\n", + getFolderName(testEntries[i].folder), type, type, + testEntries[i].pidlType, testEntries[i].pidlType, + testEntries[i].altPidlType, testEntries[i].altPidlType); + } + type = testSHGetSpecialFolderLocation(optional, testEntries[i].folder); + if (!testEntries[i].altPidlType) + ok(type == testEntries[i].pidlType || optional || + broken(type == 0xff) /* Win9x */, "%s has type %d (0x%02x), expected %d (0x%02x)\n", getFolderName(testEntries[i].folder), type, type, testEntries[i].pidlType, testEntries[i].pidlType); - } - type = testSHGetSpecialFolderLocation(optional, testEntries[i].folder); - ok(type == testEntries[i].pidlType || optional, - "%s has type %d (0x%02x), expected %d (0x%02x)\n", - getFolderName(testEntries[i].folder), type, type, - testEntries[i].pidlType, testEntries[i].pidlType); + else + ok(type == testEntries[i].pidlType || + type == testEntries[i].altPidlType || + optional || broken(type == 0xff) /* Win9x */, + "%s has type %d (0x%02x), expected %d (0x%02x) or %d (0x%02x)\n", + getFolderName(testEntries[i].folder), type, type, + testEntries[i].pidlType, testEntries[i].pidlType, + testEntries[i].altPidlType, testEntries[i].altPidlType); switch (type) { case PT_FOLDER: @@ -575,9 +600,10 @@ static void testPersonal(void) if (pSHGetFolderLocation) { type = testSHGetFolderLocation(FALSE, CSIDL_PERSONAL); - ok(type == PT_FOLDER || type == PT_GUID || type == PT_DRIVE, + ok(type == PT_FOLDER || type == PT_GUID || type == PT_DRIVE || + broken(type == 0xff) /* Win9x */, "CSIDL_PERSONAL returned invalid type 0x%02x, " - "expected PT_FOLDER or PT_GUID\n", type); + "expected PT_FOLDER or PT_GUID or PT_DRIVE\n", type); if (type == PT_FOLDER) testSHGetFolderPath(FALSE, CSIDL_PERSONAL); }
1
0
0
0
Juan Lang : shell32: Remove a test that no longer fails on Windows Vista/ 2008.
by Alexandre Julliard
30 Jan '09
30 Jan '09
Module: wine Branch: master Commit: 88cba4390cb1130ffac822ef3d4a43ad464024bb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=88cba4390cb1130ffac822ef3…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Jan 29 17:48:15 2009 -0800 shell32: Remove a test that no longer fails on Windows Vista/2008. --- dlls/shell32/tests/shellpath.c | 7 ------- 1 files changed, 0 insertions(+), 7 deletions(-) diff --git a/dlls/shell32/tests/shellpath.c b/dlls/shell32/tests/shellpath.c index 25122a7..3fcd638 100644 --- a/dlls/shell32/tests/shellpath.c +++ b/dlls/shell32/tests/shellpath.c @@ -303,13 +303,6 @@ static void testSHGetFolderLocationInvalidArgs(void) "SHGetFolderLocation(NULL, CSIDL_FAVORITES, 2, 0, &pidl) returned 0x%08x, expected E_FAIL or E_HANDLE\n", hr); if (SUCCEEDED(hr)) IMalloc_Free(pMalloc, pidl); - /* check reserved is not zero: */ - pidl = NULL; - hr = pSHGetFolderLocation(NULL, CSIDL_DESKTOP, NULL, 1, &pidl); - ok(hr == E_INVALIDARG, - "SHGetFolderLocation(NULL, CSIDL_DESKTOP, NULL, 1, &pidl) returned 0x%08x, expected E_INVALIDARG\n", hr); - if (SUCCEEDED(hr)) - IMalloc_Free(pMalloc, pidl); /* a NULL pidl pointer crashes, so don't test it */ }
1
0
0
0
Juan Lang : shell32: Fix a test on Windows Vista/2008.
by Alexandre Julliard
30 Jan '09
30 Jan '09
Module: wine Branch: master Commit: 6728057954282b332bfa92a3ab61bd0ba447bf4e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6728057954282b332bfa92a3a…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Jan 29 17:46:49 2009 -0800 shell32: Fix a test on Windows Vista/2008. --- dlls/shell32/tests/shellpath.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/shell32/tests/shellpath.c b/dlls/shell32/tests/shellpath.c index d3f85b9..25122a7 100644 --- a/dlls/shell32/tests/shellpath.c +++ b/dlls/shell32/tests/shellpath.c @@ -299,8 +299,8 @@ static void testSHGetFolderLocationInvalidArgs(void) /* check a bogus user token: */ pidl = NULL; hr = pSHGetFolderLocation(NULL, CSIDL_FAVORITES, (HANDLE)2, 0, &pidl); - ok(hr == E_FAIL, - "SHGetFolderLocation(NULL, CSIDL_FAVORITES, 2, 0, &pidl) returned 0x%08x, expected E_FAIL\n", hr); + ok(hr == E_FAIL || hr == E_HANDLE, + "SHGetFolderLocation(NULL, CSIDL_FAVORITES, 2, 0, &pidl) returned 0x%08x, expected E_FAIL or E_HANDLE\n", hr); if (SUCCEEDED(hr)) IMalloc_Free(pMalloc, pidl); /* check reserved is not zero: */
1
0
0
0
Juan Lang : rsaenh: Fix some recently introduced test failures on Win9x/NT4 .
by Alexandre Julliard
30 Jan '09
30 Jan '09
Module: wine Branch: master Commit: e5fcbad5b6c90d2ce7655c536fc76005731312ff URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e5fcbad5b6c90d2ce7655c536…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Jan 29 17:39:05 2009 -0800 rsaenh: Fix some recently introduced test failures on Win9x/NT4. --- dlls/rsaenh/tests/rsaenh.c | 42 ++++++++++++++++++++++++++++-------------- 1 files changed, 28 insertions(+), 14 deletions(-) diff --git a/dlls/rsaenh/tests/rsaenh.c b/dlls/rsaenh/tests/rsaenh.c index 5d58222..b5af81f 100644 --- a/dlls/rsaenh/tests/rsaenh.c +++ b/dlls/rsaenh/tests/rsaenh.c @@ -793,7 +793,8 @@ static void test_rc2(void) result = CryptGetKeyParam(hKey, KP_PERMISSIONS, (BYTE*)&dwModeBits, &dwLen, 0); ok(result, "%08x\n", GetLastError()); ok(dwModeBits == - (CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_DECRYPT|CRYPT_ENCRYPT), + (CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_DECRYPT|CRYPT_ENCRYPT) || + broken(dwModeBits == 0xffffffff), /* Win9x/NT4 */ "expected CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_DECRYPT|CRYPT_ENCRYPT," " got %08x\n", dwModeBits); @@ -1232,7 +1233,8 @@ static void test_import_private(void) result = CryptGetKeyParam(hSessionKey, KP_PERMISSIONS, (BYTE*)&dwVal, &dwLen, 0); ok(result, "%08x\n", GetLastError()); ok(dwVal == - (CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_DECRYPT|CRYPT_ENCRYPT), + (CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_DECRYPT|CRYPT_ENCRYPT) || + broken(dwVal == 0xffffffff), /* Win9x/NT4 */ "expected CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_DECRYPT|CRYPT_ENCRYPT," " got %08x\n", dwVal); @@ -1564,7 +1566,8 @@ static void test_rsa_encrypt(void) result = CryptGetKeyParam(hRSAKey, KP_PERMISSIONS, (BYTE*)&dwVal, &dwLen, 0); ok(result, "%08x\n", GetLastError()); ok(dwVal == - (CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_DECRYPT|CRYPT_ENCRYPT), + (CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_DECRYPT|CRYPT_ENCRYPT) || + broken(dwVal == 0xffffffff), /* Win9x/NT4 */ "expected CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_DECRYPT|CRYPT_ENCRYPT," " got %08x\n", dwVal); @@ -1574,14 +1577,17 @@ static void test_rsa_encrypt(void) /* but its private key may not be. */ SetLastError(0xdeadbeef); result = CryptExportKey(hRSAKey, 0, PRIVATEKEYBLOB, 0, NULL, &dwLen); - ok(!result && GetLastError() == NTE_BAD_KEY_STATE, + ok(!result && + (GetLastError() == NTE_BAD_KEY_STATE || + broken(GetLastError() == 0xdeadbeef) /* Win9x/NT4 */), "expected NTE_BAD_KEY_STATE, got %08x\n", GetLastError()); /* Setting the permissions of the key exchange key isn't allowed, either. */ dwVal |= CRYPT_EXPORT; SetLastError(0xdeadbeef); result = CryptSetKeyParam(hRSAKey, KP_PERMISSIONS, (BYTE *)&dwVal, 0); - ok(!result && GetLastError() == NTE_BAD_DATA, - "expected NTE_BAD_DATA, got %08x\n", GetLastError()); + ok(!result && + (GetLastError() == NTE_BAD_DATA || GetLastError() == NTE_BAD_FLAGS), + "expected NTE_BAD_DATA or NTE_BAD_FLAGS, got %08x\n", GetLastError()); CryptDestroyKey(hRSAKey); @@ -1595,7 +1601,8 @@ static void test_rsa_encrypt(void) result = CryptGetKeyParam(hRSAKey, KP_PERMISSIONS, (BYTE*)&dwVal, &dwLen, 0); ok(result, "%08x\n", GetLastError()); ok(dwVal == - (CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_DECRYPT|CRYPT_ENCRYPT), + (CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_DECRYPT|CRYPT_ENCRYPT) || + broken(dwVal == 0xffffffff), /* Win9x/NT4 */ "expected CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_DECRYPT|CRYPT_ENCRYPT," " got %08x\n", dwVal); @@ -1605,14 +1612,17 @@ static void test_rsa_encrypt(void) /* but its private key may not be. */ SetLastError(0xdeadbeef); result = CryptExportKey(hRSAKey, 0, PRIVATEKEYBLOB, 0, NULL, &dwLen); - ok(!result && GetLastError() == NTE_BAD_KEY_STATE, + ok(!result && + (GetLastError() == NTE_BAD_KEY_STATE || + broken(GetLastError() == 0xdeadbeef) /* Win9x/NT4 */), "expected NTE_BAD_KEY_STATE, got %08x\n", GetLastError()); /* Setting the permissions of the signature key isn't allowed, either. */ dwVal |= CRYPT_EXPORT; SetLastError(0xdeadbeef); result = CryptSetKeyParam(hRSAKey, KP_PERMISSIONS, (BYTE *)&dwVal, 0); - ok(!result && GetLastError() == NTE_BAD_DATA, - "expected NTE_BAD_DATA, got %08x\n", GetLastError()); + ok(!result && + (GetLastError() == NTE_BAD_DATA || GetLastError() == NTE_BAD_FLAGS), + "expected NTE_BAD_DATA or NTE_BAD_FLAGS, got %08x\n", GetLastError()); dwLen = 12; result = CryptEncrypt(hRSAKey, 0, TRUE, 0, abData, &dwLen, (DWORD)sizeof(abData)); @@ -1656,7 +1666,8 @@ static void test_import_export(void) result = CryptGetKeyParam(hPublicKey, KP_PERMISSIONS, (BYTE*)&dwVal, &dwDataLen, 0); ok(result, "%08x\n", GetLastError()); ok(dwVal == - (CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_DECRYPT|CRYPT_ENCRYPT), + (CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_DECRYPT|CRYPT_ENCRYPT) || + broken(dwVal == 0xffffffff), /* Win9x/NT4 */ "expected CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_DECRYPT|CRYPT_ENCRYPT," " got %08x\n", dwVal); result = CryptExportKey(hPublicKey, 0, PUBLICKEYBLOB, 0, emptyKey, &dwLen); @@ -2134,7 +2145,8 @@ static void test_key_permissions(void) result = CryptGetKeyParam(hKey1, KP_PERMISSIONS, (BYTE*)&dwVal, &dwLen, 0); ok(result, "%08x\n", GetLastError()); ok(dwVal == - (CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_EXPORT|CRYPT_DECRYPT|CRYPT_ENCRYPT), + (CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_EXPORT|CRYPT_DECRYPT|CRYPT_ENCRYPT) || + broken(dwVal == 0xffffffff), /* Win9x/NT4 */ "expected CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_EXPORT|CRYPT_DECRYPT|CRYPT_ENCRYPT," " got %08x\n", dwVal); @@ -2154,7 +2166,8 @@ static void test_key_permissions(void) result = CryptGetKeyParam(hKey1, KP_PERMISSIONS, (BYTE*)&dwVal, &dwLen, 0); ok(result, "%08x\n", GetLastError()); ok(dwVal == - (CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_EXPORT|CRYPT_DECRYPT|CRYPT_ENCRYPT), + (CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_EXPORT|CRYPT_DECRYPT|CRYPT_ENCRYPT) || + broken(dwVal == 0xffffffff), /* Win9x/NT4 */ "expected CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_EXPORT|CRYPT_DECRYPT|CRYPT_ENCRYPT," " got %08x\n", dwVal); /* Thus, changing the export flag of the key doesn't affect whether the key @@ -2174,7 +2187,8 @@ static void test_key_permissions(void) result = CryptGetKeyParam(hKey2, KP_PERMISSIONS, (BYTE*)&dwVal, &dwLen, 0); ok(result, "%08x\n", GetLastError()); ok(dwVal == - (CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_EXPORT|CRYPT_DECRYPT|CRYPT_ENCRYPT), + (CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_EXPORT|CRYPT_DECRYPT|CRYPT_ENCRYPT) || + broken(dwVal == 0xffffffff), /* Win9x/NT4 */ "expected CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_EXPORT|CRYPT_DECRYPT|CRYPT_ENCRYPT," " got %08x\n", dwVal);
1
0
0
0
← Newer
1
2
3
4
5
...
135
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
Results per page:
10
25
50
100
200