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 2021
----- 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
1163 discussions
Start a n
N
ew thread
Rémi Bernon : ntdll/tests: Add InterruptTimeBias to fix spurious test failures.
by Alexandre Julliard
15 Mar '21
15 Mar '21
Module: wine Branch: master Commit: 97d2802d1b265636afaab16efb463ff9dfb3c03e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=97d2802d1b265636afaab16e…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Mar 10 12:22:32 2021 +0100 ntdll/tests: Add InterruptTimeBias to fix spurious test failures. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/time.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/ntdll/tests/time.c b/dlls/ntdll/tests/time.c index 931bf765aa7..51d9115b87c 100644 --- a/dlls/ntdll/tests/time.c +++ b/dlls/ntdll/tests/time.c @@ -243,14 +243,13 @@ static void test_user_shared_data_time(void) do { pRtlQueryUnbiasedInterruptTime(&t1); - t2 = read_ksystem_time(&user_shared_data->InterruptTime); + t2 = read_ksystem_time(&user_shared_data->InterruptTime) - user_shared_data->InterruptTimeBias; pRtlQueryUnbiasedInterruptTime(&t3); } while(t3 < t1 && i++ < 1); /* allow for wrap, but only once */ ok(t1 <= t2, "USD InterruptTime / RtlQueryUnbiasedInterruptTime are out of order %s %s\n", wine_dbgstr_longlong(t1), wine_dbgstr_longlong(t2)); - ok(t2 <= t3 || broken(t2 == t3 + 82410089070) /* w864 has some weird offset on testbot */, - "USD InterruptTime / RtlQueryUnbiasedInterruptTime are out of order %s %s\n", + ok(t2 <= t3, "USD InterruptTime / RtlQueryUnbiasedInterruptTime are out of order %s %s\n", wine_dbgstr_longlong(t2), wine_dbgstr_longlong(t3)); } }
1
0
0
0
Rémi Bernon : ntdll/tests: Fix tick count read from user shared data.
by Alexandre Julliard
15 Mar '21
15 Mar '21
Module: wine Branch: master Commit: 8591c2ac1a12f10a3447916999b1f61cf89ef197 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8591c2ac1a12f10a34479169…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Mar 10 12:22:31 2021 +0100 ntdll/tests: Fix tick count read from user shared data. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/tests/time.c b/dlls/ntdll/tests/time.c index d756a8c839c..931bf765aa7 100644 --- a/dlls/ntdll/tests/time.c +++ b/dlls/ntdll/tests/time.c @@ -206,9 +206,9 @@ static void test_user_shared_data_time(void) { t1 = GetTickCount(); if (user_shared_data->NtMajorVersion <= 5 && user_shared_data->NtMinorVersion <= 1) - t2 = (*(volatile ULONG*)&user_shared_data->TickCountLowDeprecated * (ULONG64)user_shared_data->TickCountMultiplier) >> 24; + t2 = (DWORD)((*(volatile ULONG*)&user_shared_data->TickCountLowDeprecated * (ULONG64)user_shared_data->TickCountMultiplier) >> 24); else - t2 = (read_ksystem_time(&user_shared_data->u.TickCount) * user_shared_data->TickCountMultiplier) >> 24; + t2 = (DWORD)((read_ksystem_time(&user_shared_data->u.TickCount) * user_shared_data->TickCountMultiplier) >> 24); t3 = GetTickCount(); } while(t3 < t1 && i++ < 1); /* allow for wrap, but only once */
1
0
0
0
Zebediah Figura : opencl: Generate the spec file and thunks from the official XML registry file.
by Alexandre Julliard
15 Mar '21
15 Mar '21
Module: wine Branch: master Commit: b3bd08d8ddba2f065db62ffeb228002fb42c2fe6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b3bd08d8ddba2f065db62ffe…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Mar 9 17:13:11 2021 -0600 opencl: Generate the spec file and thunks from the official XML registry file. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/opencl/Makefile.in | 3 +- dlls/opencl/make_opencl | 299 +++++++++++++++++++ dlls/opencl/opencl.c | 670 +------------------------------------------ dlls/opencl/opencl.spec | 158 +++++----- dlls/opencl/opencl_private.h | 41 +++ dlls/opencl/opencl_thunks.c | 360 +++++++++++++++++++++++ 6 files changed, 768 insertions(+), 763 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=b3bd08d8ddba2f065db6…
1
0
0
0
Rémi Bernon : windows.media.speech: Fake empty IInstalledVoicesStatic::AllVoices vector.
by Alexandre Julliard
15 Mar '21
15 Mar '21
Module: wine Branch: master Commit: 0c216c5d5735c7808478171b380254aad6fe2603 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0c216c5d5735c7808478171b…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri Mar 12 12:31:12 2021 +0100 windows.media.speech: Fake empty IInstalledVoicesStatic::AllVoices vector. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windows.media.speech/main.c | 11 +++++++---- dlls/windows.media.speech/tests/statics.c | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/dlls/windows.media.speech/main.c b/dlls/windows.media.speech/main.c index 28b1c45c4fd..92215fe717d 100644 --- a/dlls/windows.media.speech/main.c +++ b/dlls/windows.media.speech/main.c @@ -119,28 +119,31 @@ static HRESULT STDMETHODCALLTYPE vector_view_voice_information_GetAt( IVectorView_VoiceInformation *iface, ULONG index, IVoiceInformation **value) { FIXME("iface %p, index %#x, value %p stub!\n", iface, index, value); - return E_NOTIMPL; + return S_OK; } static HRESULT STDMETHODCALLTYPE vector_view_voice_information_get_Size( IVectorView_VoiceInformation *iface, ULONG *value) { FIXME("iface %p, value %p stub!\n", iface, value); - return E_NOTIMPL; + *value = 0; + return S_OK; } static HRESULT STDMETHODCALLTYPE vector_view_voice_information_IndexOf( IVectorView_VoiceInformation *iface, IVoiceInformation *element, ULONG *index, BOOLEAN *value) { FIXME("iface %p, element %p, index %p, value %p stub!\n", iface, element, index, value); - return E_NOTIMPL; + *value = FALSE; + return S_OK; } static HRESULT STDMETHODCALLTYPE vector_view_voice_information_GetMany( IVectorView_VoiceInformation *iface, ULONG start_index, IVoiceInformation **items, UINT *value) { FIXME("iface %p, start_index %#x, items %p, value %p stub!\n", iface, start_index, items, value); - return E_NOTIMPL; + *value = 0; + return S_OK; } static const struct IVectorView_VoiceInformationVtbl vector_view_voice_information_vtbl = diff --git a/dlls/windows.media.speech/tests/statics.c b/dlls/windows.media.speech/tests/statics.c index 30994b3ac1d..8454729f9c3 100644 --- a/dlls/windows.media.speech/tests/statics.c +++ b/dlls/windows.media.speech/tests/statics.c @@ -100,7 +100,7 @@ static void test_SpeechSynthesizer(void) size = 0xdeadbeef; hr = IVectorView_VoiceInformation_get_Size(voices, &size); - todo_wine ok(SUCCEEDED(hr), "IVectorView_VoiceInformation_QueryInterface voices failed, hr %#x\n", hr); + ok(SUCCEEDED(hr), "IVectorView_VoiceInformation_QueryInterface voices failed, hr %#x\n", hr); todo_wine ok(size != 0 && size != 0xdeadbeef, "IVectorView_VoiceInformation_get_Size returned %u\n", size); rc = IVectorView_VoiceInformation_Release(voices);
1
0
0
0
Rémi Bernon : windows.media.speech: Implement IInstalledVoicesStatic::AllVoices stub.
by Alexandre Julliard
15 Mar '21
15 Mar '21
Module: wine Branch: master Commit: af8b935892fe5da59f8183eff4a63a47fc550014 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=af8b935892fe5da59f8183ef…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri Mar 12 12:31:11 2021 +0100 windows.media.speech: Implement IInstalledVoicesStatic::AllVoices stub. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windows.media.speech/main.c | 125 +++++++++++++++++++++++++++++- dlls/windows.media.speech/tests/statics.c | 8 +- 2 files changed, 126 insertions(+), 7 deletions(-) diff --git a/dlls/windows.media.speech/main.c b/dlls/windows.media.speech/main.c index 0d1da641394..28b1c45c4fd 100644 --- a/dlls/windows.media.speech/main.c +++ b/dlls/windows.media.speech/main.c @@ -46,6 +46,125 @@ static const char *debugstr_hstring(HSTRING hstr) return wine_dbgstr_wn(str, len); } +struct voice_information_vector +{ + IVectorView_VoiceInformation IVectorView_VoiceInformation_iface; + LONG ref; +}; + +static inline struct voice_information_vector *impl_from_IVectorView_VoiceInformation(IVectorView_VoiceInformation *iface) +{ + return CONTAINING_RECORD(iface, struct voice_information_vector, IVectorView_VoiceInformation_iface); +} + +static HRESULT STDMETHODCALLTYPE vector_view_voice_information_QueryInterface( + IVectorView_VoiceInformation *iface, REFIID iid, void **out) +{ + TRACE("iface %p, iid %s, out %p stub!\n", iface, debugstr_guid(iid), out); + + if (IsEqualGUID(iid, &IID_IUnknown) || + IsEqualGUID(iid, &IID_IInspectable) || + IsEqualGUID(iid, &IID_IVectorView_VoiceInformation)) + { + IUnknown_AddRef(iface); + *out = iface; + return S_OK; + } + + WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid)); + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG STDMETHODCALLTYPE vector_view_voice_information_AddRef( + IVectorView_VoiceInformation *iface) +{ + struct voice_information_vector *impl = impl_from_IVectorView_VoiceInformation(iface); + ULONG ref = InterlockedIncrement(&impl->ref); + TRACE("iface %p, ref %u.\n", iface, ref); + return ref; +} + +static ULONG STDMETHODCALLTYPE vector_view_voice_information_Release( + IVectorView_VoiceInformation *iface) +{ + struct voice_information_vector *impl = impl_from_IVectorView_VoiceInformation(iface); + ULONG ref = InterlockedDecrement(&impl->ref); + TRACE("iface %p, ref %u.\n", iface, ref); + return ref; +} + +static HRESULT STDMETHODCALLTYPE vector_view_voice_information_GetIids( + IVectorView_VoiceInformation *iface, ULONG *iid_count, IID **iids) +{ + FIXME("iface %p, iid_count %p, iids %p stub!\n", iface, iid_count, iids); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE vector_view_voice_information_GetRuntimeClassName( + IVectorView_VoiceInformation *iface, HSTRING *class_name) +{ + FIXME("iface %p, class_name %p stub!\n", iface, class_name); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE vector_view_voice_information_GetTrustLevel( + IVectorView_VoiceInformation *iface, TrustLevel *trust_level) +{ + FIXME("iface %p, trust_level %p stub!\n", iface, trust_level); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE vector_view_voice_information_GetAt( + IVectorView_VoiceInformation *iface, ULONG index, IVoiceInformation **value) +{ + FIXME("iface %p, index %#x, value %p stub!\n", iface, index, value); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE vector_view_voice_information_get_Size( + IVectorView_VoiceInformation *iface, ULONG *value) +{ + FIXME("iface %p, value %p stub!\n", iface, value); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE vector_view_voice_information_IndexOf( + IVectorView_VoiceInformation *iface, IVoiceInformation *element, ULONG *index, BOOLEAN *value) +{ + FIXME("iface %p, element %p, index %p, value %p stub!\n", iface, element, index, value); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE vector_view_voice_information_GetMany( + IVectorView_VoiceInformation *iface, ULONG start_index, IVoiceInformation **items, UINT *value) +{ + FIXME("iface %p, start_index %#x, items %p, value %p stub!\n", iface, start_index, items, value); + return E_NOTIMPL; +} + +static const struct IVectorView_VoiceInformationVtbl vector_view_voice_information_vtbl = +{ + vector_view_voice_information_QueryInterface, + vector_view_voice_information_AddRef, + vector_view_voice_information_Release, + /* IInspectable methods */ + vector_view_voice_information_GetIids, + vector_view_voice_information_GetRuntimeClassName, + vector_view_voice_information_GetTrustLevel, + /* IVectorView<VoiceInformation> methods */ + vector_view_voice_information_GetAt, + vector_view_voice_information_get_Size, + vector_view_voice_information_IndexOf, + vector_view_voice_information_GetMany, +}; + +static struct voice_information_vector all_voices = +{ + {&vector_view_voice_information_vtbl}, + 0 +}; + struct windows_media_speech { IActivationFactory IActivationFactory_iface; @@ -196,8 +315,10 @@ static HRESULT STDMETHODCALLTYPE installed_voices_static_GetTrustLevel( static HRESULT STDMETHODCALLTYPE installed_voices_static_get_AllVoices( IInstalledVoicesStatic *iface, IVectorView_VoiceInformation **value) { - FIXME("iface %p, value %p stub!\n", iface, value); - return E_NOTIMPL; + TRACE("iface %p, value %p.\n", iface, value); + *value = &all_voices.IVectorView_VoiceInformation_iface; + IVectorView_VoiceInformation_AddRef(*value); + return S_OK; } static HRESULT STDMETHODCALLTYPE installed_voices_static_get_DefaultVoice( diff --git a/dlls/windows.media.speech/tests/statics.c b/dlls/windows.media.speech/tests/statics.c index 470b6d769c6..30994b3ac1d 100644 --- a/dlls/windows.media.speech/tests/statics.c +++ b/dlls/windows.media.speech/tests/statics.c @@ -88,8 +88,7 @@ static void test_SpeechSynthesizer(void) IAgileObject_Release(tmp_agile_object); hr = IInstalledVoicesStatic_get_AllVoices(voices_static, &voices); - todo_wine ok(SUCCEEDED(hr), "IInstalledVoicesStatic_get_AllVoices failed, hr %#x\n", hr); - if (FAILED(hr)) goto done; + ok(SUCCEEDED(hr), "IInstalledVoicesStatic_get_AllVoices failed, hr %#x\n", hr); hr = IVectorView_VoiceInformation_QueryInterface(voices, &IID_IInspectable, (void **)&tmp_inspectable); ok(SUCCEEDED(hr), "IVectorView_VoiceInformation_QueryInterface voices failed, hr %#x\n", hr); @@ -101,13 +100,12 @@ static void test_SpeechSynthesizer(void) size = 0xdeadbeef; hr = IVectorView_VoiceInformation_get_Size(voices, &size); - ok(SUCCEEDED(hr), "IVectorView_VoiceInformation_QueryInterface voices failed, hr %#x\n", hr); - ok(size != 0 && size != 0xdeadbeef, "IVectorView_VoiceInformation_get_Size returned %u\n", size); + todo_wine ok(SUCCEEDED(hr), "IVectorView_VoiceInformation_QueryInterface voices failed, hr %#x\n", hr); + todo_wine ok(size != 0 && size != 0xdeadbeef, "IVectorView_VoiceInformation_get_Size returned %u\n", size); rc = IVectorView_VoiceInformation_Release(voices); ok(rc == 0, "IVectorView_VoiceInformation_Release returned unexpected refcount %d\n", rc); -done: rc = IInstalledVoicesStatic_Release(voices_static); ok(rc == 4, "IInstalledVoicesStatic_Release returned unexpected refcount %d\n", rc);
1
0
0
0
Rémi Bernon : windows.media.speech: Implement IInstalledVoicesStatic stub.
by Alexandre Julliard
15 Mar '21
15 Mar '21
Module: wine Branch: master Commit: f4dbded171228a9c57dd745791ddeb791f3ca79e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f4dbded171228a9c57dd7457…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri Mar 12 12:31:10 2021 +0100 windows.media.speech: Implement IInstalledVoicesStatic stub. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windows.media.speech/main.c | 89 +++++++++++++++++++++++++++++++ dlls/windows.media.speech/tests/statics.c | 8 +-- 2 files changed, 93 insertions(+), 4 deletions(-) diff --git a/dlls/windows.media.speech/main.c b/dlls/windows.media.speech/main.c index a6b4fb2ff0a..0d1da641394 100644 --- a/dlls/windows.media.speech/main.c +++ b/dlls/windows.media.speech/main.c @@ -29,7 +29,10 @@ #include "initguid.h" #include "activation.h" +#define WIDL_using_Windows_Foundation +#define WIDL_using_Windows_Foundation_Collections #include "windows.foundation.h" +#define WIDL_using_Windows_Media_SpeechSynthesis #include "windows.media.speechsynthesis.h" WINE_DEFAULT_DEBUG_CHANNEL(speech); @@ -46,6 +49,7 @@ static const char *debugstr_hstring(HSTRING hstr) struct windows_media_speech { IActivationFactory IActivationFactory_iface; + IInstalledVoicesStatic IInstalledVoicesStatic_iface; LONG ref; }; @@ -54,9 +58,16 @@ static inline struct windows_media_speech *impl_from_IActivationFactory(IActivat return CONTAINING_RECORD(iface, struct windows_media_speech, IActivationFactory_iface); } +static inline struct windows_media_speech *impl_from_IInstalledVoicesStatic(IInstalledVoicesStatic *iface) +{ + return CONTAINING_RECORD(iface, struct windows_media_speech, IInstalledVoicesStatic_iface); +} + static HRESULT STDMETHODCALLTYPE windows_media_speech_QueryInterface( IActivationFactory *iface, REFIID iid, void **out) { + struct windows_media_speech *impl = impl_from_IActivationFactory(iface); + TRACE("iface %p, iid %s, out %p stub!\n", iface, debugstr_guid(iid), out); if (IsEqualGUID(iid, &IID_IUnknown) || @@ -69,6 +80,13 @@ static HRESULT STDMETHODCALLTYPE windows_media_speech_QueryInterface( return S_OK; } + if (IsEqualGUID(iid, &IID_IInstalledVoicesStatic)) + { + IUnknown_AddRef(iface); + *out = &impl->IInstalledVoicesStatic_iface; + return S_OK; + } + FIXME("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid)); *out = NULL; return E_NOINTERFACE; @@ -133,9 +151,80 @@ static const struct IActivationFactoryVtbl activation_factory_vtbl = windows_media_speech_ActivateInstance, }; +static HRESULT STDMETHODCALLTYPE installed_voices_static_QueryInterface( + IInstalledVoicesStatic *iface, REFIID iid, void **out) +{ + struct windows_media_speech *impl = impl_from_IInstalledVoicesStatic(iface); + return windows_media_speech_QueryInterface(&impl->IActivationFactory_iface, iid, out); +} + +static ULONG STDMETHODCALLTYPE installed_voices_static_AddRef( + IInstalledVoicesStatic *iface) +{ + struct windows_media_speech *impl = impl_from_IInstalledVoicesStatic(iface); + return windows_media_speech_AddRef(&impl->IActivationFactory_iface); +} + +static ULONG STDMETHODCALLTYPE installed_voices_static_Release( + IInstalledVoicesStatic *iface) +{ + struct windows_media_speech *impl = impl_from_IInstalledVoicesStatic(iface); + return windows_media_speech_Release(&impl->IActivationFactory_iface); +} + +static HRESULT STDMETHODCALLTYPE installed_voices_static_GetIids( + IInstalledVoicesStatic *iface, ULONG *iid_count, IID **iids) +{ + FIXME("iface %p, iid_count %p, iids %p stub!\n", iface, iid_count, iids); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE installed_voices_static_GetRuntimeClassName( + IInstalledVoicesStatic *iface, HSTRING *class_name) +{ + FIXME("iface %p, class_name %p stub!\n", iface, class_name); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE installed_voices_static_GetTrustLevel( + IInstalledVoicesStatic *iface, TrustLevel *trust_level) +{ + FIXME("iface %p, trust_level %p stub!\n", iface, trust_level); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE installed_voices_static_get_AllVoices( + IInstalledVoicesStatic *iface, IVectorView_VoiceInformation **value) +{ + FIXME("iface %p, value %p stub!\n", iface, value); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE installed_voices_static_get_DefaultVoice( + IInstalledVoicesStatic *iface, IVoiceInformation **value) +{ + FIXME("iface %p, value %p stub!\n", iface, value); + return E_NOTIMPL; +} + +static const struct IInstalledVoicesStaticVtbl installed_voices_static_vtbl = +{ + installed_voices_static_QueryInterface, + installed_voices_static_AddRef, + installed_voices_static_Release, + /* IInspectable methods */ + installed_voices_static_GetIids, + installed_voices_static_GetRuntimeClassName, + installed_voices_static_GetTrustLevel, + /* IInstalledVoicesStatic methods */ + installed_voices_static_get_AllVoices, + installed_voices_static_get_DefaultVoice, +}; + static struct windows_media_speech windows_media_speech = { {&activation_factory_vtbl}, + {&installed_voices_static_vtbl}, 1 }; diff --git a/dlls/windows.media.speech/tests/statics.c b/dlls/windows.media.speech/tests/statics.c index 02bb267dc06..470b6d769c6 100644 --- a/dlls/windows.media.speech/tests/statics.c +++ b/dlls/windows.media.speech/tests/statics.c @@ -75,8 +75,7 @@ static void test_SpeechSynthesizer(void) ok(SUCCEEDED(hr), "IActivationFactory_QueryInterface IID_IAgileObject failed, hr %#x\n", hr); hr = IActivationFactory_QueryInterface(factory, &IID_IInstalledVoicesStatic, (void **)&voices_static); - todo_wine ok(SUCCEEDED(hr), "IActivationFactory_QueryInterface IID_IInstalledVoicesStatic failed, hr %#x\n", hr); - if (FAILED(hr)) goto done; + ok(SUCCEEDED(hr), "IActivationFactory_QueryInterface IID_IInstalledVoicesStatic failed, hr %#x\n", hr); hr = IInstalledVoicesStatic_QueryInterface(voices_static, &IID_IInspectable, (void **)&tmp_inspectable); ok(SUCCEEDED(hr), "IInstalledVoicesStatic_QueryInterface IID_IInspectable failed, hr %#x\n", hr); @@ -89,7 +88,8 @@ static void test_SpeechSynthesizer(void) IAgileObject_Release(tmp_agile_object); hr = IInstalledVoicesStatic_get_AllVoices(voices_static, &voices); - ok(SUCCEEDED(hr), "IInstalledVoicesStatic_get_AllVoices failed, hr %#x\n", hr); + todo_wine ok(SUCCEEDED(hr), "IInstalledVoicesStatic_get_AllVoices failed, hr %#x\n", hr); + if (FAILED(hr)) goto done; hr = IVectorView_VoiceInformation_QueryInterface(voices, &IID_IInspectable, (void **)&tmp_inspectable); ok(SUCCEEDED(hr), "IVectorView_VoiceInformation_QueryInterface voices failed, hr %#x\n", hr); @@ -107,10 +107,10 @@ static void test_SpeechSynthesizer(void) rc = IVectorView_VoiceInformation_Release(voices); ok(rc == 0, "IVectorView_VoiceInformation_Release returned unexpected refcount %d\n", rc); +done: rc = IInstalledVoicesStatic_Release(voices_static); ok(rc == 4, "IInstalledVoicesStatic_Release returned unexpected refcount %d\n", rc); -done: rc = IAgileObject_Release(agile_object); ok(rc == 3, "IAgileObject_Release returned unexpected refcount %d\n", rc); rc = IInspectable_Release(inspectable);
1
0
0
0
Rémi Bernon : windows.media.speech/tests: Add interface query tests.
by Alexandre Julliard
15 Mar '21
15 Mar '21
Module: wine Branch: master Commit: f333672a97b38666ebfd18b8ce339dd6e20f4bd5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f333672a97b38666ebfd18b8…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri Mar 12 12:31:09 2021 +0100 windows.media.speech/tests: Add interface query tests. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 1 + configure.ac | 1 + dlls/windows.media.speech/tests/Makefile.in | 5 + dlls/windows.media.speech/tests/statics.c | 176 ++++++++++++++++++++++++++++ 4 files changed, 183 insertions(+) diff --git a/configure b/configure index 4d85a6e9523..15cac0ea020 100755 --- a/configure +++ b/configure @@ -21124,6 +21124,7 @@ wine_fn_config_makefile dlls/win87em.dll16 enable_win16 wine_fn_config_makefile dlls/winaspi.dll16 enable_win16 wine_fn_config_makefile dlls/windebug.dll16 enable_win16 wine_fn_config_makefile dlls/windows.media.speech enable_windows_media_speech +wine_fn_config_makefile dlls/windows.media.speech/tests enable_tests wine_fn_config_makefile dlls/windowscodecs enable_windowscodecs wine_fn_config_makefile dlls/windowscodecs/tests enable_tests wine_fn_config_makefile dlls/windowscodecsext enable_windowscodecsext diff --git a/configure.ac b/configure.ac index 9d8488113a4..8c092fb020c 100644 --- a/configure.ac +++ b/configure.ac @@ -3802,6 +3802,7 @@ WINE_CONFIG_MAKEFILE(dlls/win87em.dll16,enable_win16) WINE_CONFIG_MAKEFILE(dlls/winaspi.dll16,enable_win16) WINE_CONFIG_MAKEFILE(dlls/windebug.dll16,enable_win16) WINE_CONFIG_MAKEFILE(dlls/windows.media.speech) +WINE_CONFIG_MAKEFILE(dlls/windows.media.speech/tests) WINE_CONFIG_MAKEFILE(dlls/windowscodecs) WINE_CONFIG_MAKEFILE(dlls/windowscodecs/tests) WINE_CONFIG_MAKEFILE(dlls/windowscodecsext) diff --git a/dlls/windows.media.speech/tests/Makefile.in b/dlls/windows.media.speech/tests/Makefile.in new file mode 100644 index 00000000000..fad32174647 --- /dev/null +++ b/dlls/windows.media.speech/tests/Makefile.in @@ -0,0 +1,5 @@ +TESTDLL = windows.media.speech.dll +IMPORTS = uuid + +C_SRCS = \ + statics.c diff --git a/dlls/windows.media.speech/tests/statics.c b/dlls/windows.media.speech/tests/statics.c new file mode 100644 index 00000000000..02bb267dc06 --- /dev/null +++ b/dlls/windows.media.speech/tests/statics.c @@ -0,0 +1,176 @@ +/* + * Copyright 2021 Rémi Bernon for CodeWeavers + * + * 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 + */ +#define COBJMACROS +#include <stdarg.h> + +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "winstring.h" + +#include "initguid.h" +#include "roapi.h" + +#define WIDL_using_Windows_Foundation +#define WIDL_using_Windows_Foundation_Collections +#include "windows.foundation.h" +#define WIDL_using_Windows_Media_SpeechSynthesis +#include "windows.media.speechsynthesis.h" + +#include "wine/test.h" + +static HRESULT (WINAPI *pRoActivateInstance)(HSTRING, IInspectable **); +static HRESULT (WINAPI *pRoGetActivationFactory)(HSTRING, REFIID, void **); +static HRESULT (WINAPI *pRoInitialize)(RO_INIT_TYPE); +static void (WINAPI *pRoUninitialize)(void); +static HRESULT (WINAPI *pWindowsCreateString)(LPCWSTR, UINT32, HSTRING *); +static HRESULT (WINAPI *pWindowsDeleteString)(HSTRING); + +static void test_SpeechSynthesizer(void) +{ + static const WCHAR *speech_synthesizer_name = L"Windows.Media.SpeechSynthesis.SpeechSynthesizer"; + + IVectorView_VoiceInformation *voices = NULL; + IInstalledVoicesStatic *voices_static = NULL; + IActivationFactory *factory = NULL; + IInspectable *inspectable = NULL, *tmp_inspectable = NULL; + IAgileObject *agile_object = NULL, *tmp_agile_object = NULL; + HSTRING str; + HRESULT hr; + ULONG rc, size; + + hr = pRoInitialize(RO_INIT_MULTITHREADED); + ok(SUCCEEDED(hr), "RoInitialize failed, hr %#x\n", hr); + + hr = pWindowsCreateString(speech_synthesizer_name, wcslen(speech_synthesizer_name), &str); + ok(SUCCEEDED(hr), "WindowsCreateString failed, hr %#x\n", hr); + + hr = pRoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory); + ok(SUCCEEDED(hr), "RoGetActivationFactory failed, hr %#x\n", hr); + + rc = IActivationFactory_AddRef(factory); + ok(rc == 3, "IActivationFactory_AddRef returned %d\n", rc); + rc = IActivationFactory_Release(factory); + ok(rc == 2, "IActivationFactory_Release returned %d\n", rc); + + hr = IActivationFactory_QueryInterface(factory, &IID_IInspectable, (void **)&inspectable); + ok(SUCCEEDED(hr), "IActivationFactory_QueryInterface IID_IInspectable failed, hr %#x\n", hr); + + hr = IActivationFactory_QueryInterface(factory, &IID_IAgileObject, (void **)&agile_object); + ok(SUCCEEDED(hr), "IActivationFactory_QueryInterface IID_IAgileObject failed, hr %#x\n", hr); + + hr = IActivationFactory_QueryInterface(factory, &IID_IInstalledVoicesStatic, (void **)&voices_static); + todo_wine ok(SUCCEEDED(hr), "IActivationFactory_QueryInterface IID_IInstalledVoicesStatic failed, hr %#x\n", hr); + if (FAILED(hr)) goto done; + + hr = IInstalledVoicesStatic_QueryInterface(voices_static, &IID_IInspectable, (void **)&tmp_inspectable); + ok(SUCCEEDED(hr), "IInstalledVoicesStatic_QueryInterface IID_IInspectable failed, hr %#x\n", hr); + ok(tmp_inspectable == inspectable, "IInstalledVoicesStatic_QueryInterface IID_IInspectable returned %p, expected %p\n", tmp_inspectable, inspectable); + IInspectable_Release(tmp_inspectable); + + hr = IInstalledVoicesStatic_QueryInterface(voices_static, &IID_IAgileObject, (void **)&tmp_agile_object); + ok(SUCCEEDED(hr), "IInstalledVoicesStatic_QueryInterface IID_IAgileObject failed, hr %#x\n", hr); + ok(tmp_agile_object == agile_object, "IInstalledVoicesStatic_QueryInterface IID_IAgileObject returned %p, expected %p\n", tmp_agile_object, agile_object); + IAgileObject_Release(tmp_agile_object); + + hr = IInstalledVoicesStatic_get_AllVoices(voices_static, &voices); + ok(SUCCEEDED(hr), "IInstalledVoicesStatic_get_AllVoices failed, hr %#x\n", hr); + + hr = IVectorView_VoiceInformation_QueryInterface(voices, &IID_IInspectable, (void **)&tmp_inspectable); + ok(SUCCEEDED(hr), "IVectorView_VoiceInformation_QueryInterface voices failed, hr %#x\n", hr); + ok(tmp_inspectable != inspectable, "IVectorView_VoiceInformation_QueryInterface voices returned %p, expected %p\n", tmp_inspectable, inspectable); + IInspectable_Release(tmp_inspectable); + + hr = IVectorView_VoiceInformation_QueryInterface(voices, &IID_IAgileObject, (void **)&tmp_agile_object); + ok(FAILED(hr), "IVectorView_VoiceInformation_QueryInterface voices failed, hr %#x\n", hr); + + size = 0xdeadbeef; + hr = IVectorView_VoiceInformation_get_Size(voices, &size); + ok(SUCCEEDED(hr), "IVectorView_VoiceInformation_QueryInterface voices failed, hr %#x\n", hr); + ok(size != 0 && size != 0xdeadbeef, "IVectorView_VoiceInformation_get_Size returned %u\n", size); + + rc = IVectorView_VoiceInformation_Release(voices); + ok(rc == 0, "IVectorView_VoiceInformation_Release returned unexpected refcount %d\n", rc); + + rc = IInstalledVoicesStatic_Release(voices_static); + ok(rc == 4, "IInstalledVoicesStatic_Release returned unexpected refcount %d\n", rc); + +done: + rc = IAgileObject_Release(agile_object); + ok(rc == 3, "IAgileObject_Release returned unexpected refcount %d\n", rc); + rc = IInspectable_Release(inspectable); + ok(rc == 2, "IInspectable_Release returned unexpected refcount %d\n", rc); + rc = IActivationFactory_Release(factory); + ok(rc == 1, "IActivationFactory_Release returned unexpected refcount %d\n", rc); + + pWindowsDeleteString(str); + + pRoUninitialize(); +} + +static void test_VoiceInformation(void) +{ + static const WCHAR *voice_information_name = L"Windows.Media.SpeechSynthesis.VoiceInformation"; + + IActivationFactory *factory = NULL; + HSTRING str; + HRESULT hr; + + hr = pRoInitialize(RO_INIT_MULTITHREADED); + ok(SUCCEEDED(hr), "RoInitialize failed, hr %#x\n", hr); + + hr = pWindowsCreateString(voice_information_name, wcslen(voice_information_name), &str); + ok(SUCCEEDED(hr), "WindowsCreateString failed, hr %#x\n", hr); + + hr = pRoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory); + todo_wine ok(hr == REGDB_E_CLASSNOTREG, "RoGetActivationFactory returned unexpected hr %#x\n", hr); + if (SUCCEEDED(hr)) IActivationFactory_Release(factory); + + pWindowsDeleteString(str); + + pRoUninitialize(); +} + +START_TEST(statics) +{ + HMODULE combase; + + if (!(combase = LoadLibraryW(L"combase.dll"))) + { + win_skip("Failed to load combase.dll, skipping tests\n"); + return; + } + +#define LOAD_FUNCPTR(x) \ + if (!(p##x = (void*)GetProcAddress(combase, #x))) \ + { \ + win_skip("Failed to find %s in combase.dll, skipping tests.\n", #x); \ + return; \ + } + + LOAD_FUNCPTR(RoActivateInstance); + LOAD_FUNCPTR(RoGetActivationFactory); + LOAD_FUNCPTR(RoInitialize); + LOAD_FUNCPTR(RoUninitialize); + LOAD_FUNCPTR(WindowsCreateString); + LOAD_FUNCPTR(WindowsDeleteString); +#undef LOAD_FUNCPTR + + test_SpeechSynthesizer(); + test_VoiceInformation(); +}
1
0
0
0
Rémi Bernon : windows.media.speech: Add stub dll.
by Alexandre Julliard
15 Mar '21
15 Mar '21
Module: wine Branch: master Commit: 3c502f40c483f81e19b503efce3ef8da63421737 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3c502f40c483f81e19b503ef…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri Mar 12 12:31:08 2021 +0100 windows.media.speech: Add stub dll. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 2 + configure.ac | 1 + dlls/combase/tests/roapi.c | 4 +- dlls/windows.media.speech/Makefile.in | 9 ++ dlls/windows.media.speech/classes.idl | 19 +++ dlls/windows.media.speech/main.c | 159 +++++++++++++++++++++ .../windows.media.speech/windows.media.speech.spec | 3 + 7 files changed, 195 insertions(+), 2 deletions(-) diff --git a/configure b/configure index a2277f9720d..4d85a6e9523 100755 --- a/configure +++ b/configure @@ -1659,6 +1659,7 @@ enable_wevtapi enable_wevtsvc enable_wiaservc enable_wimgapi +enable_windows_media_speech enable_windowscodecs enable_windowscodecsext enable_winealsa_drv @@ -21122,6 +21123,7 @@ wine_fn_config_makefile dlls/win32s16.dll16 enable_win16 wine_fn_config_makefile dlls/win87em.dll16 enable_win16 wine_fn_config_makefile dlls/winaspi.dll16 enable_win16 wine_fn_config_makefile dlls/windebug.dll16 enable_win16 +wine_fn_config_makefile dlls/windows.media.speech enable_windows_media_speech wine_fn_config_makefile dlls/windowscodecs enable_windowscodecs wine_fn_config_makefile dlls/windowscodecs/tests enable_tests wine_fn_config_makefile dlls/windowscodecsext enable_windowscodecsext diff --git a/configure.ac b/configure.ac index 1ca832102d8..9d8488113a4 100644 --- a/configure.ac +++ b/configure.ac @@ -3801,6 +3801,7 @@ WINE_CONFIG_MAKEFILE(dlls/win32s16.dll16,enable_win16) WINE_CONFIG_MAKEFILE(dlls/win87em.dll16,enable_win16) WINE_CONFIG_MAKEFILE(dlls/winaspi.dll16,enable_win16) WINE_CONFIG_MAKEFILE(dlls/windebug.dll16,enable_win16) +WINE_CONFIG_MAKEFILE(dlls/windows.media.speech) WINE_CONFIG_MAKEFILE(dlls/windowscodecs) WINE_CONFIG_MAKEFILE(dlls/windowscodecs/tests) WINE_CONFIG_MAKEFILE(dlls/windowscodecsext) diff --git a/dlls/combase/tests/roapi.c b/dlls/combase/tests/roapi.c index 6180ad24d68..b9cb476aafe 100644 --- a/dlls/combase/tests/roapi.c +++ b/dlls/combase/tests/roapi.c @@ -82,7 +82,7 @@ static void test_ActivationFactories(void) ok(hr == S_OK, "got %08x\n", hr); hr = pRoGetActivationFactory(str2, &IID_IActivationFactory, (void **)&factory); - todo_wine ok(hr == REGDB_E_CLASSNOTREG, "got %08x\n", hr); + ok(hr == REGDB_E_CLASSNOTREG, "got %08x\n", hr); hr = pRoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory); todo_wine ok(hr == S_OK, "got %08x\n", hr); @@ -90,7 +90,7 @@ static void test_ActivationFactories(void) IActivationFactory_Release(factory); hr = pRoActivateInstance(str2, &inspect); - todo_wine ok(hr == REGDB_E_CLASSNOTREG, "got %08x\n", hr); + ok(hr == REGDB_E_CLASSNOTREG, "got %08x\n", hr); hr = pRoActivateInstance(str, &inspect); todo_wine ok(hr == S_OK, "got %08x\n", hr); diff --git a/dlls/windows.media.speech/Makefile.in b/dlls/windows.media.speech/Makefile.in new file mode 100644 index 00000000000..2c55daa04be --- /dev/null +++ b/dlls/windows.media.speech/Makefile.in @@ -0,0 +1,9 @@ +MODULE = windows.media.speech.dll +IMPORTS = combase uuid + +EXTRADLLFLAGS = -mno-cygwin + +C_SRCS = \ + main.c + +IDL_SRCS = classes.idl diff --git a/dlls/windows.media.speech/classes.idl b/dlls/windows.media.speech/classes.idl new file mode 100644 index 00000000000..6c141bf4768 --- /dev/null +++ b/dlls/windows.media.speech/classes.idl @@ -0,0 +1,19 @@ +/* + * 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 + */ + +#pragma makedep register + +#include "windows.media.speechsynthesis.idl" diff --git a/dlls/windows.media.speech/main.c b/dlls/windows.media.speech/main.c new file mode 100644 index 00000000000..a6b4fb2ff0a --- /dev/null +++ b/dlls/windows.media.speech/main.c @@ -0,0 +1,159 @@ +/* WinRT Windows.Media.Speech implementation + * + * Copyright 2021 Rémi Bernon for CodeWeavers + * + * 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 + */ + +#include <stdarg.h> + +#define COBJMACROS +#include "windef.h" +#include "winbase.h" +#include "winstring.h" +#include "wine/debug.h" +#include "objbase.h" + +#include "initguid.h" +#include "activation.h" + +#include "windows.foundation.h" +#include "windows.media.speechsynthesis.h" + +WINE_DEFAULT_DEBUG_CHANNEL(speech); + +static const char *debugstr_hstring(HSTRING hstr) +{ + const WCHAR *str; + UINT32 len; + if (hstr && !((ULONG_PTR)hstr >> 16)) return "(invalid)"; + str = WindowsGetStringRawBuffer(hstr, &len); + return wine_dbgstr_wn(str, len); +} + +struct windows_media_speech +{ + IActivationFactory IActivationFactory_iface; + LONG ref; +}; + +static inline struct windows_media_speech *impl_from_IActivationFactory(IActivationFactory *iface) +{ + return CONTAINING_RECORD(iface, struct windows_media_speech, IActivationFactory_iface); +} + +static HRESULT STDMETHODCALLTYPE windows_media_speech_QueryInterface( + IActivationFactory *iface, REFIID iid, void **out) +{ + TRACE("iface %p, iid %s, out %p stub!\n", iface, debugstr_guid(iid), out); + + if (IsEqualGUID(iid, &IID_IUnknown) || + IsEqualGUID(iid, &IID_IInspectable) || + IsEqualGUID(iid, &IID_IAgileObject) || + IsEqualGUID(iid, &IID_IActivationFactory)) + { + IUnknown_AddRef(iface); + *out = iface; + return S_OK; + } + + FIXME("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid)); + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG STDMETHODCALLTYPE windows_media_speech_AddRef( + IActivationFactory *iface) +{ + struct windows_media_speech *impl = impl_from_IActivationFactory(iface); + ULONG ref = InterlockedIncrement(&impl->ref); + TRACE("iface %p, ref %u.\n", iface, ref); + return ref; +} + +static ULONG STDMETHODCALLTYPE windows_media_speech_Release( + IActivationFactory *iface) +{ + struct windows_media_speech *impl = impl_from_IActivationFactory(iface); + ULONG ref = InterlockedDecrement(&impl->ref); + TRACE("iface %p, ref %u.\n", iface, ref); + return ref; +} + +static HRESULT STDMETHODCALLTYPE windows_media_speech_GetIids( + IActivationFactory *iface, ULONG *iid_count, IID **iids) +{ + FIXME("iface %p, iid_count %p, iids %p stub!\n", iface, iid_count, iids); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE windows_media_speech_GetRuntimeClassName( + IActivationFactory *iface, HSTRING *class_name) +{ + FIXME("iface %p, class_name %p stub!\n", iface, class_name); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE windows_media_speech_GetTrustLevel( + IActivationFactory *iface, TrustLevel *trust_level) +{ + FIXME("iface %p, trust_level %p stub!\n", iface, trust_level); + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE windows_media_speech_ActivateInstance( + IActivationFactory *iface, IInspectable **instance) +{ + FIXME("iface %p, instance %p stub!\n", iface, instance); + return E_NOTIMPL; +} + +static const struct IActivationFactoryVtbl activation_factory_vtbl = +{ + windows_media_speech_QueryInterface, + windows_media_speech_AddRef, + windows_media_speech_Release, + /* IInspectable methods */ + windows_media_speech_GetIids, + windows_media_speech_GetRuntimeClassName, + windows_media_speech_GetTrustLevel, + /* IActivationFactory methods */ + windows_media_speech_ActivateInstance, +}; + +static struct windows_media_speech windows_media_speech = +{ + {&activation_factory_vtbl}, + 1 +}; + +HRESULT WINAPI DllCanUnloadNow(void) +{ + return S_FALSE; +} + +HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID riid, void **out) +{ + FIXME("clsid %s, riid %s, out %p stub!\n", debugstr_guid(clsid), debugstr_guid(riid), out); + return CLASS_E_CLASSNOTAVAILABLE; +} + +HRESULT WINAPI DllGetActivationFactory(HSTRING classid, IActivationFactory **factory) +{ + TRACE("classid %s, factory %p.\n", debugstr_hstring(classid), factory); + *factory = &windows_media_speech.IActivationFactory_iface; + IUnknown_AddRef(*factory); + return S_OK; +} diff --git a/dlls/windows.media.speech/windows.media.speech.spec b/dlls/windows.media.speech/windows.media.speech.spec new file mode 100644 index 00000000000..721493229c2 --- /dev/null +++ b/dlls/windows.media.speech/windows.media.speech.spec @@ -0,0 +1,3 @@ +1 stdcall -private DllCanUnloadNow() +2 stdcall -private DllGetActivationFactory(ptr ptr) +3 stdcall -private DllGetClassObject(ptr ptr ptr)
1
0
0
0
Jacek Caban : jscript: Raise the stack depth limit.
by Alexandre Julliard
15 Mar '21
15 Mar '21
Module: wine Branch: master Commit: e7d265f4b93fe424d6e3c52003fbcb3ebd301f74 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e7d265f4b93fe424d6e3c520…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Mar 15 18:19:33 2021 +0100 jscript: Raise the stack depth limit. Previous limit was roughly similar to IE8. Later IE versions allow much larger stacks. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/engine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index b6930a25b65..18dc4c3f139 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -54,7 +54,7 @@ typedef struct { } u; } exprval_t; -static const size_t stack_size = 0x4000; +static const size_t stack_size = 0x40000; static HRESULT stack_push(script_ctx_t *ctx, jsval_t v) {
1
0
0
0
Jacek Caban : jscript: Add String.prototype.toLocaleUpperCase and toLocaleLowerCase implementation.
by Alexandre Julliard
15 Mar '21
15 Mar '21
Module: wine Branch: master Commit: 07cebfc9289d924bc3646d679b5d0628c7bf204e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=07cebfc9289d924bc3646d67…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Mar 15 18:19:26 2021 +0100 jscript: Add String.prototype.toLocaleUpperCase and toLocaleLowerCase implementation. They are supposed to be locale-specific, but my testing shows that it's not the case in native. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/jscript/string.c | 36 +++++++++++++++++++++++------------- dlls/jscript/tests/api.js | 8 ++++++++ 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/dlls/jscript/string.c b/dlls/jscript/string.c index a8bd77dc398..4f6d8cd194d 100644 --- a/dlls/jscript/string.c +++ b/dlls/jscript/string.c @@ -1363,13 +1363,11 @@ static HRESULT String_sup(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsign return do_attributeless_tag_format(ctx, jsthis, r, L"SUP"); } -static HRESULT String_toLowerCase(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, - jsval_t *r) +static HRESULT to_upper_case(script_ctx_t *ctx, vdisp_t *jsthis, jsval_t *r) { jsstr_t *str; - HRESULT hres; + HRESULT hres; - TRACE("\n"); hres = get_string_val(ctx, jsthis, &str); if(FAILED(hres)) @@ -1387,7 +1385,7 @@ static HRESULT String_toLowerCase(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags } jsstr_flush(str, buf); - for (; len--; buf++) *buf = towlower(*buf); + for (; len--; buf++) *buf = towupper(*buf); *r = jsval_string(ret); } @@ -1395,13 +1393,11 @@ static HRESULT String_toLowerCase(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags return S_OK; } -static HRESULT String_toUpperCase(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, - jsval_t *r) +static HRESULT to_lower_case(script_ctx_t *ctx, vdisp_t *jsthis, jsval_t *r) { jsstr_t *str; HRESULT hres; - TRACE("\n"); hres = get_string_val(ctx, jsthis, &str); if(FAILED(hres)) @@ -1419,7 +1415,7 @@ static HRESULT String_toUpperCase(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags } jsstr_flush(str, buf); - for (; len--; buf++) *buf = towupper(*buf); + for (; len--; buf++) *buf = towlower(*buf); *r = jsval_string(ret); } @@ -1427,18 +1423,32 @@ static HRESULT String_toUpperCase(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags return S_OK; } +static HRESULT String_toLowerCase(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, + jsval_t *r) +{ + TRACE("\n"); + return to_lower_case(ctx, jsthis, r); +} + +static HRESULT String_toUpperCase(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, + jsval_t *r) +{ + TRACE("\n"); + return to_upper_case(ctx, jsthis, r); +} + static HRESULT String_toLocaleLowerCase(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r) { - FIXME("\n"); - return E_NOTIMPL; + TRACE("\n"); + return to_lower_case(ctx, jsthis, r); } static HRESULT String_toLocaleUpperCase(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r) { - FIXME("\n"); - return E_NOTIMPL; + TRACE("\n"); + return to_upper_case(ctx, jsthis, r); } static HRESULT String_trim(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index da0ad1e1ebc..564dfc16f30 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -753,10 +753,14 @@ tmp = "test".toLowerCase(3); ok(tmp === "test", "''.toLowerCase(3) = " + tmp); tmp = "tEsT".toLowerCase(); ok(tmp === "test", "''.toLowerCase() = " + tmp); +tmp = "tEsT".toLocaleLowerCase(); +ok(tmp === "test", "''.toLocaleLowerCase() = " + tmp); tmp = "tEsT".toLowerCase(3); ok(tmp === "test", "''.toLowerCase(3) = " + tmp); tmp = ("tE" + String.fromCharCode(0) + "sT").toLowerCase(); ok(tmp === "te" + String.fromCharCode(0) + "st", "''.toLowerCase() = " + tmp); +ok(String.prototype.toLocaleLowerCase != String.prototype.toLowerCase, + "String.prototype.toLocaleLowerCase == String.prototype.toLowerCase"); tmp = "".toUpperCase(); ok(tmp === "", "''.toUpperCase() = " + tmp); @@ -768,8 +772,12 @@ tmp = "tEsT".toUpperCase(); ok(tmp === "TEST", "''.toUpperCase() = " + tmp); tmp = "tEsT".toUpperCase(3); ok(tmp === "TEST", "''.toUpperCase(3) = " + tmp); +tmp = "tEsT".toLocaleUpperCase(3); +ok(tmp === "TEST", "''.toLocaleUpperCase(3) = " + tmp); tmp = ("tE" + String.fromCharCode(0) + "sT").toUpperCase(); ok(tmp === "TE" + String.fromCharCode(0) + "ST", "''.toUpperCase() = " + tmp); +ok(String.prototype.toLocaleUpperCase != String.prototype.toUpperCase, + "String.prototype.toLocaleUpperCase == String.prototype.toUpperCase"); tmp = "".anchor(); ok(tmp === "<A NAME=\"undefined\"></A>", "''.anchor() = " + tmp);
1
0
0
0
← Newer
1
...
63
64
65
66
67
68
69
...
117
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
Results per page:
10
25
50
100
200