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
Rob Shearman : oleaut32: Move the debug logging of the variable type in SLTG_DoVars.
by Alexandre Julliard
30 Jul '08
30 Jul '08
Module: wine Branch: master Commit: 0ed6ebfec1b271d5595212d14048cf291d3fd964 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0ed6ebfec1b271d5595212d14…
Author: Rob Shearman <robertshearman(a)gmail.com> Date: Wed Jul 30 13:18:16 2008 +0100 oleaut32: Move the debug logging of the variable type in SLTG_DoVars. Move it before loading of the constant data to allow better debugging of problems during the processing of loading the constant data. --- dlls/oleaut32/typelib.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index f190065..aaff551 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -3135,6 +3135,12 @@ static void SLTG_DoVars(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, unsign SLTG_DoElem(pType, pBlk, &(*ppVarDesc)->vardesc.elemdescVar, ref_lookup); + if (TRACE_ON(typelib)) { + char buf[300]; + dump_TypeDesc(&(*ppVarDesc)->vardesc.elemdescVar.tdesc, buf); + TRACE_(typelib)("elemdescVar: %s\n", buf); + } + if (pItem->flags & 0x40) { TRACE_(typelib)("VAR_DISPATCH\n"); (*ppVarDesc)->vardesc.varkind = VAR_DISPATCH; @@ -3186,12 +3192,6 @@ static void SLTG_DoVars(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, unsign if (pItem->flags & 0x80) (*ppVarDesc)->vardesc.wVarFlags |= VARFLAG_FREADONLY; - if (TRACE_ON(typelib)) { - char buf[300]; - dump_TypeDesc(&(*ppVarDesc)->vardesc.elemdescVar.tdesc, buf); - TRACE_(typelib)("elemdescVar: %s\n", buf); - } - bstrPrevName = (*ppVarDesc)->Name; ppVarDesc = &((*ppVarDesc)->next); }
1
0
0
0
Rob Shearman : oleaut32: Use the typelib debug channel for debug messages output during loading of SLTG typelibs .
by Alexandre Julliard
30 Jul '08
30 Jul '08
Module: wine Branch: master Commit: 48c5a06916359db98451d1a8fc0ba202224a086b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=48c5a06916359db98451d1a8f…
Author: Rob Shearman <robertshearman(a)gmail.com> Date: Wed Jul 30 13:17:56 2008 +0100 oleaut32: Use the typelib debug channel for debug messages output during loading of SLTG typelibs. --- dlls/oleaut32/typelib.c | 35 ++++++++++++++++++----------------- 1 files changed, 18 insertions(+), 17 deletions(-) diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 472ab8d..f190065 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -2882,7 +2882,7 @@ static HRESULT sltg_get_typelib_ref(const sltg_ref_lookup_t *table, DWORD typein return S_OK; } - ERR("Unable to find reference\n"); + ERR_(typelib)("Unable to find reference\n"); *typelib_ref = -1; return E_FAIL; } @@ -3007,7 +3007,7 @@ static sltg_ref_lookup_t *SLTG_DoRefs(SLTG_RefInfo *pRef, ITypeLibImpl *pTL, name += SLTG_ReadStringA(name, &refname); if(sscanf(refname, "*\\R%x*#%x", &lib_offs, &type_num) != 2) - FIXME("Can't sscanf ref\n"); + FIXME_(typelib)("Can't sscanf ref\n"); if(lib_offs != 0xffff) { TLBImpLib **import = &pTL->pImpLibs; @@ -3029,7 +3029,7 @@ static sltg_ref_lookup_t *SLTG_DoRefs(SLTG_RefInfo *pRef, ITypeLibImpl *pTL, &(*import)->wVersionMajor, &(*import)->wVersionMinor, &(*import)->lcid, fname) != 4) { - FIXME("can't sscanf ref %s\n", + FIXME_(typelib)("can't sscanf ref %s\n", pNameTable + lib_offs + 40); } len = strlen(fname); @@ -3057,7 +3057,7 @@ static sltg_ref_lookup_t *SLTG_DoRefs(SLTG_RefInfo *pRef, ITypeLibImpl *pTL, typelib_ref += 4; } if((BYTE)*name != SLTG_REF_MAGIC) - FIXME("End of ref block magic = %x\n", *name); + FIXME_(typelib)("End of ref block magic = %x\n", *name); dump_TLBRefType(pTL); return table; } @@ -3086,7 +3086,7 @@ static char *SLTG_DoImpls(char *pBlk, ITypeInfoImpl *pTI, if(info->next == 0xffff) break; if(OneOnly) - FIXME("Interface inheriting more than one interface\n"); + FIXME_(typelib)("Interface inheriting more than one interface\n"); info = (SLTG_ImplInfo*)(pBlk + info->next); } info++; /* see comment at top of function */ @@ -3170,7 +3170,7 @@ static void SLTG_DoVars(char *pBlk, char *pFirstItem, ITypeInfoImpl *pTI, unsign *(INT*)(pBlk + pItem->byte_offs); break; default: - FIXME("VAR_CONST unimplemented for type %d\n", (*ppVarDesc)->vardesc.elemdescVar.tdesc.vt); + FIXME_(typelib)("VAR_CONST unimplemented for type %d\n", (*ppVarDesc)->vardesc.elemdescVar.tdesc.vt); } } } @@ -3491,7 +3491,7 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength) TRACE_(typelib)("\tmagic=0x%08x, file blocks = %d\n", pHeader->SLTG_magic, pHeader->nrOfFileBlks ); if (pHeader->SLTG_magic != SLTG_SIGNATURE) { - FIXME("Header type magic 0x%08x not supported.\n", + FIXME_(typelib)("Header type magic 0x%08x not supported.\n", pHeader->SLTG_magic); return NULL; } @@ -3508,12 +3508,12 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength) /* Let's see if we're still in sync */ if(memcmp(pMagic->CompObj_magic, SLTG_COMPOBJ_MAGIC, sizeof(SLTG_COMPOBJ_MAGIC))) { - FIXME("CompObj magic = %s\n", pMagic->CompObj_magic); + FIXME_(typelib)("CompObj magic = %s\n", pMagic->CompObj_magic); return NULL; } if(memcmp(pMagic->dir_magic, SLTG_DIR_MAGIC, sizeof(SLTG_DIR_MAGIC))) { - FIXME("dir magic = %s\n", pMagic->dir_magic); + FIXME_(typelib)("dir magic = %s\n", pMagic->dir_magic); return NULL; } @@ -3607,7 +3607,7 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength) pNameTable += 0x20; break; default: - FIXME("pNameTable jump = %x\n", *(WORD*)pNameTable); + FIXME_(typelib)("pNameTable jump = %x\n", *(WORD*)pNameTable); break; } @@ -3615,7 +3615,7 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength) pNameTable += 2; - TRACE("Library name is %s\n", pNameTable + pLibBlk->name); + TRACE_(typelib)("Library name is %s\n", pNameTable + pLibBlk->name); pTypeLibImpl->Name = TLB_MultiByteToBSTR(pNameTable + pLibBlk->name); @@ -3637,16 +3637,17 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength) if(strcmp(pBlkEntry[order].index_string + (char*)pMagic, pOtherTypeInfoBlks[i].index_name)) { - FIXME("Index strings don't match\n"); + FIXME_(typelib)("Index strings don't match\n"); return NULL; } pTIHeader = pBlk; if(pTIHeader->magic != SLTG_TIHEADER_MAGIC) { - FIXME("TypeInfoHeader magic = %04x\n", pTIHeader->magic); + FIXME_(typelib)("TypeInfoHeader magic = %04x\n", pTIHeader->magic); return NULL; } - TRACE("pTIHeader->res06 = %x, pTIHeader->res0e = %x, pTIHeader->res16 = %x, pTIHeader->res1e = %x\n", + TRACE_(typelib)("pTIHeader->res06 = %x, pTIHeader->res0e = %x, " + "pTIHeader->res16 = %x, pTIHeader->res1e = %x\n", pTIHeader->res06, pTIHeader->res0e, pTIHeader->res16, pTIHeader->res1e); *ppTypeInfoImpl = (ITypeInfoImpl*)ITypeInfo_Constructor(); @@ -3664,11 +3665,11 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength) (pTIHeader->typeflags1 >> 3) | (pTIHeader->typeflags2 << 5); if((pTIHeader->typeflags1 & 7) != 2) - FIXME("typeflags1 = %02x\n", pTIHeader->typeflags1); + FIXME_(typelib)("typeflags1 = %02x\n", pTIHeader->typeflags1); if(pTIHeader->typeflags3 != 2) - FIXME("typeflags3 = %02x\n", pTIHeader->typeflags3); + FIXME_(typelib)("typeflags3 = %02x\n", pTIHeader->typeflags3); - TRACE("TypeInfo %s of kind %s guid %s typeflags %04x\n", + TRACE_(typelib)("TypeInfo %s of kind %s guid %s typeflags %04x\n", debugstr_w((*ppTypeInfoImpl)->Name), typekind_desc[pTIHeader->typekind], debugstr_guid(&(*ppTypeInfoImpl)->TypeAttr.guid),
1
0
0
0
Nikolay Sivov : gdiplus: Implemented GdipStringFormatGetGenericDefault with tests.
by Alexandre Julliard
30 Jul '08
30 Jul '08
Module: wine Branch: master Commit: 341f32a36d9b31b1c2d9b5388a93114c73838fba URL:
http://source.winehq.org/git/wine.git/?a=commit;h=341f32a36d9b31b1c2d9b5388…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Wed Jul 30 15:07:04 2008 +0400 gdiplus: Implemented GdipStringFormatGetGenericDefault with tests. --- dlls/gdiplus/stringformat.c | 11 ++++++++- dlls/gdiplus/tests/stringformat.c | 42 +++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/dlls/gdiplus/stringformat.c b/dlls/gdiplus/stringformat.c index 2f8a290..201201a 100644 --- a/dlls/gdiplus/stringformat.c +++ b/dlls/gdiplus/stringformat.c @@ -67,12 +67,19 @@ GpStatus WINGDIPAPI GdipDeleteStringFormat(GpStringFormat *format) GpStatus WINGDIPAPI GdipStringFormatGetGenericDefault(GpStringFormat **format) { + GpStatus stat; + if (!format) return InvalidParameter; - FIXME("stub: %p\n", format); + stat = GdipCreateStringFormat(0, LANG_NEUTRAL, format); + if(stat != Ok) + return stat; - return NotImplemented; + (*format)->align = StringAlignmentNear; + (*format)->vertalign = StringAlignmentNear; + + return Ok; } GpStatus WINGDIPAPI GdipGetStringFormatAlign(GpStringFormat *format, diff --git a/dlls/gdiplus/tests/stringformat.c b/dlls/gdiplus/tests/stringformat.c index c851f1b..9331912 100644 --- a/dlls/gdiplus/tests/stringformat.c +++ b/dlls/gdiplus/tests/stringformat.c @@ -277,6 +277,47 @@ static void test_tabstops(void) expect(Ok, stat); } +static void test_getgenericdefault(void) +{ + GpStringFormat *format; + GpStatus stat; + + INT flags; + INT n; + StringAlignment align, valign; + StringTrimming trimming; + StringDigitSubstitute digitsub; + LANGID digitlang; + INT tabcount; + + /* NULL arg */ + stat = GdipStringFormatGetGenericDefault(NULL); + expect(InvalidParameter, stat); + + stat = GdipStringFormatGetGenericDefault(&format); + expect(Ok, stat); + + GdipGetStringFormatFlags(format, &flags); + GdipGetStringFormatAlign(format, &align); + GdipGetStringFormatLineAlign(format, &valign); + GdipGetStringFormatHotkeyPrefix(format, &n); + GdipGetStringFormatTrimming(format, &trimming); + GdipGetStringFormatDigitSubstitution(format, &digitlang, &digitsub); + GdipGetStringFormatTabStopCount(format, &tabcount); + + expect(0, flags); + expect(HotkeyPrefixNone, n); + expect(StringAlignmentNear, align); + expect(StringAlignmentNear, align); + expect(StringTrimmingCharacter, trimming); + expect(StringDigitSubstituteUser, digitsub); + expect(LANG_NEUTRAL, digitlang); + expect(0, tabcount); + + stat = GdipDeleteStringFormat(format); + expect(Ok, stat); +} + START_TEST(stringformat) { struct GdiplusStartupInput gdiplusStartupInput; @@ -294,6 +335,7 @@ START_TEST(stringformat) test_digitsubstitution(); test_getgenerictypographic(); test_tabstops(); + test_getgenericdefault(); GdiplusShutdown(gdiplusToken); }
1
0
0
0
Nikolay Sivov : gdiplus: Use LANG_NEUTRAL instead of 0.
by Alexandre Julliard
30 Jul '08
30 Jul '08
Module: wine Branch: master Commit: e3a0a1809faaef3e448aaa515d8779135d37b817 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e3a0a1809faaef3e448aaa515…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Wed Jul 30 15:06:58 2008 +0400 gdiplus: Use LANG_NEUTRAL instead of 0. --- dlls/gdiplus/tests/stringformat.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/tests/stringformat.c b/dlls/gdiplus/tests/stringformat.c index 3294304..c851f1b 100644 --- a/dlls/gdiplus/tests/stringformat.c +++ b/dlls/gdiplus/tests/stringformat.c @@ -35,7 +35,7 @@ static void test_constructor(void) StringDigitSubstitute digitsub; LANGID digitlang; - stat = GdipCreateStringFormat(0, 0, &format); + stat = GdipCreateStringFormat(0, LANG_NEUTRAL, &format); expect(Ok, stat); GdipGetStringFormatAlign(format, &align);
1
0
0
0
Nikolay Sivov : gdiplus: Implemented Gdip[Get/Set] StringFormatTabStops with tests.
by Alexandre Julliard
30 Jul '08
30 Jul '08
Module: wine Branch: master Commit: f44034a7d4d4b773e175261b2c13c3b6e99ede18 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f44034a7d4d4b773e175261b2…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Wed Jul 30 15:06:50 2008 +0400 gdiplus: Implemented Gdip[Get/Set]StringFormatTabStops with tests. --- dlls/gdiplus/gdiplus.spec | 4 +- dlls/gdiplus/stringformat.c | 45 +++++++++++++++++++++ dlls/gdiplus/tests/stringformat.c | 80 +++++++++++++++++++++++++++++++++++++ include/gdiplusflat.h | 2 + 4 files changed, 129 insertions(+), 2 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index e645f06..661cb8f 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -393,7 +393,7 @@ @ stdcall GdipGetStringFormatLineAlign(ptr ptr) @ stdcall GdipGetStringFormatMeasurableCharacterRangeCount(ptr ptr) @ stdcall GdipGetStringFormatTabStopCount(ptr ptr) -@ stub GdipGetStringFormatTabStops +@ stdcall GdipGetStringFormatTabStops(ptr long ptr ptr) @ stdcall GdipGetStringFormatTrimming(ptr ptr) @ stub GdipGetTextContrast @ stdcall GdipGetTextRenderingHint(ptr ptr) @@ -591,7 +591,7 @@ @ stdcall GdipSetStringFormatHotkeyPrefix(ptr long) @ stdcall GdipSetStringFormatLineAlign(ptr long) @ stdcall GdipSetStringFormatMeasurableCharacterRanges(ptr long ptr) -@ stub GdipSetStringFormatTabStops +@ stdcall GdipSetStringFormatTabStops(ptr long long ptr) @ stdcall GdipSetStringFormatTrimming(ptr long) @ stub GdipSetTextContrast @ stdcall GdipSetTextRenderingHint(ptr long) diff --git a/dlls/gdiplus/stringformat.c b/dlls/gdiplus/stringformat.c index 2c37d81..2f8a290 100644 --- a/dlls/gdiplus/stringformat.c +++ b/dlls/gdiplus/stringformat.c @@ -153,6 +153,21 @@ GpStatus WINGDIPAPI GdipGetStringFormatTabStopCount(GDIPCONST GpStringFormat *fo return Ok; } +GpStatus WINGDIPAPI GdipGetStringFormatTabStops(GDIPCONST GpStringFormat *format, INT count, + REAL *firsttab, REAL *tabs) +{ + if(!format || !firsttab || !tabs) + return InvalidParameter; + + /* native simply crashes on count < 0 */ + if(count != 0) + memcpy(tabs, format->tabs, sizeof(REAL)*count); + + *firsttab = format->firsttab; + + return Ok; +} + GpStatus WINGDIPAPI GdipGetStringFormatTrimming(GpStringFormat *format, StringTrimming *trimming) { @@ -221,6 +236,36 @@ GpStatus WINGDIPAPI GdipSetStringFormatMeasurableCharacterRanges(GpStringFormat* return NotImplemented; } +GpStatus WINGDIPAPI GdipSetStringFormatTabStops(GpStringFormat *format, REAL firsttab, + INT count, GDIPCONST REAL *tabs) +{ + if(!format || !tabs) + return InvalidParameter; + + if(count > 0){ + if(firsttab < 0.0) return NotImplemented; + /* first time allocation */ + if(format->tabcount == 0){ + format->tabs = GdipAlloc(sizeof(REAL)*count); + if(!format->tabs) + return OutOfMemory; + } + /* reallocation */ + if((format->tabcount < count) && (format->tabcount > 0)){ + REAL *ptr; + ptr = HeapReAlloc(GetProcessHeap(), 0, format->tabs, sizeof(REAL)*count); + if(!ptr) + return OutOfMemory; + format->tabs = ptr; + } + format->firsttab = firsttab; + format->tabcount = count; + memcpy(format->tabs, tabs, sizeof(REAL)*count); + } + + return Ok; +} + GpStatus WINGDIPAPI GdipSetStringFormatTrimming(GpStringFormat *format, StringTrimming trimming) { diff --git a/dlls/gdiplus/tests/stringformat.c b/dlls/gdiplus/tests/stringformat.c index 376173c..3294304 100644 --- a/dlls/gdiplus/tests/stringformat.c +++ b/dlls/gdiplus/tests/stringformat.c @@ -23,6 +23,7 @@ #include "wine/test.h" #define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) +#define expectf(expected, got) ok(got == expected, "Expected %.2f, got %.2f\n", expected, got) static void test_constructor(void) { @@ -171,11 +172,14 @@ static void test_getgenerictypographic(void) expect(Ok, stat); } +static REAL tabstops[] = {0.0, 10.0, 2.0}; static void test_tabstops(void) { GpStringFormat *format; GpStatus stat; INT count; + REAL tabs[3]; + REAL firsttab; stat = GdipCreateStringFormat(0, LANG_NEUTRAL, &format); expect(Ok, stat); @@ -188,10 +192,86 @@ static void test_tabstops(void) stat = GdipGetStringFormatTabStopCount(format, NULL); expect(InvalidParameter, stat); + stat = GdipSetStringFormatTabStops(NULL, 0.0, 0, NULL); + expect(InvalidParameter, stat); + stat = GdipSetStringFormatTabStops(format, 0.0, 0, NULL); + expect(InvalidParameter, stat); + stat = GdipSetStringFormatTabStops(NULL, 0.0, 0, tabstops); + expect(InvalidParameter, stat); + + stat = GdipGetStringFormatTabStops(NULL, 0, NULL, NULL); + expect(InvalidParameter, stat); + stat = GdipGetStringFormatTabStops(format, 0, NULL, NULL); + expect(InvalidParameter, stat); + stat = GdipGetStringFormatTabStops(NULL, 0, &firsttab, NULL); + expect(InvalidParameter, stat); + stat = GdipGetStringFormatTabStops(NULL, 0, NULL, tabs); + expect(InvalidParameter, stat); + stat = GdipGetStringFormatTabStops(format, 0, &firsttab, NULL); + expect(InvalidParameter, stat); + stat = GdipGetStringFormatTabStops(format, 0, NULL, tabs); + expect(InvalidParameter, stat); + /* not NULL */ stat = GdipGetStringFormatTabStopCount(format, &count); expect(Ok, stat); expect(0, count); + /* negative tabcount */ + stat = GdipSetStringFormatTabStops(format, 0.0, -1, tabstops); + expect(Ok, stat); + count = -1; + stat = GdipGetStringFormatTabStopCount(format, &count); + expect(Ok, stat); + expect(0, count); + + stat = GdipSetStringFormatTabStops(format, -10.0, 0, tabstops); + expect(Ok, stat); + stat = GdipSetStringFormatTabStops(format, -10.0, 1, tabstops); + expect(NotImplemented, stat); + + firsttab = -1.0; + tabs[0] = tabs[1] = tabs[2] = -1.0; + stat = GdipGetStringFormatTabStops(format, 0, &firsttab, tabs); + expect(Ok, stat); + expectf(-1.0, tabs[0]); + expectf(-1.0, tabs[1]); + expectf(-1.0, tabs[2]); + expectf(0.0, firsttab); + + stat = GdipSetStringFormatTabStops(format, +0.0, 3, tabstops); + expect(Ok, stat); + count = 0; + stat = GdipGetStringFormatTabStopCount(format, &count); + expect(Ok, stat); + expect(3, count); + + firsttab = -1.0; + tabs[0] = tabs[1] = tabs[2] = -1.0; + stat = GdipGetStringFormatTabStops(format, 3, &firsttab, tabs); + expect(Ok, stat); + expectf(0.0, tabs[0]); + expectf(10.0, tabs[1]); + expectf(2.0, tabs[2]); + expectf(0.0, firsttab); + + stat = GdipSetStringFormatTabStops(format, 10.0, 3, tabstops); + expect(Ok, stat); + firsttab = -1.0; + tabs[0] = tabs[1] = tabs[2] = -1.0; + stat = GdipGetStringFormatTabStops(format, 0, &firsttab, tabs); + expect(Ok, stat); + expectf(-1.0, tabs[0]); + expectf(-1.0, tabs[1]); + expectf(-1.0, tabs[2]); + expectf(10.0, firsttab); + + /* zero tabcount, after valid setting to 3 */ + stat = GdipSetStringFormatTabStops(format, 0.0, 0, tabstops); + expect(Ok, stat); + count = 0; + stat = GdipGetStringFormatTabStopCount(format, &count); + expect(Ok, stat); + expect(3, count); stat = GdipDeleteStringFormat(format); expect(Ok, stat); diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 9d1e9f1..f5705a7 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -445,6 +445,7 @@ GpStatus WINGDIPAPI GdipGetStringFormatLineAlign(GpStringFormat*,StringAlignment GpStatus WINGDIPAPI GdipGetStringFormatMeasurableCharacterRangeCount( GDIPCONST GpStringFormat*, INT*); GpStatus WINGDIPAPI GdipGetStringFormatTabStopCount(GDIPCONST GpStringFormat*,INT*); +GpStatus WINGDIPAPI GdipGetStringFormatTabStops(GDIPCONST GpStringFormat*,INT,REAL*,REAL*); GpStatus WINGDIPAPI GdipGetStringFormatTrimming(GpStringFormat*,StringTrimming*); GpStatus WINGDIPAPI GdipSetStringFormatAlign(GpStringFormat*,StringAlignment); GpStatus WINGDIPAPI GdipSetStringFormatDigitSubstitution(GpStringFormat*,LANGID,StringDigitSubstitute); @@ -452,6 +453,7 @@ GpStatus WINGDIPAPI GdipSetStringFormatHotkeyPrefix(GpStringFormat*,INT); GpStatus WINGDIPAPI GdipSetStringFormatLineAlign(GpStringFormat*,StringAlignment); GpStatus WINGDIPAPI GdipSetStringFormatMeasurableCharacterRanges( GpStringFormat*, INT, GDIPCONST CharacterRange*); +GpStatus WINGDIPAPI GdipSetStringFormatTabStops(GpStringFormat*,REAL,INT,GDIPCONST REAL*); GpStatus WINGDIPAPI GdipSetStringFormatTrimming(GpStringFormat*,StringTrimming); GpStatus WINGDIPAPI GdipCloneStringFormat(GDIPCONST GpStringFormat*,GpStringFormat**);
1
0
0
0
Nikolay Sivov : gdiplus: GdipGetStringFormatTabStopCount implementation with tests.
by Alexandre Julliard
30 Jul '08
30 Jul '08
Module: wine Branch: master Commit: 4a08c13ba90441995991b9697e7b5cc77ad61d0d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4a08c13ba90441995991b9697…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Wed Jul 30 15:06:39 2008 +0400 gdiplus: GdipGetStringFormatTabStopCount implementation with tests. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/gdiplus_private.h | 3 +++ dlls/gdiplus/stringformat.c | 28 +++++++++++++++++++++++++++- dlls/gdiplus/tests/stringformat.c | 30 ++++++++++++++++++++++++++++++ include/gdiplusflat.h | 1 + 5 files changed, 62 insertions(+), 2 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 0579ebe..e645f06 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -392,7 +392,7 @@ @ stdcall GdipGetStringFormatHotkeyPrefix(ptr ptr) @ stdcall GdipGetStringFormatLineAlign(ptr ptr) @ stdcall GdipGetStringFormatMeasurableCharacterRangeCount(ptr ptr) -@ stub GdipGetStringFormatTabStopCount +@ stdcall GdipGetStringFormatTabStopCount(ptr ptr) @ stub GdipGetStringFormatTabStops @ stdcall GdipGetStringFormatTrimming(ptr ptr) @ stub GdipGetTextContrast diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h index cb5f821..b445a58 100644 --- a/dlls/gdiplus/gdiplus_private.h +++ b/dlls/gdiplus/gdiplus_private.h @@ -194,6 +194,9 @@ struct GpStringFormat{ HotkeyPrefix hkprefix; StringAlignment vertalign; StringDigitSubstitute digitsub; + INT tabcount; + REAL firsttab; + REAL *tabs; }; struct GpFontCollection{ diff --git a/dlls/gdiplus/stringformat.c b/dlls/gdiplus/stringformat.c index 1be075b..2c37d81 100644 --- a/dlls/gdiplus/stringformat.c +++ b/dlls/gdiplus/stringformat.c @@ -46,6 +46,10 @@ GpStatus WINGDIPAPI GdipCreateStringFormat(INT attr, LANGID lang, (*format)->digitlang = LANG_NEUTRAL; (*format)->trimming = StringTrimmingCharacter; (*format)->digitsub = StringDigitSubstituteUser; + /* tabstops */ + (*format)->tabcount = 0; + (*format)->firsttab = 0.0; + (*format)->tabs = NULL; return Ok; } @@ -55,6 +59,7 @@ GpStatus WINGDIPAPI GdipDeleteStringFormat(GpStringFormat *format) if(!format) return InvalidParameter; + GdipFree(format->tabs); GdipFree(format); return Ok; @@ -137,6 +142,17 @@ GpStatus WINGDIPAPI GdipGetStringFormatMeasurableCharacterRangeCount( return NotImplemented; } +GpStatus WINGDIPAPI GdipGetStringFormatTabStopCount(GDIPCONST GpStringFormat *format, + INT *count) +{ + if(!format || !count) + return InvalidParameter; + + *count = format->tabcount; + + return Ok; +} + GpStatus WINGDIPAPI GdipGetStringFormatTrimming(GpStringFormat *format, StringTrimming *trimming) { @@ -233,12 +249,22 @@ GpStatus WINGDIPAPI GdipCloneStringFormat(GDIPCONST GpStringFormat *format, GpSt **newFormat = *format; + if(format->tabcount > 0){ + (*newFormat)->tabs = GdipAlloc(sizeof(REAL) * format->tabcount); + if(!(*newFormat)->tabs){ + GdipFree(*newFormat); + return OutOfMemory; + } + memcpy((*newFormat)->tabs, format->tabs, sizeof(REAL) * format->tabcount); + } + else + (*newFormat)->tabs = NULL; + TRACE("%p %p\n",format,newFormat); return Ok; } -/*FIXME: add zero tab stops number */ GpStatus WINGDIPAPI GdipStringFormatGetGenericTypographic(GpStringFormat **format) { GpStatus stat; diff --git a/dlls/gdiplus/tests/stringformat.c b/dlls/gdiplus/tests/stringformat.c index ae93104..376173c 100644 --- a/dlls/gdiplus/tests/stringformat.c +++ b/dlls/gdiplus/tests/stringformat.c @@ -140,6 +140,7 @@ static void test_getgenerictypographic(void) StringTrimming trimming; StringDigitSubstitute digitsub; LANGID digitlang; + INT tabcount; /* NULL arg */ stat = GdipStringFormatGetGenericTypographic(NULL); @@ -154,6 +155,7 @@ static void test_getgenerictypographic(void) GdipGetStringFormatHotkeyPrefix(format, &n); GdipGetStringFormatTrimming(format, &trimming); GdipGetStringFormatDigitSubstitution(format, &digitlang, &digitsub); + GdipGetStringFormatTabStopCount(format, &tabcount); expect((StringFormatFlagsNoFitBlackBox |StringFormatFlagsLineLimit | StringFormatFlagsNoClip), flags); @@ -163,6 +165,33 @@ static void test_getgenerictypographic(void) expect(StringTrimmingNone, trimming); expect(StringDigitSubstituteUser, digitsub); expect(LANG_NEUTRAL, digitlang); + expect(0, tabcount); + + stat = GdipDeleteStringFormat(format); + expect(Ok, stat); +} + +static void test_tabstops(void) +{ + GpStringFormat *format; + GpStatus stat; + INT count; + + stat = GdipCreateStringFormat(0, LANG_NEUTRAL, &format); + expect(Ok, stat); + + /* NULL */ + stat = GdipGetStringFormatTabStopCount(NULL, NULL); + expect(InvalidParameter, stat); + stat = GdipGetStringFormatTabStopCount(NULL, &count); + expect(InvalidParameter, stat); + stat = GdipGetStringFormatTabStopCount(format, NULL); + expect(InvalidParameter, stat); + + /* not NULL */ + stat = GdipGetStringFormatTabStopCount(format, &count); + expect(Ok, stat); + expect(0, count); stat = GdipDeleteStringFormat(format); expect(Ok, stat); @@ -184,6 +213,7 @@ START_TEST(stringformat) test_characterrange(); test_digitsubstitution(); test_getgenerictypographic(); + test_tabstops(); GdiplusShutdown(gdiplusToken); } diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 963c9c6..9d1e9f1 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -444,6 +444,7 @@ GpStatus WINGDIPAPI GdipGetStringFormatHotkeyPrefix(GDIPCONST GpStringFormat*,IN GpStatus WINGDIPAPI GdipGetStringFormatLineAlign(GpStringFormat*,StringAlignment*); GpStatus WINGDIPAPI GdipGetStringFormatMeasurableCharacterRangeCount( GDIPCONST GpStringFormat*, INT*); +GpStatus WINGDIPAPI GdipGetStringFormatTabStopCount(GDIPCONST GpStringFormat*,INT*); GpStatus WINGDIPAPI GdipGetStringFormatTrimming(GpStringFormat*,StringTrimming*); GpStatus WINGDIPAPI GdipSetStringFormatAlign(GpStringFormat*,StringAlignment); GpStatus WINGDIPAPI GdipSetStringFormatDigitSubstitution(GpStringFormat*,LANGID,StringDigitSubstitute);
1
0
0
0
Lei Zhang : cmd: Check the return value from HeapAlloc.
by Alexandre Julliard
30 Jul '08
30 Jul '08
Module: wine Branch: master Commit: e6bce797d3b1f13495637862e1b01fc8e5b41e3c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e6bce797d3b1f13495637862e…
Author: Lei Zhang <thestig(a)google.com> Date: Mon Jul 28 14:45:21 2008 -0700 cmd: Check the return value from HeapAlloc. --- programs/cmd/wcmdmain.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index 8d09967..454bd3c 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -601,10 +601,21 @@ void WCMD_execute (WCHAR *command, WCHAR *redirects, /* Move copy of the command onto the heap so it can be expanded */ new_cmd = HeapAlloc( GetProcessHeap(), 0, MAXSTRING * sizeof(WCHAR)); + if (!new_cmd) + { + WINE_ERR("Could not allocate memory for new_cmd\n"); + return; + } strcpyW(new_cmd, command); /* Move copy of the redirects onto the heap so it can be expanded */ new_redir = HeapAlloc( GetProcessHeap(), 0, MAXSTRING * sizeof(WCHAR)); + if (!new_redir) + { + WINE_ERR("Could not allocate memory for new_redir\n"); + HeapFree( GetProcessHeap(), 0, new_cmd ); + return; + } /* If piped output, send stdout to the pipe by appending >filename to redirects */ if (piped) { @@ -2086,6 +2097,11 @@ WCHAR *WCMD_ReadAndParseLine(WCHAR *optionalcmd, CMD_LIST **output, HANDLE readF /* Allocate working space for a command read from keyboard, file etc */ if (!extraSpace) extraSpace = HeapAlloc(GetProcessHeap(), 0, (MAXSTRING+1) * sizeof(WCHAR)); + if (!extraSpace) + { + WINE_ERR("Could not allocate memory for extraSpace\n"); + return NULL; + } /* If initial command read in, use that, otherwise get input from handle */ if (optionalcmd != NULL) {
1
0
0
0
Alexander Dorofeyev : wined3d: Add ActivateContext in color_fill_fbo.
by Alexandre Julliard
30 Jul '08
30 Jul '08
Module: wine Branch: master Commit: 76e02581a900ed4d7e0378f2a287f9a8f2e6a0c8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=76e02581a900ed4d7e0378f2a…
Author: Alexander Dorofeyev <alexd4(a)inbox.lv> Date: Wed Jul 30 01:24:43 2008 +0300 wined3d: Add ActivateContext in color_fill_fbo. Also removes dirtifying of SCISSORTESTENABLE state that is made redundant by ActivateContext(...,CTXUSAGE_CLEAR). --- dlls/wined3d/device.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 0a6bd2b..de3a93f 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -6182,12 +6182,17 @@ static void color_fill_fbo(IWineD3DDevice *iface, IWineD3DSurface *surface, CONS TRACE("Surface %p is onscreen\n", surface); + ActivateContext(This, surface, CTXUSAGE_CLEAR); + ENTER_GL(); GL_EXTCALL(glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0)); buffer = surface_get_gl_buffer(surface, swapchain); glDrawBuffer(buffer); checkGLcall("glDrawBuffer()"); } else { TRACE("Surface %p is offscreen\n", surface); + + ActivateContext(This, This->lastActiveRenderTarget, CTXUSAGE_CLEAR); + ENTER_GL(); bind_fbo(iface, GL_FRAMEBUFFER_EXT, &This->dst_fbo); attach_surface_fbo(This, GL_FRAMEBUFFER_EXT, 0, surface); GL_EXTCALL(glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, 0)); @@ -6206,7 +6211,6 @@ static void color_fill_fbo(IWineD3DDevice *iface, IWineD3DSurface *surface, CONS } else { glDisable(GL_SCISSOR_TEST); } - IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_SCISSORTESTENABLE)); glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_COLORWRITEENABLE)); @@ -6227,6 +6231,8 @@ static void color_fill_fbo(IWineD3DDevice *iface, IWineD3DSurface *surface, CONS glDrawBuffer(GL_BACK); checkGLcall("glDrawBuffer()"); } + + LEAVE_GL(); } static inline DWORD argb_to_fmt(DWORD color, WINED3DFORMAT destfmt) { @@ -6348,9 +6354,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_ColorFill(IWineD3DDevice *iface, IWineD } if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) { - ENTER_GL(); color_fill_fbo(iface, pSurface, pRect, color); - LEAVE_GL(); return WINED3D_OK; } else { /* Just forward this to the DirectDraw blitting engine */
1
0
0
0
Paul Vriens : comctl32/tests: Run tests again on Win95.
by Alexandre Julliard
30 Jul '08
30 Jul '08
Module: wine Branch: master Commit: 47edb3cbab933d8ca7e12ef021f3f61920d29dfd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=47edb3cbab933d8ca7e12ef02…
Author: Paul Vriens <paul.vriens.wine(a)gmail.com> Date: Wed Jul 30 09:16:08 2008 +0200 comctl32/tests: Run tests again on Win95. --- dlls/comctl32/tests/comboex.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/dlls/comctl32/tests/comboex.c b/dlls/comctl32/tests/comboex.c index 5714365..321b2a7 100644 --- a/dlls/comctl32/tests/comboex.c +++ b/dlls/comctl32/tests/comboex.c @@ -183,6 +183,13 @@ static void test_WM_LBUTTONDOWN(void) WCHAR buffer[3]; static const UINT choices[] = {8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72}; static const WCHAR stringFormat[] = {'%','2','d','\0'}; + BOOL (WINAPI *pGetComboBoxInfo)(HWND, PCOMBOBOXINFO); + + pGetComboBoxInfo = (void*)GetProcAddress(GetModuleHandleA("user32.dll"), "GetComboBoxInfo"); + if (!pGetComboBoxInfo){ + skip("GetComboBoxInfo is not available\n"); + return; + } hComboEx = CreateWindowExA(0, WC_COMBOBOXEXA, NULL, WS_VISIBLE|WS_CHILD|CBS_DROPDOWN, 0, 0, 200, 150, @@ -205,7 +212,7 @@ static void test_WM_LBUTTONDOWN(void) hEdit = (HWND)SendMessage(hComboEx, CBEM_GETEDITCONTROL, 0, 0); cbInfo.cbSize = sizeof(COMBOBOXINFO); - result = GetComboBoxInfo(hCombo, &cbInfo); + result = pGetComboBoxInfo(hCombo, &cbInfo); ok(result, "Failed to get combobox info structure. LastError=%d\n", GetLastError()); hList = cbInfo.hwndList;
1
0
0
0
Alexandre Julliard : user32/tests: Fix some tests on Win9x.
by Alexandre Julliard
30 Jul '08
30 Jul '08
Module: wine Branch: master Commit: ba644e9c31e8366dff3f8e15de7b323ce1f15f39 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ba644e9c31e8366dff3f8e15d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jul 30 13:50:00 2008 +0200 user32/tests: Fix some tests on Win9x. --- dlls/user32/tests/dialog.c | 13 +++++++++---- dlls/user32/tests/resource.c | 9 ++++++++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/dlls/user32/tests/dialog.c b/dlls/user32/tests/dialog.c index 8bf3c29..ccb5e31 100644 --- a/dlls/user32/tests/dialog.c +++ b/dlls/user32/tests/dialog.c @@ -896,7 +896,8 @@ static void test_GetDlgItemText(void) ret = GetDlgItemTextA(NULL, 0, string, sizeof(string)/sizeof(string[0])); ok(!ret, "GetDlgItemText(NULL) shouldn't have succeeded\n"); - ok(string[0] == '\0', "string retrieved using GetDlgItemText should have been NULL terminated\n"); + ok(string[0] == '\0' || broken(!strcmp(string, "Overwrite Me")), + "string retrieved using GetDlgItemText should have been NULL terminated\n"); } static void test_DialogBoxParamA(void) @@ -906,12 +907,16 @@ static void test_DialogBoxParamA(void) SetLastError(0xdeadbeef); ret = DialogBoxParamA(GetModuleHandle(NULL), "IDD_DIALOG" , hwnd_invalid, 0 , 0); - ok(0 == ret, "DialogBoxParamA returned %d, expected 0\n", ret); - ok(ERROR_INVALID_WINDOW_HANDLE == GetLastError(),"got %d, expected ERROR_INVALID_WINDOW_HANDLE\n",GetLastError()); + ok(0 == ret || broken(ret == -1), "DialogBoxParamA returned %d, expected 0\n", ret); + ok(ERROR_INVALID_WINDOW_HANDLE == GetLastError() || + broken(GetLastError() == 0xdeadbeef), + "got %d, expected ERROR_INVALID_WINDOW_HANDLE\n",GetLastError()); SetLastError(0xdeadbeef); ret = DialogBoxParamA(GetModuleHandle(NULL), "RESOURCE_INVALID" , 0, 0, 0); ok(-1 == ret, "DialogBoxParamA returned %d, expected -1\n", ret); - ok(ERROR_RESOURCE_NAME_NOT_FOUND == GetLastError(),"got %d, expected ERROR_RESOURCE_NAME_NOT_FOUND\n",GetLastError()); + ok(ERROR_RESOURCE_NAME_NOT_FOUND == GetLastError() || + broken(GetLastError() == 0xdeadbeef), + "got %d, expected ERROR_RESOURCE_NAME_NOT_FOUND\n",GetLastError()); } static void test_DisabledDialogTest(void) diff --git a/dlls/user32/tests/resource.c b/dlls/user32/tests/resource.c index a8b6c08..e588524 100644 --- a/dlls/user32/tests/resource.c +++ b/dlls/user32/tests/resource.c @@ -40,7 +40,13 @@ static void test_LoadStringW(void) /* Check that the string which is returned by LoadStringW matches the string at the pointer returned by LoadStringW when called with buflen = 0 */ + SetLastError(0xdeadbeef); length1 = LoadStringW(hInst, 2, (WCHAR *) &resourcepointer, 0); /* get pointer to resource. */ + if (!length1 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) + { + win_skip( "LoadStringW not implemented\n" ); + return; + } length2 = LoadStringW(hInst, 2, returnedstringw, sizeof(returnedstringw) /sizeof(WCHAR)); /* get resource string */ ok(length2 > 0, "LoadStringW failed to load resource 2, ret %d, err %d\n", length2, GetLastError()); ok(length1 == length2, "LoadStringW returned different values dependent on buflen. ret1 %d, ret2 %d\n", @@ -114,7 +120,8 @@ static void test_LoadStringA (void) "LoadString failed: ret %d err %d\n", ret, GetLastError()); ret = LoadStringA(hInst, 0, buf, 0); - ok( ret == -1, "LoadStringA did not return -1 when called with buflen = 0, got %d, err %d\n", + ok( ret == -1 || broken(ret == 0), + "LoadStringA did not return -1 when called with buflen = 0, got %d, err %d\n", ret, GetLastError()); }
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
...
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