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
March 2012
----- 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
710 discussions
Start a n
N
ew thread
Vincent Povirk : gdiplus: Draw hotkey underlines in GdipDrawString.
by Alexandre Julliard
26 Mar '12
26 Mar '12
Module: wine Branch: master Commit: 8a0b57a9a1d1611f0b00170841fc526e3344d6c2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8a0b57a9a1d1611f0b0017084…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Wed Mar 21 14:09:27 2012 -0500 gdiplus: Draw hotkey underlines in GdipDrawString. --- dlls/gdiplus/graphics.c | 35 +++++++++++++++++++++++++++++++---- 1 files changed, 31 insertions(+), 4 deletions(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index c5ac9d1..89ed61b 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -5038,16 +5038,43 @@ static GpStatus draw_string_callback(HDC hdc, { struct draw_string_args *args = user_data; PointF position; - - if (underlined_index_count) - FIXME("hotkey underlines not drawn yet\n"); + GpStatus stat; position.X = args->x + bounds->X / args->rel_width; position.Y = args->y + bounds->Y / args->rel_height + args->ascent; - return GdipDrawDriverString(args->graphics, &string[index], length, font, + stat = GdipDrawDriverString(args->graphics, &string[index], length, font, args->brush, &position, DriverStringOptionsCmapLookup|DriverStringOptionsRealizedAdvance, NULL); + + if (stat == Ok && underlined_index_count) + { + OUTLINETEXTMETRICW otm; + REAL underline_y, underline_height; + int i; + + GetOutlineTextMetricsW(hdc, sizeof(otm), &otm); + + underline_height = otm.otmsUnderscoreSize / args->rel_height; + underline_y = position.Y - otm.otmsUnderscorePosition / args->rel_height - underline_height / 2; + + for (i=0; i<underlined_index_count; i++) + { + REAL start_x, end_x; + SIZE text_size; + INT ofs = underlined_indexes[i] - index; + + GetTextExtentExPointW(hdc, string + index, ofs, INT_MAX, NULL, NULL, &text_size); + start_x = text_size.cx / args->rel_width; + + GetTextExtentExPointW(hdc, string + index, ofs+1, INT_MAX, NULL, NULL, &text_size); + end_x = text_size.cx / args->rel_width; + + GdipFillRectangle(args->graphics, (GpBrush*)args->brush, position.X+start_x, underline_y, end_x-start_x, underline_height); + } + } + + return stat; } GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string,
1
0
0
0
Vincent Povirk : gdiplus: Detect hotkey prefixes when drawing strings.
by Alexandre Julliard
26 Mar '12
26 Mar '12
Module: wine Branch: master Commit: eef459968a480cb62c422cecb38f8844644779dd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eef459968a480cb62c422cecb…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Wed Mar 21 12:50:11 2012 -0500 gdiplus: Detect hotkey prefixes when drawing strings. --- dlls/gdiplus/gdiplus_private.h | 3 +- dlls/gdiplus/graphics.c | 57 +++++++++++++++++++++++++++++++++++++--- dlls/gdiplus/graphicspath.c | 6 +++- 3 files changed, 60 insertions(+), 6 deletions(-) diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h index 3cd01b4..24df3dd 100644 --- a/dlls/gdiplus/gdiplus_private.h +++ b/dlls/gdiplus/gdiplus_private.h @@ -424,7 +424,8 @@ struct GpRegion{ typedef GpStatus (*gdip_format_string_callback)(HDC hdc, GDIPCONST WCHAR *string, INT index, INT length, GDIPCONST GpFont *font, GDIPCONST RectF *rect, GDIPCONST GpStringFormat *format, - INT lineno, const RectF *bounds, void *user_data); + INT lineno, const RectF *bounds, INT *underlined_indexes, + INT underlined_index_count, void *user_data); GpStatus gdip_format_string(HDC hdc, GDIPCONST WCHAR *string, INT length, GDIPCONST GpFont *font, diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index cbaf3ed..c5ac9d1 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -4686,6 +4686,11 @@ GpStatus gdip_format_string(HDC hdc, StringAlignment halign; GpStatus stat = Ok; SIZE size; + HotkeyPrefix hkprefix; + INT *hotkeyprefix_offsets=NULL; + INT hotkeyprefix_count=0; + INT hotkeyprefix_pos=0, hotkeyprefix_end_pos=0; + int seen_prefix=0; if(length == -1) length = lstrlenW(string); @@ -4698,11 +4703,40 @@ GpStatus gdip_format_string(HDC hdc, if (rect->Width >= INT_MAX || rect->Width < 0.5) nwidth = INT_MAX; if (rect->Height >= INT_MAX || rect->Height < 0.5) nheight = INT_MAX; + if (format) + hkprefix = format->hkprefix; + else + hkprefix = HotkeyPrefixNone; + + if (hkprefix == HotkeyPrefixShow) + { + for (i=0; i<length; i++) + { + if (string[i] == '&') + hotkeyprefix_count++; + } + } + + if (hotkeyprefix_count) + hotkeyprefix_offsets = GdipAlloc(sizeof(INT) * hotkeyprefix_count); + + hotkeyprefix_count = 0; + for(i = 0, j = 0; i < length; i++){ /* FIXME: This makes the indexes passed to callback inaccurate. */ if(!isprintW(string[i]) && (string[i] != '\n')) continue; + if (seen_prefix && hkprefix == HotkeyPrefixShow && string[i] != '&') + hotkeyprefix_offsets[hotkeyprefix_count++] = j; + else if (!seen_prefix && hkprefix != HotkeyPrefixNone && string[i] == '&') + { + seen_prefix = 1; + continue; + } + + seen_prefix = 0; + stringdup[j] = string[i]; j++; } @@ -4777,8 +4811,14 @@ GpStatus gdip_format_string(HDC hdc, break; } + for (hotkeyprefix_end_pos=hotkeyprefix_pos; hotkeyprefix_end_pos<hotkeyprefix_count; hotkeyprefix_end_pos++) + if (hotkeyprefix_offsets[hotkeyprefix_end_pos] >= sum + lineend) + break; + stat = callback(hdc, stringdup, sum, lineend, - font, rect, format, lineno, &bounds, user_data); + font, rect, format, lineno, &bounds, + &hotkeyprefix_offsets[hotkeyprefix_pos], + hotkeyprefix_end_pos-hotkeyprefix_pos, user_data); if (stat != Ok) break; @@ -4787,6 +4827,8 @@ GpStatus gdip_format_string(HDC hdc, height += size.cy; lineno++; + hotkeyprefix_pos = hotkeyprefix_end_pos; + if(height > nheight) break; @@ -4796,6 +4838,7 @@ GpStatus gdip_format_string(HDC hdc, } GdipFree(stringdup); + GdipFree(hotkeyprefix_offsets); return stat; } @@ -4807,7 +4850,8 @@ struct measure_ranges_args { static GpStatus measure_ranges_callback(HDC hdc, GDIPCONST WCHAR *string, INT index, INT length, GDIPCONST GpFont *font, GDIPCONST RectF *rect, GDIPCONST GpStringFormat *format, - INT lineno, const RectF *bounds, void *user_data) + INT lineno, const RectF *bounds, INT *underlined_indexes, + INT underlined_index_count, void *user_data) { int i; GpStatus stat = Ok; @@ -4904,7 +4948,8 @@ struct measure_string_args { static GpStatus measure_string_callback(HDC hdc, GDIPCONST WCHAR *string, INT index, INT length, GDIPCONST GpFont *font, GDIPCONST RectF *rect, GDIPCONST GpStringFormat *format, - INT lineno, const RectF *bounds, void *user_data) + INT lineno, const RectF *bounds, INT *underlined_indexes, + INT underlined_index_count, void *user_data) { struct measure_string_args *args = user_data; @@ -4988,11 +5033,15 @@ struct draw_string_args { static GpStatus draw_string_callback(HDC hdc, GDIPCONST WCHAR *string, INT index, INT length, GDIPCONST GpFont *font, GDIPCONST RectF *rect, GDIPCONST GpStringFormat *format, - INT lineno, const RectF *bounds, void *user_data) + INT lineno, const RectF *bounds, INT *underlined_indexes, + INT underlined_index_count, void *user_data) { struct draw_string_args *args = user_data; PointF position; + if (underlined_index_count) + FIXME("hotkey underlines not drawn yet\n"); + position.X = args->x + bounds->X / args->rel_width; position.Y = args->y + bounds->Y / args->rel_height + args->ascent; diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 131477e..c41278c 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -846,7 +846,8 @@ struct format_string_args static GpStatus format_string_callback(HDC dc, GDIPCONST WCHAR *string, INT index, INT length, GDIPCONST GpFont *font, GDIPCONST RectF *rect, GDIPCONST GpStringFormat *format, - INT lineno, const RectF *bounds, void *priv) + INT lineno, const RectF *bounds, INT *underlined_indexes, + INT underlined_index_count, void *priv) { static const MAT2 identity = { {0,1}, {0,0}, {0,0}, {0,1} }; struct format_string_args *args = priv; @@ -856,6 +857,9 @@ static GpStatus format_string_callback(HDC dc, float y = bounds->Y; int i; + if (underlined_index_count) + FIXME("hotkey underlines not drawn yet\n"); + for (i = index; i < length; ++i) { GLYPHMETRICS gm;
1
0
0
0
Aric Stewart : usp10: Properly handle invalid arguments to ScriptBreak.
by Alexandre Julliard
26 Mar '12
26 Mar '12
Module: wine Branch: master Commit: 5bb7590fadcba0d308870ddfa58fc43739a32112 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5bb7590fadcba0d308870ddfa…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Mon Mar 19 13:48:39 2012 -0500 usp10: Properly handle invalid arguments to ScriptBreak. --- dlls/usp10/tests/usp10.c | 13 +++++++++++++ dlls/usp10/usp10.c | 3 ++- 2 files changed, 15 insertions(+), 1 deletions(-) diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c index 8229755..0b5033b 100644 --- a/dlls/usp10/tests/usp10.c +++ b/dlls/usp10/tests/usp10.c @@ -2798,6 +2798,19 @@ static void test_ScriptBreak(void) hr = ScriptItemize(test, 3, 4, NULL, NULL, items, NULL); ok(!hr, "ScriptItemize should return S_OK not %08x\n", hr); + /* + * This Test crashes pre Vista. + + hr = ScriptBreak(test, 1, &items[0].a, NULL); + ok(hr == E_INVALIDARG, "ScriptBreak should return E_INVALIDARG not %08x\n", hr); + */ + + hr = ScriptBreak(test, 0, &items[0].a, &la); + ok(hr == E_FAIL || broken(hr == S_OK), "ScriptBreak should return E_FAIL not %08x\n", hr); + + hr = ScriptBreak(test, -1, &items[0].a, &la); + ok(hr == E_INVALIDARG || broken(hr == S_OK), "ScriptBreak should return E_INVALIDARG not %08x\n", hr); + memset(&la, 0, sizeof(la)); hr = ScriptBreak(test, 1, &items[0].a, &la); ok(!hr, "ScriptBreak should return S_OK not %08x\n", hr); diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index cad234f..4d0d9f3 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -2665,7 +2665,8 @@ HRESULT WINAPI ScriptBreak(const WCHAR *chars, int count, const SCRIPT_ANALYSIS { TRACE("(%s, %d, %p, %p)\n", debugstr_wn(chars, count), count, sa, la); - if (!la) return S_FALSE; + if (count < 0 || !la) return E_INVALIDARG; + if (count == 0) return E_FAIL; BREAK_line(chars, count, sa, la);
1
0
0
0
Vincent Povirk : mscoree: Search for an arch-specific mono dll first.
by Alexandre Julliard
26 Mar '12
26 Mar '12
Module: wine Branch: master Commit: c110a55f12a0dae4fdff9fb3e861eb4eb8bc0380 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c110a55f12a0dae4fdff9fb3e…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Mon Mar 19 12:54:55 2012 -0500 mscoree: Search for an arch-specific mono dll first. --- dlls/mscoree/metahost.c | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/dlls/mscoree/metahost.c b/dlls/mscoree/metahost.c index e15a638..f915d73 100644 --- a/dlls/mscoree/metahost.c +++ b/dlls/mscoree/metahost.c @@ -564,6 +564,14 @@ HRESULT ICLRRuntimeInfo_GetRuntimeHost(ICLRRuntimeInfo *iface, RuntimeHost **res return CLRRuntimeInfo_GetRuntimeHost(This, result); } +#ifdef __i386__ +static const WCHAR libmono2_arch_dll[] = {'\\','b','i','n','\\','l','i','b','m','o','n','o','-','2','.','0','-','x','8','6','.','d','l','l',0}; +#elif defined(__x86_64__) +static const WCHAR libmono2_arch_dll[] = {'\\','b','i','n','\\','l','i','b','m','o','n','o','-','2','.','0','-','x','8','6','_','6','4','.','d','l','l',0}; +#else +static const WCHAR libmono2_arch_dll[] = {'\\','b','i','n','\\','l','i','b','m','o','n','o','-','2','.','0','.','d','l','l',0}; +#endif + static BOOL find_mono_dll(LPCWSTR path, LPWSTR dll_path, int abi_version) { static const WCHAR mono_dll[] = {'\\','b','i','n','\\','m','o','n','o','.','d','l','l',0}; @@ -588,12 +596,19 @@ static BOOL find_mono_dll(LPCWSTR path, LPWSTR dll_path, int abi_version) else if (abi_version == 2) { strcpyW(dll_path, path); - strcatW(dll_path, mono2_dll); + strcatW(dll_path, libmono2_arch_dll); attributes = GetFileAttributesW(dll_path); if (attributes == INVALID_FILE_ATTRIBUTES) { strcpyW(dll_path, path); + strcatW(dll_path, mono2_dll); + attributes = GetFileAttributesW(dll_path); + } + + if (attributes == INVALID_FILE_ATTRIBUTES) + { + strcpyW(dll_path, path); strcatW(dll_path, libmono2_dll); attributes = GetFileAttributesW(dll_path); }
1
0
0
0
Thomas Faber : xmllite/tests: Fix build with MSVC.
by Alexandre Julliard
26 Mar '12
26 Mar '12
Module: wine Branch: master Commit: 4cd00f2b5ed377575678ebbee85e1f649e0f860f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4cd00f2b5ed377575678ebbee…
Author: Thomas Faber <thfabba(a)gmx.de> Date: Mon Mar 19 17:01:19 2012 +0100 xmllite/tests: Fix build with MSVC. --- dlls/xmllite/tests/reader.c | 4 ++-- dlls/xmllite/tests/writer.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/xmllite/tests/reader.c b/dlls/xmllite/tests/reader.c index ec47453..1f1b2ec 100644 --- a/dlls/xmllite/tests/reader.c +++ b/dlls/xmllite/tests/reader.c @@ -33,8 +33,8 @@ DEFINE_GUID(IID_IXmlReaderInput, 0x0b3ccc9b, 0x9214, 0x428b, 0xa2, 0xae, 0xef, 0x3a, 0xa8, 0x71, 0xaf, 0xda); -static HRESULT WINAPI (*pCreateXmlReader)(REFIID riid, void **ppvObject, IMalloc *pMalloc); -static HRESULT WINAPI (*pCreateXmlReaderInputWithEncodingName)(IUnknown *stream, +static HRESULT (WINAPI *pCreateXmlReader)(REFIID riid, void **ppvObject, IMalloc *pMalloc); +static HRESULT (WINAPI *pCreateXmlReaderInputWithEncodingName)(IUnknown *stream, IMalloc *pMalloc, LPCWSTR encoding, BOOL hint, diff --git a/dlls/xmllite/tests/writer.c b/dlls/xmllite/tests/writer.c index e98db7b..af4e1a8 100644 --- a/dlls/xmllite/tests/writer.c +++ b/dlls/xmllite/tests/writer.c @@ -28,7 +28,7 @@ #include "xmllite.h" #include "wine/test.h" -static HRESULT WINAPI (*pCreateXmlWriter)(REFIID riid, void **ppvObject, IMalloc *pMalloc); +static HRESULT (WINAPI *pCreateXmlWriter)(REFIID riid, void **ppvObject, IMalloc *pMalloc); static void test_writer_create(void) {
1
0
0
0
Andrew Eikum : dmloader: Add simple playing test.
by Alexandre Julliard
26 Mar '12
26 Mar '12
Module: wine Branch: master Commit: b235edb01423c169db85ca024754a564d5aebae6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b235edb01423c169db85ca024…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Mon Mar 19 07:35:22 2012 -0500 dmloader: Add simple playing test. --- dlls/dmloader/tests/loader.c | 91 ++++++++++++++++++++++++++++++++++++++---- 1 files changed, 83 insertions(+), 8 deletions(-) diff --git a/dlls/dmloader/tests/loader.c b/dlls/dmloader/tests/loader.c index 18e86e4..ea5edca 100644 --- a/dlls/dmloader/tests/loader.c +++ b/dlls/dmloader/tests/loader.c @@ -22,34 +22,109 @@ #include "dmusici.h" #include "wine/test.h" +static unsigned char mp3file[] = "\xFF\xFB\x92\x04"; /* MP3 header */ +static unsigned char rifffile[8+4+8+16+8+256] = "RIFF\x24\x01\x00\x00WAVE" /* header: 4 ("WAVE") + (8 + 16) (format segment) + (8 + 256) (data segment) = 0x124 */ + "fmt \x10\x00\x00\x00\x01\x00\x20\x00\xAC\x44\x00\x00\x10\xB1\x02\x00\x04\x00\x10\x00" /* format segment: PCM, 2 chan, 44100 Hz, 16 bits */ + "data\x00\x01\x00\x00"; /* 256 byte data segment (silence) */ + static void test_release_object(void) { HRESULT hr; IDirectMusicLoader8* loader = NULL; - hr = CoInitialize(NULL); + hr = CoCreateInstance(&CLSID_DirectMusicLoader, NULL, CLSCTX_INPROC, &IID_IDirectMusicLoader8, (void**)&loader); if ( FAILED(hr) ) { - skip("CoInitialize failed.\n"); + skip("CoCreateInstance failed.\n"); return; } - hr = CoCreateInstance(&CLSID_DirectMusicLoader, NULL, CLSCTX_INPROC, &IID_IDirectMusicLoader8, (void**)&loader); + hr = IDirectMusicLoader_ReleaseObject(loader, NULL); + ok(hr == E_POINTER, "Expected E_POINTER, received %#x\n", hr); + + IDirectMusicLoader_Release(loader); +} + +static void test_simple_playing(void) +{ + IDirectMusic *music = NULL; + IDirectMusicLoader8 *loader; + IDirectMusicPerformance8 *perf; + IDirectMusicAudioPath8 *path = NULL; + IDirectMusicSegment8 *segment = NULL; + IDirectMusicSegmentState *state = NULL; + IDirectSound *dsound = NULL; + DMUS_OBJECTDESC desc = {0}; + HRESULT hr; + + hr = CoCreateInstance(&CLSID_DirectMusicPerformance, NULL, + CLSCTX_INPROC_SERVER, &IID_IDirectMusicPerformance8, + (void**)&perf); if ( FAILED(hr) ) { skip("CoCreateInstance failed.\n"); - CoUninitialize(); return; } - hr = IDirectMusicLoader_ReleaseObject(loader, NULL); - ok(hr == E_POINTER, "Expected E_POINTER, received %#x\n", hr); + hr = CoCreateInstance(&CLSID_DirectMusicLoader, NULL, + CLSCTX_INPROC_SERVER, &IID_IDirectMusicLoader8, + (void**)&loader); + ok(hr == S_OK, "Couldn't create Loader %08x\n", hr); - IDirectMusicLoader_Release(loader); - CoUninitialize(); + hr = IDirectMusicPerformance8_InitAudio(perf, &music, &dsound, NULL, + DMUS_APATH_DYNAMIC_STEREO, 64, DMUS_AUDIOF_ALL, NULL); + ok(hr == S_OK, "InitAudio failed: %08x\n", hr); + ok(music != NULL, "Didn't get IDirectMusic pointer\n"); + ok(dsound != NULL, "Didn't get IDirectSound pointer\n"); + + hr = IDirectMusicPerformance8_CreateStandardAudioPath(perf, + DMUS_APATH_DYNAMIC_STEREO, 64, TRUE, &path); + ok(hr == S_OK, "CreateStandardAudioPath failed: %08x\n", hr); + ok(path != NULL, "Didn't get IDirectMusicAudioPath pointer\n"); + + desc.dwSize = sizeof(DMUS_OBJECTDESC); + desc.dwValidData = DMUS_OBJ_CLASS | DMUS_OBJ_MEMORY; + desc.guidClass = CLSID_DirectMusicSegment; + desc.pbMemData = mp3file; + desc.llMemLength = sizeof(mp3file); + hr = IDirectMusicLoader8_GetObject(loader, &desc, &IID_IDirectMusicSegment8, + (void**)&segment); + ok(hr == DMUS_E_UNSUPPORTED_STREAM, "GetObject gave wrong error: %08x\n", hr); + ok(segment == NULL, "Didn't get NULL IDirectMusicSegment pointer\n"); + + desc.pbMemData = rifffile; + desc.llMemLength = sizeof(rifffile); + hr = IDirectMusicLoader8_GetObject(loader, &desc, &IID_IDirectMusicSegment8, + (void**)&segment); + ok(hr == S_OK, "GetObject failed: %08x\n", hr); + ok(segment != NULL, "Didn't get IDirectMusicSegment pointer\n"); + + hr = IDirectMusicSegment8_Download(segment, (IUnknown*)path); + ok(hr == S_OK, "Download failed: %08x\n", hr); + + hr = IDirectMusicSegment8_SetRepeats(segment, 1); + ok(hr == S_OK, "SetRepeats failed: %08x\n", hr); + + hr = IDirectMusicPerformance8_PlaySegmentEx(perf, (IUnknown*)segment, + NULL, NULL, DMUS_SEGF_SECONDARY, 0, &state, NULL, (IUnknown*)path); + ok(hr == S_OK, "PlaySegmentEx failed: %08x\n", hr); + ok(state != NULL, "Didn't get IDirectMusicSegmentState pointer\n"); + + hr = IDirectMusicPerformance8_CloseDown(perf); + ok(hr == S_OK, "CloseDown failed: %08x\n", hr); + + IDirectSound_Release(dsound); + IDirectMusicSegmentState_Release(state); + IDirectMusicSegment8_Release(segment); + IDirectMusic_Release(music); + IDirectMusicPerformance8_Release(perf); + IDirectMusicLoader8_Release(loader); } START_TEST(loader) { + CoInitialize(NULL); test_release_object(); + test_simple_playing(); + CoUninitialize(); }
1
0
0
0
Andrew Eikum : dmloader: Don't claim partial success when loading fails.
by Alexandre Julliard
26 Mar '12
26 Mar '12
Module: wine Branch: master Commit: 5e522a1d1c7c84a4c89f67770ff391f05662d35b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5e522a1d1c7c84a4c89f67770…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Mon Mar 19 07:35:17 2012 -0500 dmloader: Don't claim partial success when loading fails. --- dlls/dmloader/loader.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/dmloader/loader.c b/dlls/dmloader/loader.c index 868f4e0..1c25435 100644 --- a/dlls/dmloader/loader.c +++ b/dlls/dmloader/loader.c @@ -304,7 +304,7 @@ static HRESULT WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_GetObject (LPDIR result = IPersistStream_Load (pPersistStream, pStream); if (result != S_OK) { WARN(": failed to (completely) load object (%s)\n", debugstr_dmreturn(result)); - ret = DMUS_S_PARTIALLOAD /*result*/; + return result; } /* get descriptor */ DM_STRUCT_INIT(&GotDesc);
1
0
0
0
Andrew Eikum : dmusic: Return more accurate error codes in IDirectMusicSegment::Load.
by Alexandre Julliard
26 Mar '12
26 Mar '12
Module: wine Branch: master Commit: 760a318882ece7ace80d3c5d61eb3295d36c0852 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=760a318882ece7ace80d3c5d6…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Mon Mar 19 07:35:10 2012 -0500 dmusic: Return more accurate error codes in IDirectMusicSegment::Load. --- dlls/dmime/segment.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/dlls/dmime/segment.c b/dlls/dmime/segment.c index 82ea753..6dd5e02 100644 --- a/dlls/dmime/segment.c +++ b/dlls/dmime/segment.c @@ -1204,7 +1204,11 @@ static HRESULT WINAPI IDirectMusicSegment8Impl_IPersistStream_Load (LPPERSISTSTR LARGE_INTEGER liMove; /* used when skipping chunks */ TRACE("(%p, %p): Loading\n", This, pStm); - IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); + hr = IStream_Read (pStm, &Chunk, sizeof(Chunk), NULL); + if(hr != S_OK){ + WARN("IStream_Read failed: %08x\n", hr); + return DMUS_E_UNSUPPORTED_STREAM; + } TRACE_(dmfile)(": %s chunk (size = %d)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); switch (Chunk.fccID) { case FOURCC_RIFF: { @@ -1246,7 +1250,7 @@ static HRESULT WINAPI IDirectMusicSegment8Impl_IPersistStream_Load (LPPERSISTSTR TRACE_(dmfile)(": unexpected chunk (loading failed)\n"); liMove.QuadPart = StreamSize; IStream_Seek (pStm, liMove, STREAM_SEEK_CUR, NULL); /* skip the rest of the chunk */ - return E_FAIL; + return DMUS_E_UNSUPPORTED_STREAM; } } TRACE_(dmfile)(": reading finished\n"); @@ -1254,9 +1258,7 @@ static HRESULT WINAPI IDirectMusicSegment8Impl_IPersistStream_Load (LPPERSISTSTR } default: { TRACE_(dmfile)(": unexpected chunk; loading failed)\n"); - liMove.QuadPart = Chunk.dwSize; - IStream_Seek (pStm, liMove, STREAM_SEEK_CUR, NULL); /* skip the rest of the chunk */ - return E_FAIL; + return DMUS_E_UNSUPPORTED_STREAM; } }
1
0
0
0
Alessandro Pignotti : atl: Send OLE_CLOSE command to control on detach.
by Alexandre Julliard
26 Mar '12
26 Mar '12
Module: wine Branch: master Commit: aaf99d8ef050d957a0fe37fd556016f087c607bd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aaf99d8ef050d957a0fe37fd5…
Author: Alessandro Pignotti <a.pignotti(a)sssup.it> Date: Mon Feb 13 12:12:17 2012 +0100 atl: Send OLE_CLOSE command to control on detach. --- dlls/atl/atl_ax.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/atl/atl_ax.c b/dlls/atl/atl_ax.c index c1b74f7..3b0abea5 100644 --- a/dlls/atl/atl_ax.c +++ b/dlls/atl/atl_ax.c @@ -800,6 +800,7 @@ static HRESULT IOCS_Detach( IOCS *This ) /* remove subclassing */ IOleObject *control = This->control; This->control = NULL; + IOleObject_Close( control, OLECLOSE_NOSAVE ); IOleObject_SetClientSite( control, NULL ); IOleObject_Release( control ); }
1
0
0
0
Michael Stefaniuc : hlink: Use the standard COM aggregation struct field names.
by Alexandre Julliard
26 Mar '12
26 Mar '12
Module: wine Branch: master Commit: 04305e7f381ca0eda21400c346b5e69da089befa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=04305e7f381ca0eda21400c34…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Mon Mar 19 00:29:07 2012 +0100 hlink: Use the standard COM aggregation struct field names. --- dlls/hlink/extserv.c | 40 ++++++++++++++++++++-------------------- 1 files changed, 20 insertions(+), 20 deletions(-) diff --git a/dlls/hlink/extserv.c b/dlls/hlink/extserv.c index 7f1d565..670bac2 100644 --- a/dlls/hlink/extserv.c +++ b/dlls/hlink/extserv.c @@ -24,13 +24,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(hlink); typedef struct { - IUnknown IUnknown_iface; + IUnknown IUnknown_inner; IAuthenticate IAuthenticate_iface; IHttpNegotiate IHttpNegotiate_iface; IExtensionServices IExtensionServices_iface; + IUnknown *outer_unk; LONG ref; - IUnknown *outer; HWND hwnd; LPWSTR username; @@ -40,7 +40,7 @@ typedef struct { static inline ExtensionService *impl_from_IUnknown(IUnknown *iface) { - return CONTAINING_RECORD(iface, ExtensionService, IUnknown_iface); + return CONTAINING_RECORD(iface, ExtensionService, IUnknown_inner); } static HRESULT WINAPI ExtServUnk_QueryInterface(IUnknown *iface, REFIID riid, void **ppv) @@ -51,7 +51,7 @@ static HRESULT WINAPI ExtServUnk_QueryInterface(IUnknown *iface, REFIID riid, vo if(IsEqualGUID(&IID_IUnknown, riid)) { TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); - *ppv = &This->IUnknown_iface; + *ppv = &This->IUnknown_inner; }else if(IsEqualGUID(&IID_IAuthenticate, riid)) { TRACE("(%p)->(IID_IAuthenticate %p)\n", This, ppv); *ppv = &This->IAuthenticate_iface; @@ -113,19 +113,19 @@ static inline ExtensionService *impl_from_IAuthenticate(IAuthenticate *iface) static HRESULT WINAPI Authenticate_QueryInterface(IAuthenticate *iface, REFIID riid, void **ppv) { ExtensionService *This = impl_from_IAuthenticate(iface); - return IUnknown_QueryInterface(This->outer, riid, ppv); + return IUnknown_QueryInterface(This->outer_unk, riid, ppv); } static ULONG WINAPI Authenticate_AddRef(IAuthenticate *iface) { ExtensionService *This = impl_from_IAuthenticate(iface); - return IUnknown_AddRef(This->outer); + return IUnknown_AddRef(This->outer_unk); } static ULONG WINAPI Authenticate_Release(IAuthenticate *iface) { ExtensionService *This = impl_from_IAuthenticate(iface); - return IUnknown_Release(This->outer); + return IUnknown_Release(This->outer_unk); } static HRESULT WINAPI Authenticate_Authenticate(IAuthenticate *iface, @@ -160,19 +160,19 @@ static inline ExtensionService *impl_from_IHttpNegotiate(IHttpNegotiate *iface) static HRESULT WINAPI HttpNegotiate_QueryInterface(IHttpNegotiate *iface, REFIID riid, void **ppv) { ExtensionService *This = impl_from_IHttpNegotiate(iface); - return IUnknown_QueryInterface(This->outer, riid, ppv); + return IUnknown_QueryInterface(This->outer_unk, riid, ppv); } static ULONG WINAPI HttpNegotiate_AddRef(IHttpNegotiate *iface) { ExtensionService *This = impl_from_IHttpNegotiate(iface); - return IUnknown_AddRef(This->outer); + return IUnknown_AddRef(This->outer_unk); } static ULONG WINAPI HttpNegotiate_Release(IHttpNegotiate *iface) { ExtensionService *This = impl_from_IHttpNegotiate(iface); - return IUnknown_Release(This->outer); + return IUnknown_Release(This->outer_unk); } static HRESULT WINAPI HttpNegotiate_BeginningTransaction(IHttpNegotiate *iface, @@ -218,19 +218,19 @@ static inline ExtensionService *impl_from_IExtensionServices(IExtensionServices static HRESULT WINAPI ExtServ_QueryInterface(IExtensionServices *iface, REFIID riid, void **ppv) { ExtensionService *This = impl_from_IExtensionServices(iface); - return IUnknown_QueryInterface(This->outer, riid, ppv); + return IUnknown_QueryInterface(This->outer_unk, riid, ppv); } static ULONG WINAPI ExtServ_AddRef(IExtensionServices *iface) { ExtensionService *This = impl_from_IExtensionServices(iface); - return IUnknown_AddRef(This->outer); + return IUnknown_AddRef(This->outer_unk); } static ULONG WINAPI ExtServ_Release(IExtensionServices *iface) { ExtensionService *This = impl_from_IExtensionServices(iface); - return IUnknown_Release(This->outer); + return IUnknown_Release(This->outer_unk); } static HRESULT ExtServ_ImplSetAdditionalHeaders(ExtensionService* This, LPCWSTR pwzAdditionalHeaders) @@ -311,7 +311,7 @@ HRESULT WINAPI HlinkCreateExtensionServices(LPCWSTR pwzAdditionalHeaders, ret = heap_alloc(sizeof(*ret)); - ret->IUnknown_iface.lpVtbl = &ExtServUnkVtbl; + ret->IUnknown_inner.lpVtbl = &ExtServUnkVtbl; ret->IAuthenticate_iface.lpVtbl = &AuthenticateVtbl; ret->IHttpNegotiate_iface.lpVtbl = &HttpNegotiateVtbl; ret->IExtensionServices_iface.lpVtbl = &ExtServVtbl; @@ -325,14 +325,14 @@ HRESULT WINAPI HlinkCreateExtensionServices(LPCWSTR pwzAdditionalHeaders, ExtServ_ImplSetAdditionalHeaders(ret, pwzAdditionalHeaders); if(!punkOuter) { - ret->outer = &ret->IUnknown_iface; - hres = IUnknown_QueryInterface(&ret->IUnknown_iface, riid, ppv); - IUnknown_Release(&ret->IUnknown_iface); + ret->outer_unk = &ret->IUnknown_inner; + hres = IUnknown_QueryInterface(&ret->IUnknown_inner, riid, ppv); + IUnknown_Release(&ret->IUnknown_inner); }else if(IsEqualGUID(&IID_IUnknown, riid)) { - ret->outer = punkOuter; - *ppv = &ret->IUnknown_iface; + ret->outer_unk = punkOuter; + *ppv = &ret->IUnknown_inner; }else { - IUnknown_Release(&ret->IUnknown_iface); + IUnknown_Release(&ret->IUnknown_inner); hres = E_INVALIDARG; }
1
0
0
0
← Newer
1
...
24
25
26
27
28
29
30
...
71
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
Results per page:
10
25
50
100
200