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 2015
----- 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
2 participants
567 discussions
Start a n
N
ew thread
Dmitry Timoshkov : gdi32: EnumFontFamilies should enumerate substituted fonts only when directly asked for.
by Alexandre Julliard
17 Jul '15
17 Jul '15
Module: wine Branch: master Commit: 50b6b376cbd521486c7765a11d88d17533f2057d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=50b6b376cbd521486c7765a11…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Jul 17 17:23:19 2015 +0800 gdi32: EnumFontFamilies should enumerate substituted fonts only when directly asked for. --- dlls/gdi32/freetype.c | 8 +++++--- dlls/gdi32/tests/font.c | 6 ------ dlls/gdiplus/font.c | 12 ++++++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index e57d1a9..9a7a3d7 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -5774,7 +5774,7 @@ static BOOL face_matches(const WCHAR *family_name, Face *face, const WCHAR *face } static BOOL enum_face_charsets(const Family *family, Face *face, struct enum_charset_list *list, - FONTENUMPROCW proc, LPARAM lparam) + FONTENUMPROCW proc, LPARAM lparam, const WCHAR *subst) { ENUMLOGFONTEXW elf; NEWTEXTMETRICEXW ntm; @@ -5808,6 +5808,8 @@ static BOOL enum_face_charsets(const Family *family, Face *face, struct enum_cha else strcpyW(elf.elfFullName, family->FamilyName); } + if (subst) + strcpyW(elf.elfLogFont.lfFaceName, subst); TRACE("enuming face %s full %s style %s charset = %d type %d script %s it %d weight %d ntmflags %08x\n", debugstr_w(elf.elfLogFont.lfFaceName), debugstr_w(elf.elfFullName), debugstr_w(elf.elfStyle), @@ -5862,14 +5864,14 @@ static BOOL freetype_EnumFonts( PHYSDEV dev, LPLOGFONTW plf, FONTENUMPROCW proc, face_list = get_face_list_from_family(family); LIST_FOR_EACH_ENTRY( face, face_list, Face, entry ) { if (!face_matches(family->FamilyName, face, face_name)) continue; - if (!enum_face_charsets(family, face, &enum_charsets, proc, lparam)) return FALSE; + if (!enum_face_charsets(family, face, &enum_charsets, proc, lparam, psub ? psub->from.name : NULL)) return FALSE; } } } else { LIST_FOR_EACH_ENTRY( family, &font_list, Family, entry ) { face_list = get_face_list_from_family(family); face = LIST_ENTRY(list_head(face_list), Face, entry); - if (!enum_face_charsets(family, face, &enum_charsets, proc, lparam)) return FALSE; + if (!enum_face_charsets(family, face, &enum_charsets, proc, lparam, NULL)) return FALSE; } } LeaveCriticalSection( &freetype_cs ); diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 1a663d7..cce4a1f 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -5051,12 +5051,9 @@ static void test_EnumFonts_subst(void) memset(&efnd, 0, sizeof(efnd)); strcpy(lf.lfFaceName, "MS Shell Dlg"); ret = EnumFontFamiliesExA(hdc, &lf, enum_ms_shell_dlg_proc, (LPARAM)&efnd, 0); -todo_wine ok(!ret, "MS Shell Dlg should be enumerated\n"); -todo_wine ok(efnd.total > 0, "MS Shell Dlg should be enumerated\n"); ret = strcmp((const char *)efnd.elf[0].elfLogFont.lfFaceName, "MS Shell Dlg"); -todo_wine ok(!ret, "expected MS Shell Dlg, got %s\n", efnd.elf[0].elfLogFont.lfFaceName); ret = strcmp((const char *)efnd.elf[0].elfFullName, "MS Shell Dlg"); ok(ret, "did not expect MS Shell Dlg\n"); @@ -5069,12 +5066,9 @@ todo_wine memset(&efnd, 0, sizeof(efnd)); strcpy(lf.lfFaceName, "MS Shell Dlg 2"); ret = EnumFontFamiliesExA(hdc, &lf, enum_ms_shell_dlg2_proc, (LPARAM)&efnd, 0); -todo_wine ok(!ret, "MS Shell Dlg 2 should be enumerated\n"); -todo_wine ok(efnd.total > 0, "MS Shell Dlg 2 should be enumerated\n"); ret = strcmp((const char *)efnd.elf[0].elfLogFont.lfFaceName, "MS Shell Dlg 2"); -todo_wine ok(!ret, "expected MS Shell Dlg 2, got %s\n", efnd.elf[0].elfLogFont.lfFaceName); ret = strcmp((const char *)efnd.elf[0].elfFullName, "MS Shell Dlg 2"); ok(ret, "did not expect MS Shell Dlg 2\n"); diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index 850f44a..3d8501e 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -630,11 +630,15 @@ GpStatus WINGDIPAPI GdipGetFontHeightGivenDPI(GDIPCONST GpFont *font, REAL dpi, static INT CALLBACK is_font_installed_proc(const LOGFONTW *elf, const TEXTMETRICW *ntm, DWORD type, LPARAM lParam) { + const ENUMLOGFONTW *elfW = (const ENUMLOGFONTW *)elf; + LOGFONTW *lf = (LOGFONTW *)lParam; + if (type & RASTER_FONTTYPE) return 1; - *(LOGFONTW *)lParam = *elf; - + *lf = *elf; + /* replace substituted font name by a real one */ + lstrcpynW(lf->lfFaceName, elfW->elfFullName, LF_FACESIZE); return 0; } @@ -656,8 +660,6 @@ static BOOL get_font_metrics(HDC hdc, struct font_metrics *fm) otm.otmSize = sizeof(otm); if (!GetOutlineTextMetricsW(hdc, otm.otmSize, &otm)) return FALSE; - GetTextFaceW(hdc, LF_FACESIZE, fm->facename); - fm->em_height = otm.otmEMSquare; fm->dpi = GetDeviceCaps(hdc, LOGPIXELSY); @@ -706,6 +708,8 @@ static GpStatus find_installed_font(const WCHAR *name, struct font_metrics *fm) { HFONT hfont, old_font; + strcpyW(fm->facename, lf.lfFaceName); + hfont = CreateFontIndirectW(&lf); old_font = SelectObject(hdc, hfont); ret = get_font_metrics(hdc, fm) ? Ok : NotTrueTypeFont;
1
0
0
0
Dmitry Timoshkov : gdi32: Add a test for enumerating substituted fonts.
by Alexandre Julliard
17 Jul '15
17 Jul '15
Module: wine Branch: master Commit: 5289c9fd925fea5766632cef7a37e17dda93dc2e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5289c9fd925fea5766632cef7…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Jul 17 17:23:14 2015 +0800 gdi32: Add a test for enumerating substituted fonts. EnumFontFamilies(NULL) should not enumerate substituted fonts, but EnumFontFamilies("MS Shell Dlg") should do. --- dlls/gdi32/tests/font.c | 175 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 152 insertions(+), 23 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=5289c9fd925fea5766632…
1
0
0
0
Dmitry Timoshkov : user32: Add a test to show that fonts returned by SystemParametersInfo( SPI_GETNONCLIENTMETRICS) should be listed by EnumFontFamilies(hdc, NULL).
by Alexandre Julliard
17 Jul '15
17 Jul '15
Module: wine Branch: master Commit: b68593ef5c307d7f1db40b3b276da0899f8797dd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b68593ef5c307d7f1db40b3b2…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Jul 17 17:23:08 2015 +0800 user32: Add a test to show that fonts returned by SystemParametersInfo(SPI_GETNONCLIENTMETRICS) should be listed by EnumFontFamilies(hdc, NULL). --- dlls/user32/tests/sysparams.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/dlls/user32/tests/sysparams.c b/dlls/user32/tests/sysparams.c index 31d1a8e..dabecdb 100644 --- a/dlls/user32/tests/sysparams.c +++ b/dlls/user32/tests/sysparams.c @@ -2650,6 +2650,23 @@ static int gsm_error_ctr; ok( !( exp1 != act && exp2 != act && exp3 != act),"GetSystemMetrics(%s): expected %d or %d or %d actual %d\n", #i, exp1, exp2, exp3, act);\ } +static INT CALLBACK enum_all_fonts_proc(const LOGFONTA *elf, const TEXTMETRICA *ntm, DWORD type, LPARAM lparam) +{ + return lstrcmpiA(elf->lfFaceName, (const char *)lparam); +} + +static BOOL is_font_enumerated(const char *name) +{ + HDC hdc = CreateCompatibleDC(0); + BOOL ret = FALSE; + + if (!EnumFontFamiliesA(hdc, NULL, enum_all_fonts_proc, (LPARAM)name)) + ret = TRUE; + + DeleteDC(hdc); + return ret; +} + static void test_GetSystemMetrics( void) { TEXTMETRICA tmMenuFont; @@ -2691,6 +2708,18 @@ static void test_GetSystemMetrics( void) win_skip("SPI_GETNONCLIENTMETRICS is not available\n"); return; } + +todo_wine + ok(is_font_enumerated(ncm.lfCaptionFont.lfFaceName), "font %s should be enumerated\n", ncm.lfCaptionFont.lfFaceName); +todo_wine + ok(is_font_enumerated(ncm.lfSmCaptionFont.lfFaceName), "font %s should be enumerated\n", ncm.lfSmCaptionFont.lfFaceName); +todo_wine + ok(is_font_enumerated(ncm.lfMenuFont.lfFaceName), "font %s should be enumerated\n", ncm.lfMenuFont.lfFaceName); +todo_wine + ok(is_font_enumerated(ncm.lfStatusFont.lfFaceName), "font %s should be enumerated\n", ncm.lfStatusFont.lfFaceName); +todo_wine + ok(is_font_enumerated(ncm.lfMessageFont.lfFaceName), "font %s should be enumerated\n", ncm.lfMessageFont.lfFaceName); + /* CaptionWidth from the registry may have different value of iCaptionWidth * from the non client metrics (observed on WinXP) */ CaptionWidthfromreg = metricfromreg(
1
0
0
0
Nikolay Sivov : dwrite: Aliased texture could only be requested for aliased rendering mode.
by Alexandre Julliard
17 Jul '15
17 Jul '15
Module: wine Branch: master Commit: 2655ac5f933436c11423fc40fc753b7c690c7b0b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2655ac5f933436c11423fc40f…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Jul 17 11:56:17 2015 +0300 dwrite: Aliased texture could only be requested for aliased rendering mode. --- dlls/dwrite/font.c | 16 +++++++++++ dlls/dwrite/tests/font.c | 75 ++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 86 insertions(+), 5 deletions(-) diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 74023c3..11ff9d0 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -104,6 +104,8 @@ struct dwrite_fonttable { struct dwrite_glyphrunanalysis { IDWriteGlyphRunAnalysis IDWriteGlyphRunAnalysis_iface; LONG ref; + + DWRITE_RENDERING_MODE rendering_mode; }; #define GLYPH_BLOCK_SHIFT 8 @@ -2774,7 +2776,20 @@ static ULONG WINAPI glyphrunanalysis_Release(IDWriteGlyphRunAnalysis *iface) static HRESULT WINAPI glyphrunanalysis_GetAlphaTextureBounds(IDWriteGlyphRunAnalysis *iface, DWRITE_TEXTURE_TYPE type, RECT* bounds) { struct dwrite_glyphrunanalysis *This = impl_from_IDWriteGlyphRunAnalysis(iface); + FIXME("(%p)->(%d %p): stub\n", This, type, bounds); + + if ((UINT32)type > DWRITE_TEXTURE_CLEARTYPE_3x1) { + memset(bounds, 0, sizeof(*bounds)); + return E_INVALIDARG; + } + + if ((type == DWRITE_TEXTURE_ALIASED_1x1 && This->rendering_mode != DWRITE_RENDERING_MODE_ALIASED) || + (type == DWRITE_TEXTURE_CLEARTYPE_3x1 && This->rendering_mode == DWRITE_RENDERING_MODE_ALIASED)) { + memset(bounds, 0, sizeof(*bounds)); + return S_OK; + } + return E_NOTIMPL; } @@ -2819,6 +2834,7 @@ HRESULT create_glyphrunanalysis(DWRITE_RENDERING_MODE rendering_mode, IDWriteGly analysis->IDWriteGlyphRunAnalysis_iface.lpVtbl = &glyphrunanalysisvtbl; analysis->ref = 1; + analysis->rendering_mode = rendering_mode; *ret = &analysis->IDWriteGlyphRunAnalysis_iface; return S_OK; diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c index 9524d6a..7dc6077 100644 --- a/dlls/dwrite/tests/font.c +++ b/dlls/dwrite/tests/font.c @@ -3384,28 +3384,49 @@ static void test_CreateRenderingParams(void) static void test_CreateGlyphRunAnalysis(void) { + static const DWRITE_RENDERING_MODE rendermodes[] = { + DWRITE_RENDERING_MODE_ALIASED, + DWRITE_RENDERING_MODE_GDI_CLASSIC, + DWRITE_RENDERING_MODE_GDI_NATURAL, + DWRITE_RENDERING_MODE_NATURAL, + DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC, + }; + IDWriteGlyphRunAnalysis *analysis; IDWriteFactory *factory; DWRITE_GLYPH_RUN run; IDWriteFontFace *face; - UINT16 index; + UINT16 glyph; FLOAT advance; HRESULT hr; UINT32 ch; + RECT rect; + DWRITE_GLYPH_OFFSET offset; + DWRITE_GLYPH_METRICS metrics; + int i; factory = create_factory(); face = create_fontface(factory); ch = 'A'; - hr = IDWriteFontFace_GetGlyphIndices(face, &ch, 1, &index); + glyph = 0; + hr = IDWriteFontFace_GetGlyphIndices(face, &ch, 1, &glyph); ok(hr == S_OK, "got 0x%08x\n", hr); + ok(glyph > 0, "got %u\n", glyph); + + hr = IDWriteFontFace_GetDesignGlyphMetrics(face, &glyph, 1, &metrics, FALSE); + ok(hr == S_OK, "got 0x%08x\n", hr); + advance = metrics.advanceWidth; + + offset.advanceOffset = 0.0; + offset.ascenderOffset = 0.0; run.fontFace = face; run.fontEmSize = 24.0; run.glyphCount = 1; - run.glyphIndices = &index; + run.glyphIndices = &glyph; run.glyphAdvances = &advance; - run.glyphOffsets = NULL; + run.glyphOffsets = &offset; run.isSideways = FALSE; run.bidiLevel = 0; @@ -3422,11 +3443,55 @@ static void test_CreateGlyphRunAnalysis(void) ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); hr = IDWriteFactory_CreateGlyphRunAnalysis(factory, &run, 1.0, NULL, - DWRITE_RENDERING_MODE_GDI_CLASSIC, DWRITE_MEASURING_MODE_NATURAL, + DWRITE_RENDERING_MODE_ALIASED, DWRITE_MEASURING_MODE_NATURAL, 0.0, 0.0, &analysis); ok(hr == S_OK, "got 0x%08x\n", hr); + + /* invalid texture type */ + memset(&rect, 0xcc, sizeof(rect)); + hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_CLEARTYPE_3x1+1, &rect); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(rect.left == 0 && rect.right == 0 && + rect.top == 0 && rect.bottom == 0, "unexpected rect\n"); IDWriteGlyphRunAnalysis_Release(analysis); + for (i = 0; i < sizeof(rendermodes)/sizeof(rendermodes[0]); i++) { + hr = IDWriteFactory_CreateGlyphRunAnalysis(factory, &run, 1.0, NULL, + rendermodes[i], DWRITE_MEASURING_MODE_NATURAL, + 0.0, 0.0, &analysis); + ok(hr == S_OK, "got 0x%08x\n", hr); + + if (rendermodes[i] == DWRITE_RENDERING_MODE_ALIASED) { + memset(&rect, 0, sizeof(rect)); + hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_ALIASED_1x1, &rect); + todo_wine { + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(!IsRectEmpty(&rect), "got empty rect\n"); + } + rect.left = rect.top = 0; + rect.bottom = rect.right = 1; + hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_CLEARTYPE_3x1, &rect); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(IsRectEmpty(&rect), "unexpected empty rect\n"); + } + else { + rect.left = rect.top = 0; + rect.bottom = rect.right = 1; + hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_ALIASED_1x1, &rect); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(IsRectEmpty(&rect), "got empty rect\n"); + + memset(&rect, 0, sizeof(rect)); + hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_CLEARTYPE_3x1, &rect); + todo_wine { + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(!IsRectEmpty(&rect), "got empty rect\n"); + } + } + + IDWriteGlyphRunAnalysis_Release(analysis); + } + IDWriteFontFace_Release(face); IDWriteFactory_Release(factory); }
1
0
0
0
Iván Matellanes : msvcirt: Implement ios::unsetf.
by Alexandre Julliard
17 Jul '15
17 Jul '15
Module: wine Branch: master Commit: c8368cf43ba6a4165791eef75268342202654ce6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c8368cf43ba6a4165791eef75…
Author: Iván Matellanes <matellanesivan(a)gmail.com> Date: Thu Jul 16 13:12:45 2015 +0200 msvcirt: Implement ios::unsetf. --- dlls/msvcirt/msvcirt.c | 10 ++++++++-- dlls/msvcirt/tests/msvcirt.c | 11 +++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/dlls/msvcirt/msvcirt.c b/dlls/msvcirt/msvcirt.c index f0ae115..a0d670f 100644 --- a/dlls/msvcirt/msvcirt.c +++ b/dlls/msvcirt/msvcirt.c @@ -1176,8 +1176,14 @@ void __cdecl ios_unlockc(void) DEFINE_THISCALL_WRAPPER(ios_unsetf, 8) LONG __thiscall ios_unsetf(ios *this, LONG flags) { - FIXME("(%p %x) stub\n", this, flags); - return 0; + LONG prev = this->flags; + + TRACE("(%p %x)\n", this, flags); + + ios_lock(this); + this->flags &= ~flags; + ios_unlock(this); + return prev; } /* ?width@ios@@QAEHH@Z */ diff --git a/dlls/msvcirt/tests/msvcirt.c b/dlls/msvcirt/tests/msvcirt.c index 05fb84c..1b730b9 100644 --- a/dlls/msvcirt/tests/msvcirt.c +++ b/dlls/msvcirt/tests/msvcirt.c @@ -141,6 +141,7 @@ static LONG (*__thiscall p_ios_flags_set)(ios*, LONG); static LONG (*__thiscall p_ios_flags_get)(const ios*); static LONG (*__thiscall p_ios_setf)(ios*, LONG); static LONG (*__thiscall p_ios_setf_mask)(ios*, LONG, LONG); +static LONG (*__thiscall p_ios_unsetf)(ios*, LONG); /* Emulate a __thiscall */ #ifdef __i386__ @@ -253,6 +254,7 @@ static BOOL init(void) SET(p_ios_flags_get, "?flags@ios@@QEBAJXZ"); SET(p_ios_setf, "?setf@ios@@QEAAJJ@Z"); SET(p_ios_setf_mask, "?setf@ios@@QEAAJJJ@Z"); + SET(p_ios_unsetf, "?unsetf@ios@@QEAAJJ@Z"); } else { p_operator_new = (void*)GetProcAddress(msvcrt, "??2@YAPAXI@Z"); @@ -295,6 +297,7 @@ static BOOL init(void) SET(p_ios_flags_get, "?flags@ios@@QBEJXZ"); SET(p_ios_setf, "?setf@ios@@QAEJJ@Z"); SET(p_ios_setf_mask, "?setf@ios@@QAEJJJ@Z"); + SET(p_ios_unsetf, "?unsetf@ios@@QAEJJ@Z"); } SET(p_ios_static_lock, "?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A"); SET(p_ios_lockc, "?lockc@ios@@KAXXZ"); @@ -1020,6 +1023,14 @@ static void test_ios(void) ret = (LONG) call_func3(p_ios_setf_mask, &ios_obj, 0x111, 0x105); ok(ret == 0x8444, "expected %x got %x\n", 0x8444, ret); ok(ios_obj.flags == 0x8541, "expected %x got %x\n", 0x8541, ios_obj.flags); + + /* unsetf */ + ret = (LONG) call_func2(p_ios_unsetf, &ios_obj, 0x1111); + ok(ret == 0x8541, "expected %x got %x\n", 0x8541, ret); + ok(ios_obj.flags == 0x8440, "expected %x got %x\n", 0x8440, ios_obj.flags); + ret = (LONG) call_func2(p_ios_unsetf, &ios_obj, 0x8008); + ok(ret == 0x8440, "expected %x got %x\n", 0x8440, ret); + ok(ios_obj.flags == 0x440, "expected %x got %x\n", 0x440, ios_obj.flags); ios_obj.do_lock = -1; SetEvent(lock_arg.release[0]);
1
0
0
0
Iván Matellanes : msvcirt: Implement ios::setf.
by Alexandre Julliard
17 Jul '15
17 Jul '15
Module: wine Branch: master Commit: 968d07dd7bac357a1dcdcb20b7f490de07433da1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=968d07dd7bac357a1dcdcb20b…
Author: Iván Matellanes <matellanesivan(a)gmail.com> Date: Thu Jul 16 13:12:40 2015 +0200 msvcirt: Implement ios::setf. --- dlls/msvcirt/msvcirt.c | 22 ++++++++++++++++++---- dlls/msvcirt/tests/msvcirt.c | 20 ++++++++++++++++++++ 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/dlls/msvcirt/msvcirt.c b/dlls/msvcirt/msvcirt.c index 0a9dc34..f0ae115 100644 --- a/dlls/msvcirt/msvcirt.c +++ b/dlls/msvcirt/msvcirt.c @@ -82,6 +82,8 @@ typedef struct { } ios; ios* __thiscall ios_assign(ios*, const ios*); +void __cdecl ios_lock(ios*); +void __cdecl ios_unlock(ios*); /* class ostream */ typedef struct _ostream { @@ -1086,8 +1088,14 @@ int __thiscall ios_rdstate(const ios *this) DEFINE_THISCALL_WRAPPER(ios_setf, 8) LONG __thiscall ios_setf(ios *this, LONG flags) { - FIXME("(%p %x) stub\n", this, flags); - return 0; + LONG prev = this->flags; + + TRACE("(%p %x)\n", this, flags); + + ios_lock(this); + this->flags |= flags; + ios_unlock(this); + return prev; } /* ?setf@ios@@QAEJJJ@Z */ @@ -1095,8 +1103,14 @@ LONG __thiscall ios_setf(ios *this, LONG flags) DEFINE_THISCALL_WRAPPER(ios_setf_mask, 12) LONG __thiscall ios_setf_mask(ios *this, LONG flags, LONG mask) { - FIXME("(%p %x %x) stub\n", this, flags, mask); - return 0; + LONG prev = this->flags; + + TRACE("(%p %x %x)\n", this, flags, mask); + + ios_lock(this); + this->flags = (this->flags & (~mask)) | (flags & mask); + ios_unlock(this); + return prev; } /* ?setlock@ios@@QAAXXZ */ diff --git a/dlls/msvcirt/tests/msvcirt.c b/dlls/msvcirt/tests/msvcirt.c index faddae1..05fb84c 100644 --- a/dlls/msvcirt/tests/msvcirt.c +++ b/dlls/msvcirt/tests/msvcirt.c @@ -139,6 +139,8 @@ static void (*__cdecl p_ios_lockc)(void); static void (*__cdecl p_ios_unlockc)(void); static LONG (*__thiscall p_ios_flags_set)(ios*, LONG); static LONG (*__thiscall p_ios_flags_get)(const ios*); +static LONG (*__thiscall p_ios_setf)(ios*, LONG); +static LONG (*__thiscall p_ios_setf_mask)(ios*, LONG, LONG); /* Emulate a __thiscall */ #ifdef __i386__ @@ -249,6 +251,8 @@ static BOOL init(void) SET(p_ios_unlockbuf, "?unlockbuf@ios@@QEAAXXZ"); SET(p_ios_flags_set, "?flags@ios@@QEAAJJ@Z"); SET(p_ios_flags_get, "?flags@ios@@QEBAJXZ"); + SET(p_ios_setf, "?setf@ios@@QEAAJJ@Z"); + SET(p_ios_setf_mask, "?setf@ios@@QEAAJJJ@Z"); } else { p_operator_new = (void*)GetProcAddress(msvcrt, "??2@YAPAXI@Z"); @@ -289,6 +293,8 @@ static BOOL init(void) SET(p_ios_unlockbuf, "?unlockbuf@ios@@QAAXXZ"); SET(p_ios_flags_set, "?flags@ios@@QAEJJ@Z"); SET(p_ios_flags_get, "?flags@ios@@QBEJXZ"); + SET(p_ios_setf, "?setf@ios@@QAEJJ@Z"); + SET(p_ios_setf_mask, "?setf@ios@@QAEJJJ@Z"); } SET(p_ios_static_lock, "?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A"); SET(p_ios_lockc, "?lockc@ios@@KAXXZ"); @@ -1002,6 +1008,20 @@ static void test_ios(void) ok(ret == 0x444, "expected %x got %x\n", 0x444, ret); ok(ios_obj.flags == 0, "expected %x got %x\n", 0, ios_obj.flags); + /* setf */ + ios_obj.do_lock = 0; + ios_obj.flags = 0x8400; + ret = (LONG) call_func2(p_ios_setf, &ios_obj, 0x444); + ok(ret == 0x8400, "expected %x got %x\n", 0x8400, ret); + ok(ios_obj.flags == 0x8444, "expected %x got %x\n", 0x8444, ios_obj.flags); + ret = (LONG) call_func3(p_ios_setf_mask, &ios_obj, 0x111, 0); + ok(ret == 0x8444, "expected %x got %x\n", 0x8444, ret); + ok(ios_obj.flags == 0x8444, "expected %x got %x\n", 0x8444, ios_obj.flags); + ret = (LONG) call_func3(p_ios_setf_mask, &ios_obj, 0x111, 0x105); + ok(ret == 0x8444, "expected %x got %x\n", 0x8444, ret); + ok(ios_obj.flags == 0x8541, "expected %x got %x\n", 0x8541, ios_obj.flags); + ios_obj.do_lock = -1; + SetEvent(lock_arg.release[0]); SetEvent(lock_arg.release[1]); SetEvent(lock_arg.release[2]);
1
0
0
0
Iván Matellanes : msvcirt: Implement ios::flags.
by Alexandre Julliard
17 Jul '15
17 Jul '15
Module: wine Branch: master Commit: 6f89103b72138215ec83755fde73b631c4e8fc8a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6f89103b72138215ec83755fd…
Author: Iván Matellanes <matellanesivan(a)gmail.com> Date: Thu Jul 16 13:12:35 2015 +0200 msvcirt: Implement ios::flags. --- dlls/msvcirt/msvcirt.c | 12 ++++++++---- dlls/msvcirt/tests/msvcirt.c | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/dlls/msvcirt/msvcirt.c b/dlls/msvcirt/msvcirt.c index e46f574..0a9dc34 100644 --- a/dlls/msvcirt/msvcirt.c +++ b/dlls/msvcirt/msvcirt.c @@ -937,8 +937,12 @@ char __thiscall ios_fill_get(const ios *this) DEFINE_THISCALL_WRAPPER(ios_flags_set, 8) LONG __thiscall ios_flags_set(ios *this, LONG flags) { - FIXME("(%p %x) stub\n", this, flags); - return 0; + LONG prev = this->flags; + + TRACE("(%p %x)\n", this, flags); + + this->flags = flags; + return prev; } /* ?flags@ios@@QBEJXZ */ @@ -946,8 +950,8 @@ LONG __thiscall ios_flags_set(ios *this, LONG flags) DEFINE_THISCALL_WRAPPER(ios_flags_get, 4) LONG __thiscall ios_flags_get(const ios *this) { - FIXME("(%p) stub\n", this); - return 0; + TRACE("(%p)\n", this); + return this->flags; } /* ?good@ios@@QBEHXZ */ diff --git a/dlls/msvcirt/tests/msvcirt.c b/dlls/msvcirt/tests/msvcirt.c index 523fb45..faddae1 100644 --- a/dlls/msvcirt/tests/msvcirt.c +++ b/dlls/msvcirt/tests/msvcirt.c @@ -137,6 +137,8 @@ static void (*__cdecl p_ios_unlockbuf)(ios*); static CRITICAL_SECTION *p_ios_static_lock; static void (*__cdecl p_ios_lockc)(void); static void (*__cdecl p_ios_unlockc)(void); +static LONG (*__thiscall p_ios_flags_set)(ios*, LONG); +static LONG (*__thiscall p_ios_flags_get)(const ios*); /* Emulate a __thiscall */ #ifdef __i386__ @@ -245,6 +247,8 @@ static BOOL init(void) SET(p_ios_unlock, "?unlock@ios@@QEAAXXZ"); SET(p_ios_lockbuf, "?lockbuf@ios@@QEAAXXZ"); SET(p_ios_unlockbuf, "?unlockbuf@ios@@QEAAXXZ"); + SET(p_ios_flags_set, "?flags@ios@@QEAAJJ@Z"); + SET(p_ios_flags_get, "?flags@ios@@QEBAJXZ"); } else { p_operator_new = (void*)GetProcAddress(msvcrt, "??2@YAPAXI@Z"); @@ -283,6 +287,8 @@ static BOOL init(void) SET(p_ios_unlock, "?unlock@ios@@QAAXXZ"); SET(p_ios_lockbuf, "?lockbuf@ios@@QAAXXZ"); SET(p_ios_unlockbuf, "?unlockbuf@ios@@QAAXXZ"); + SET(p_ios_flags_set, "?flags@ios@@QAEJJ@Z"); + SET(p_ios_flags_get, "?flags@ios@@QBEJXZ"); } SET(p_ios_static_lock, "?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A"); SET(p_ios_lockc, "?lockc@ios@@KAXXZ"); @@ -859,6 +865,7 @@ static void test_ios(void) struct ios_lock_arg lock_arg; HANDLE thread; BOOL locked; + LONG ret; memset(&ios_obj, 0xab, sizeof(ios)); memset(&ios_obj2, 0xab, sizeof(ios)); @@ -984,6 +991,17 @@ static void test_ios(void) locked = TryEnterCriticalSection(p_ios_static_lock); ok(locked == 0, "the static critical section was not locked before\n"); + /* flags */ + ios_obj.flags = 0x8000; + ret = (LONG) call_func1(p_ios_flags_get, &ios_obj); + ok(ret == 0x8000, "expected %x got %x\n", 0x8000, ret); + ret = (LONG) call_func2(p_ios_flags_set, &ios_obj, 0x444); + ok(ret == 0x8000, "expected %x got %x\n", 0x8000, ret); + ok(ios_obj.flags == 0x444, "expected %x got %x\n", 0x444, ios_obj.flags); + ret = (LONG) call_func2(p_ios_flags_set, &ios_obj, 0); + ok(ret == 0x444, "expected %x got %x\n", 0x444, ret); + ok(ios_obj.flags == 0, "expected %x got %x\n", 0, ios_obj.flags); + SetEvent(lock_arg.release[0]); SetEvent(lock_arg.release[1]); SetEvent(lock_arg.release[2]);
1
0
0
0
Iván Matellanes : msvcirt: Implement ios static locking.
by Alexandre Julliard
17 Jul '15
17 Jul '15
Module: wine Branch: master Commit: 277da0ea5d3e92815a417de4a4efbe44e7c6ad56 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=277da0ea5d3e92815a417de4a…
Author: Iván Matellanes <matellanesivan(a)gmail.com> Date: Thu Jul 16 13:12:30 2015 +0200 msvcirt: Implement ios static locking. --- dlls/msvcirt/msvcirt.c | 16 ++++++++++++++-- dlls/msvcirt/msvcirt.spec | 2 +- dlls/msvcirt/tests/msvcirt.c | 19 +++++++++++++++++-- dlls/msvcrt20/msvcrt20.spec | 2 +- dlls/msvcrt40/msvcrt40.spec | 2 +- 5 files changed, 34 insertions(+), 7 deletions(-) diff --git a/dlls/msvcirt/msvcirt.c b/dlls/msvcirt/msvcirt.c index 9c6b991..e46f574 100644 --- a/dlls/msvcirt/msvcirt.c +++ b/dlls/msvcirt/msvcirt.c @@ -31,6 +31,16 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcirt); #define RESERVE_SIZE 512 +/* ?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A */ +extern CRITICAL_SECTION ios_static_lock; +CRITICAL_SECTION_DEBUG ios_static_lock_debug = +{ + 0, 0, &ios_static_lock, + { &ios_static_lock_debug.ProcessLocksList, &ios_static_lock_debug.ProcessLocksList }, + 0, 0, { (DWORD_PTR)(__FILE__ ": ios_static_lock") } +}; +CRITICAL_SECTION ios_static_lock = { &ios_static_lock_debug, -1, 0, 0, 0, 0 }; + /* class streambuf */ typedef struct { const vtable_ptr *vtable; @@ -1001,7 +1011,8 @@ void __cdecl ios_lockbuf(ios *this) /* ?lockc@ios@@KAXXZ */ void __cdecl ios_lockc(void) { - FIXME("() stub\n"); + TRACE("()\n"); + EnterCriticalSection(&ios_static_lock); } /* ?lockptr@ios@@IAEPAU_CRT_CRITICAL_SECTION@@XZ */ @@ -1138,7 +1149,8 @@ void __cdecl ios_unlockbuf(ios *this) /* ?unlockc@ios@@KAXXZ */ void __cdecl ios_unlockc(void) { - FIXME("() stub\n"); + TRACE("()\n"); + LeaveCriticalSection(&ios_static_lock); } /* ?unsetf@ios@@QAEJJ@Z */ diff --git a/dlls/msvcirt/msvcirt.spec b/dlls/msvcirt/msvcirt.spec index dc66bfa..8d26652 100644 --- a/dlls/msvcirt/msvcirt.spec +++ b/dlls/msvcirt/msvcirt.spec @@ -777,7 +777,7 @@ @ stub -arch=win32 ?ws@@YAAAVistream@@AAV1@@Z # class istream & __cdecl ws(class istream &) @ stub -arch=win64 ?ws@@YAAEAVistream@@AEAV1@@Z # @ extern ?x_curindex@ios@@0HA # static int ios::x_curindex -# @ extern ?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A # static struct _CRT_CRITICAL_SECTION ios::x_lockc +@ extern ?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A ios_static_lock # @ extern ?x_maxbit@ios@@0JA # static long ios::x_maxbit # @ extern ?x_statebuf@ios@@0PAJA # static long * ios::x_statebuf @ cdecl ?xalloc@ios@@SAHXZ() ios_xalloc diff --git a/dlls/msvcirt/tests/msvcirt.c b/dlls/msvcirt/tests/msvcirt.c index 944c024..523fb45 100644 --- a/dlls/msvcirt/tests/msvcirt.c +++ b/dlls/msvcirt/tests/msvcirt.c @@ -134,6 +134,9 @@ static void (*__cdecl p_ios_lock)(ios*); static void (*__cdecl p_ios_unlock)(ios*); static void (*__cdecl p_ios_lockbuf)(ios*); static void (*__cdecl p_ios_unlockbuf)(ios*); +static CRITICAL_SECTION *p_ios_static_lock; +static void (*__cdecl p_ios_lockc)(void); +static void (*__cdecl p_ios_unlockc)(void); /* Emulate a __thiscall */ #ifdef __i386__ @@ -281,6 +284,9 @@ static BOOL init(void) SET(p_ios_lockbuf, "?lockbuf@ios@@QAAXXZ"); SET(p_ios_unlockbuf, "?unlockbuf@ios@@QAAXXZ"); } + SET(p_ios_static_lock, "?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A"); + SET(p_ios_lockc, "?lockc@ios@@KAXXZ"); + SET(p_ios_unlockc, "?unlockc@ios@@KAXXZ"); init_thiscall_thunk(); return TRUE; @@ -827,7 +833,7 @@ struct ios_lock_arg { ios *ios_obj; HANDLE lock; - HANDLE release[2]; + HANDLE release[3]; }; static DWORD WINAPI lock_ios(void *arg) @@ -835,10 +841,13 @@ static DWORD WINAPI lock_ios(void *arg) struct ios_lock_arg *lock_arg = arg; p_ios_lock(lock_arg->ios_obj); p_ios_lockbuf(lock_arg->ios_obj); + p_ios_lockc(); SetEvent(lock_arg->lock); WaitForSingleObject(lock_arg->release[0], INFINITE); - p_ios_unlockbuf(lock_arg->ios_obj); + p_ios_unlockc(); WaitForSingleObject(lock_arg->release[1], INFINITE); + p_ios_unlockbuf(lock_arg->ios_obj); + WaitForSingleObject(lock_arg->release[2], INFINITE); p_ios_unlock(lock_arg->ios_obj); return 0; } @@ -962,6 +971,8 @@ static void test_ios(void) ok(lock_arg.release[0] != NULL, "CreateEventW failed\n"); lock_arg.release[1] = CreateEventW(NULL, FALSE, FALSE, NULL); ok(lock_arg.release[1] != NULL, "CreateEventW failed\n"); + lock_arg.release[2] = CreateEventW(NULL, FALSE, FALSE, NULL); + ok(lock_arg.release[2] != NULL, "CreateEventW failed\n"); thread = CreateThread(NULL, 0, lock_ios, (void*)&lock_arg, 0, NULL); ok(thread != NULL, "CreateThread failed\n"); WaitForSingleObject(lock_arg.lock, INFINITE); @@ -970,9 +981,12 @@ static void test_ios(void) ok(locked == 0, "the ios object was not locked before\n"); locked = TryEnterCriticalSection(&ios_obj.sb->lock); ok(locked == 0, "the streambuf was not locked before\n"); + locked = TryEnterCriticalSection(p_ios_static_lock); + ok(locked == 0, "the static critical section was not locked before\n"); SetEvent(lock_arg.release[0]); SetEvent(lock_arg.release[1]); + SetEvent(lock_arg.release[2]); WaitForSingleObject(thread, INFINITE); ios_obj.delbuf = 1; @@ -981,6 +995,7 @@ static void test_ios(void) CloseHandle(lock_arg.lock); CloseHandle(lock_arg.release[0]); CloseHandle(lock_arg.release[1]); + CloseHandle(lock_arg.release[2]); CloseHandle(thread); } diff --git a/dlls/msvcrt20/msvcrt20.spec b/dlls/msvcrt20/msvcrt20.spec index 13b965c..b76b1d0 100644 --- a/dlls/msvcrt20/msvcrt20.spec +++ b/dlls/msvcrt20/msvcrt20.spec @@ -765,7 +765,7 @@ @ stub -arch=win32 ?ws@@YAAAVistream@@AAV1@@Z @ stub -arch=win64 ?ws@@YAAEAVistream@@AEAV1@@Z # @ extern ?x_curindex@ios@@0HA -# @ extern ?x_lockc@ios@@0U_RTL_CRITICAL_SECTION@@A +@ extern ?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A msvcirt.?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A # @ extern ?x_maxbit@ios@@0JA # @ extern ?x_statebuf@ios@@0QAJA @ cdecl ?xalloc@ios@@SAHXZ() msvcirt.?xalloc@ios@@SAHXZ diff --git a/dlls/msvcrt40/msvcrt40.spec b/dlls/msvcrt40/msvcrt40.spec index 924cd02..cfe2fea 100644 --- a/dlls/msvcrt40/msvcrt40.spec +++ b/dlls/msvcrt40/msvcrt40.spec @@ -839,7 +839,7 @@ @ stub -arch=win32 ?ws@@YAAAVistream@@AAV1@@Z @ stub -arch=win64 ?ws@@YAAEAVistream@@AEAV1@@Z # @ extern ?x_curindex@ios@@0HA -# @ extern ?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A +@ extern ?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A msvcirt.?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A # @ extern ?x_maxbit@ios@@0JA # @ extern ?x_statebuf@ios@@0PAJA @ cdecl ?xalloc@ios@@SAHXZ() msvcirt.?xalloc@ios@@SAHXZ
1
0
0
0
Aaryaman Vasishta : d3drm/tests: Fix leaks while creating device in tests (Valgrind).
by Alexandre Julliard
17 Jul '15
17 Jul '15
Module: wine Branch: master Commit: 9939ac8fe0def693107cf4e470d8f6ac4a052d59 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9939ac8fe0def693107cf4e47…
Author: Aaryaman Vasishta <jem456.vasishta(a)gmail.com> Date: Thu Jul 16 21:56:07 2015 +0530 d3drm/tests: Fix leaks while creating device in tests (Valgrind). --- dlls/d3drm/tests/d3drm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/d3drm/tests/d3drm.c b/dlls/d3drm/tests/d3drm.c index 1816214..1c80536 100644 --- a/dlls/d3drm/tests/d3drm.c +++ b/dlls/d3drm/tests/d3drm.c @@ -1999,10 +1999,14 @@ static void test_create_device_from_clipper(void) hr = IDirect3DRM2_CreateDeviceFromClipper(d3drm2, clipper, &driver, 0, 0, &device2); todo_wine ok(hr == D3DRMERR_BADVALUE, "Expected hr == D3DRMERR_BADVALUE, got %x.\n", hr); + if (SUCCEEDED(hr)) + IDirect3DRMDevice2_Release(device2); /* If NULL is passed for clipper, CreateDeviceFromClipper returns D3DRMERR_BADVALUE */ hr = IDirect3DRM2_CreateDeviceFromClipper(d3drm2, NULL, &driver, 0, 0, &device2); todo_wine ok(hr == D3DRMERR_BADVALUE, "Expected hr == D3DRMERR_BADVALUE, got %x.\n", hr); + if (SUCCEEDED(hr)) + IDirect3DRMDevice2_Release(device2); hr = IDirect3DRM2_CreateDeviceFromClipper(d3drm2, clipper, &driver, 300, 200, &device2); ok(hr == D3DRM_OK, "Cannot create IDirect3DRMDevice2 interface (hr = %x).\n", hr); @@ -2197,6 +2201,8 @@ static void test_create_device_from_surface(void) hr = IDirect3DRM2_CreateDeviceFromSurface(d3drm2, &driver, ddraw, surface, &device2); todo_wine ok(hr == DDERR_INVALIDCAPS, "Expected hr == DDERR_INVALIDCAPS, got %x.\n", hr); IDirectDrawSurface_Release(surface); + if (SUCCEEDED(hr)) + IDirect3DRMDevice2_Release(device2); desc.ddsCaps.dwCaps |= DDSCAPS_3DDEVICE; hr = IDirectDraw_CreateSurface(ddraw, &desc, &surface, NULL);
1
0
0
0
Austin English : winsta: Add initial winsta.h.
by Alexandre Julliard
17 Jul '15
17 Jul '15
Module: wine Branch: master Commit: 70f9cc9e3ded83ea2e6837d8cacecb5cfcc514a4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=70f9cc9e3ded83ea2e6837d8c…
Author: Austin English <austinenglish(a)gmail.com> Date: Sat Jul 4 19:14:02 2015 -0500 winsta: Add initial winsta.h. --- dlls/winsta/main.c | 9 +++-- dlls/winsta/winsta.h | 98 +++++++++++++++++++++++++++++++++++++++++++++++++ dlls/winsta/winsta.spec | 2 +- 3 files changed, 104 insertions(+), 5 deletions(-) diff --git a/dlls/winsta/main.c b/dlls/winsta/main.c index 46a4ce7..a95782f 100644 --- a/dlls/winsta/main.c +++ b/dlls/winsta/main.c @@ -23,6 +23,7 @@ #include "winbase.h" #include "winternl.h" #include "wine/debug.h" +#include "winsta.h" WINE_DEFAULT_DEBUG_CHANNEL(winsta); @@ -68,7 +69,7 @@ BOOLEAN WINAPI WinStationRegisterConsoleNotification( HANDLE server, HWND hwnd, } BOOLEAN WINAPI WinStationGetAllProcesses( HANDLE server, ULONG level, - ULONG *process_count, void *info ) + ULONG *process_count, PTS_ALL_PROCESSES_INFO *info ) { FIXME( "%p %u %p %p\n", server, level, process_count, info ); *process_count = 0; @@ -76,10 +77,10 @@ BOOLEAN WINAPI WinStationGetAllProcesses( HANDLE server, ULONG level, return FALSE; } -BOOL WINAPI WinStationGetProcessSid( PVOID a, HANDLE server, DWORD process_id, PFILETIME process_start_time, - PBYTE process_user_sid, PDWORD sid_size) +BOOLEAN WINAPI WinStationGetProcessSid( HANDLE server, ULONG process_id, FILETIME *process_start_time, + PVOID process_user_sid, PULONG sid_size ) { - FIXME( "(%p, %p, %d, %p, %p, %p): stub\n", a, server, process_id, process_start_time, process_user_sid, sid_size); + FIXME( "(%p, %d, %p, %p, %p): stub\n", server, process_id, process_start_time, process_user_sid, sid_size); SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); return FALSE; } diff --git a/dlls/winsta/winsta.h b/dlls/winsta/winsta.h new file mode 100644 index 0000000..a97f4c4 --- /dev/null +++ b/dlls/winsta/winsta.h @@ -0,0 +1,98 @@ +/* + * Copyright (C) 2015 Austin English + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef _WINSTA_H +#define _WINSTA_H + +#define WINSTATIONNAME_LENGTH 32 +typedef WCHAR WINSTATIONNAME[WINSTATIONNAME_LENGTH + 1]; + +typedef enum _WINSTATIONSTATECLASS +{ + State_Active, + State_Connected, + State_ConnectQuery, + State_Shadow, + State_Disconnected, + State_Idle, + State_Listen, + State_Reset, + State_Down, + State_Init +} WINSTATIONSTATECLASS; + +typedef struct _SESSIONIDW +{ + union + { + ULONG SessionId; + ULONG LogonId; + } DUMMYUNIONNAME; + WINSTATIONNAME WinStationName; + WINSTATIONSTATECLASS State; +} SESSIONIDW, *PSESSIONIDW; + +typedef struct _TS_SYS_PROCESS_INFORMATION +{ + ULONG NextEntryOffset; + ULONG NumberOfThreads; + LARGE_INTEGER SpareLi1; + LARGE_INTEGER SpareLi2; + LARGE_INTEGER SpareLi3; + LARGE_INTEGER CreateTime; + LARGE_INTEGER UserTime; + LARGE_INTEGER KernelTime; + UNICODE_STRING ImageName; + LONG BasePriority; + ULONG UniqueProcessId; + ULONG InheritedFromUniqueProcessId; + ULONG HandleCount; + ULONG SessionId; + ULONG SpareUl3; + SIZE_T PeakVirtualSize; + SIZE_T VirtualSize; + ULONG PageFaultCount; + ULONG PeakWorkingSetSize; + ULONG WorkingSetSize; + SIZE_T QuotaPeakPagedPoolUsage; + SIZE_T QuotaPagedPoolUsage; + SIZE_T QuotaPeakNonPagedPoolUsage; + SIZE_T QuotaNonPagedPoolUsage; + SIZE_T PagefileUsage; + SIZE_T PeakPagefileUsage; + SIZE_T PrivatePageCount; +} TS_SYS_PROCESS_INFORMATION, *PTS_SYS_PROCESS_INFORMATION; + +typedef struct _TS_ALL_PROCESSES_INFO +{ + PTS_SYS_PROCESS_INFORMATION pTsProcessInfo; + DWORD SizeOfSid; +#ifdef MIDL_PASS + [size_is(SizeOfSid)] PBYTE pSid; +#else + PBYTE pSid; +#endif +} TS_ALL_PROCESSES_INFO, *PTS_ALL_PROCESSES_INFO; + +BOOLEAN WINAPI WinStationEnumerateW(HANDLE,PSESSIONIDW *,PULONG); +BOOLEAN WINAPI WinStationGetAllProcesses(HANDLE,ULONG,PULONG,PTS_ALL_PROCESSES_INFO *); +BOOLEAN WINAPI WinStationGetProcessSid(HANDLE,ULONG,FILETIME *,PVOID,PULONG); +BOOLEAN WINAPI WinStationQueryInformationW(HANDLE,ULONG,WINSTATIONINFOCLASS,PVOID,ULONG,PULONG); +BOOLEAN WINAPI WinStationRegisterConsoleNotification(HANDLE,HWND,ULONG); + +#endif /* _WINSTA_H */ diff --git a/dlls/winsta/winsta.spec b/dlls/winsta/winsta.spec index 5854d83..30aa6b5 100644 --- a/dlls/winsta/winsta.spec +++ b/dlls/winsta/winsta.spec @@ -39,7 +39,7 @@ @ stub WinStationGetLanAdapterNameA @ stub WinStationGetLanAdapterNameW @ stub WinStationGetMachinePolicy -@ stdcall WinStationGetProcessSid(ptr ptr long ptr ptr ptr) +@ stdcall WinStationGetProcessSid(ptr long ptr ptr ptr) @ stub WinStationGetTermSrvCountersValue @ stub WinStationInstallLicense @ stub WinStationIsHelpAssistantSession
1
0
0
0
← Newer
1
...
19
20
21
22
23
24
25
...
57
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
Results per page:
10
25
50
100
200