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
July
June
May
April
March
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 2020
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 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
1 participants
826 discussions
Start a n
N
ew thread
Serge Gautherie : msvcrt: Fix ldiv() return type.
by Alexandre Julliard
06 Jul '20
06 Jul '20
Module: wine Branch: master Commit: 6e2a54ec76d225d76506fe909a9c300702636d5b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6e2a54ec76d225d76506fe90…
Author: Serge Gautherie <winehq-git_serge_180711(a)gautherie.fr> Date: Thu Jul 2 22:47:39 2020 +0200 msvcrt: Fix ldiv() return type. Signed-off-by: Serge Gautherie <winehq-git_serge_180711(a)gautherie.fr> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/api-ms-win-crt-utility-l1-1-0/api-ms-win-crt-utility-l1-1-0.spec | 2 +- dlls/crtdll/crtdll.spec | 2 +- dlls/msvcr100/msvcr100.spec | 2 +- dlls/msvcr110/msvcr110.spec | 2 +- dlls/msvcr120/msvcr120.spec | 2 +- dlls/msvcr120_app/msvcr120_app.spec | 2 +- dlls/msvcr70/msvcr70.spec | 2 +- dlls/msvcr71/msvcr71.spec | 2 +- dlls/msvcr80/msvcr80.spec | 2 +- dlls/msvcr90/msvcr90.spec | 2 +- dlls/msvcrt/msvcrt.spec | 2 +- dlls/msvcrt20/msvcrt20.spec | 2 +- dlls/msvcrt40/msvcrt40.spec | 2 +- dlls/msvcrtd/msvcrtd.spec | 2 +- dlls/ucrtbase/ucrtbase.spec | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/dlls/api-ms-win-crt-utility-l1-1-0/api-ms-win-crt-utility-l1-1-0.spec b/dlls/api-ms-win-crt-utility-l1-1-0/api-ms-win-crt-utility-l1-1-0.spec index fe3d04de54..b34147be5f 100644 --- a/dlls/api-ms-win-crt-utility-l1-1-0/api-ms-win-crt-utility-l1-1-0.spec +++ b/dlls/api-ms-win-crt-utility-l1-1-0/api-ms-win-crt-utility-l1-1-0.spec @@ -20,7 +20,7 @@ @ stub imaxabs @ stub imaxdiv @ cdecl labs(long) ucrtbase.labs -@ cdecl ldiv(long long) ucrtbase.ldiv +@ cdecl -ret64 ldiv(long long) ucrtbase.ldiv @ cdecl -ret64 llabs(int64) ucrtbase.llabs @ cdecl lldiv(int64 int64) ucrtbase.lldiv @ cdecl qsort(ptr long long ptr) ucrtbase.qsort diff --git a/dlls/crtdll/crtdll.spec b/dlls/crtdll/crtdll.spec index 9c88c2ac5a..3acd20e1f6 100644 --- a/dlls/crtdll/crtdll.spec +++ b/dlls/crtdll/crtdll.spec @@ -422,7 +422,7 @@ @ cdecl isxdigit(long) MSVCRT_isxdigit @ cdecl labs(long) MSVCRT_labs @ cdecl ldexp(double long) MSVCRT_ldexp -@ cdecl ldiv(long long) MSVCRT_ldiv +@ cdecl -ret64 ldiv(long long) MSVCRT_ldiv @ cdecl localeconv() MSVCRT_localeconv @ cdecl localtime(ptr) MSVCRT_localtime @ cdecl log(double) MSVCRT_log diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index a7c77eff32..534889b195 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -1731,7 +1731,7 @@ @ cdecl isxdigit(long) MSVCRT_isxdigit @ cdecl labs(long) MSVCRT_labs @ cdecl ldexp(double long) MSVCRT_ldexp -@ cdecl ldiv(long long) MSVCRT_ldiv +@ cdecl -ret64 ldiv(long long) MSVCRT_ldiv @ cdecl -ret64 llabs(int64) MSVCRT_llabs @ cdecl lldiv(int64 int64) MSVCRT_lldiv @ cdecl localeconv() MSVCRT_localeconv diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index 54ef82b0e6..820fb973f7 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -2089,7 +2089,7 @@ @ cdecl isxdigit(long) MSVCRT_isxdigit @ cdecl labs(long) MSVCRT_labs @ cdecl ldexp(double long) MSVCRT_ldexp -@ cdecl ldiv(long long) MSVCRT_ldiv +@ cdecl -ret64 ldiv(long long) MSVCRT_ldiv @ cdecl -ret64 llabs(int64) MSVCRT_llabs @ cdecl lldiv(int64 int64) MSVCRT_lldiv @ cdecl localeconv() MSVCRT_localeconv diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index a55a845618..1d9662a5c2 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -2242,7 +2242,7 @@ @ cdecl isxdigit(long) MSVCRT_isxdigit @ cdecl labs(long) MSVCRT_labs @ cdecl ldexp(double long) MSVCRT_ldexp -@ cdecl ldiv(long long) MSVCRT_ldiv +@ cdecl -ret64 ldiv(long long) MSVCRT_ldiv @ cdecl lgamma(double) MSVCR120_lgamma @ cdecl lgammaf(float) MSVCR120_lgammaf @ cdecl lgammal(double) MSVCR120_lgammal diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index 63a4ccfacf..af3d1b5231 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -1905,7 +1905,7 @@ @ cdecl isxdigit(long) msvcr120.isxdigit @ cdecl labs(long) msvcr120.labs @ cdecl ldexp(double long) msvcr120.ldexp -@ cdecl ldiv(long long) msvcr120.ldiv +@ cdecl -ret64 ldiv(long long) msvcr120.ldiv @ cdecl lgamma(double) msvcr120.lgamma @ cdecl lgammaf(float) msvcr120.lgammaf @ cdecl lgammal(double) msvcr120.lgammal diff --git a/dlls/msvcr70/msvcr70.spec b/dlls/msvcr70/msvcr70.spec index 79f0d6527b..2649034abd 100644 --- a/dlls/msvcr70/msvcr70.spec +++ b/dlls/msvcr70/msvcr70.spec @@ -766,7 +766,7 @@ @ cdecl isxdigit(long) MSVCRT_isxdigit @ cdecl labs(long) MSVCRT_labs @ cdecl ldexp(double long) MSVCRT_ldexp -@ cdecl ldiv(long long) MSVCRT_ldiv +@ cdecl -ret64 ldiv(long long) MSVCRT_ldiv @ cdecl localeconv() MSVCRT_localeconv @ cdecl localtime(ptr) MSVCRT_localtime @ cdecl log(double) MSVCRT_log diff --git a/dlls/msvcr71/msvcr71.spec b/dlls/msvcr71/msvcr71.spec index 317fc0d3af..9d3e2b2ebe 100644 --- a/dlls/msvcr71/msvcr71.spec +++ b/dlls/msvcr71/msvcr71.spec @@ -762,7 +762,7 @@ @ cdecl isxdigit(long) MSVCRT_isxdigit @ cdecl labs(long) MSVCRT_labs @ cdecl ldexp(double long) MSVCRT_ldexp -@ cdecl ldiv(long long) MSVCRT_ldiv +@ cdecl -ret64 ldiv(long long) MSVCRT_ldiv @ cdecl localeconv() MSVCRT_localeconv @ cdecl localtime(ptr) MSVCRT_localtime @ cdecl log(double) MSVCRT_log diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index 49df8c8986..0d805c87b1 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -1413,7 +1413,7 @@ @ cdecl isxdigit(long) MSVCRT_isxdigit @ cdecl labs(long) MSVCRT_labs @ cdecl ldexp(double long) MSVCRT_ldexp -@ cdecl ldiv(long long) MSVCRT_ldiv +@ cdecl -ret64 ldiv(long long) MSVCRT_ldiv @ cdecl localeconv() MSVCRT_localeconv @ cdecl log(double) MSVCRT_log @ cdecl -arch=!i386 logf(float) MSVCRT_logf diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index ce0897c9a4..460ae6cf89 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -1386,7 +1386,7 @@ @ cdecl isxdigit(long) MSVCRT_isxdigit @ cdecl labs(long) MSVCRT_labs @ cdecl ldexp(double long) MSVCRT_ldexp -@ cdecl ldiv(long long) MSVCRT_ldiv +@ cdecl -ret64 ldiv(long long) MSVCRT_ldiv @ cdecl localeconv() MSVCRT_localeconv @ cdecl log(double) MSVCRT_log @ cdecl log10(double) MSVCRT_log10 diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index bf096f2cfa..cc2f257d6a 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -1352,7 +1352,7 @@ @ cdecl isxdigit(long) MSVCRT_isxdigit @ cdecl labs(long) MSVCRT_labs @ cdecl ldexp(double long) MSVCRT_ldexp -@ cdecl ldiv(long long) MSVCRT_ldiv +@ cdecl -ret64 ldiv(long long) MSVCRT_ldiv @ cdecl localeconv() MSVCRT_localeconv @ cdecl localtime(ptr) MSVCRT_localtime @ cdecl log(double) MSVCRT_log diff --git a/dlls/msvcrt20/msvcrt20.spec b/dlls/msvcrt20/msvcrt20.spec index 5384c0dea8..69c6775eac 100644 --- a/dlls/msvcrt20/msvcrt20.spec +++ b/dlls/msvcrt20/msvcrt20.spec @@ -1354,7 +1354,7 @@ @ cdecl isxdigit(long) msvcrt.isxdigit @ cdecl labs(long) msvcrt.labs @ cdecl ldexp(double long) msvcrt.ldexp -@ cdecl ldiv(long long) msvcrt.ldiv +@ cdecl -ret64 ldiv(long long) msvcrt.ldiv @ cdecl localeconv() msvcrt.localeconv @ cdecl localtime(ptr) msvcrt.localtime @ cdecl log(double) msvcrt.log diff --git a/dlls/msvcrt40/msvcrt40.spec b/dlls/msvcrt40/msvcrt40.spec index c2cee6cfde..f1e73bc4ba 100644 --- a/dlls/msvcrt40/msvcrt40.spec +++ b/dlls/msvcrt40/msvcrt40.spec @@ -1422,7 +1422,7 @@ @ cdecl isxdigit(long) msvcrt.isxdigit @ cdecl labs(long) msvcrt.labs @ cdecl ldexp(double long) msvcrt.ldexp -@ cdecl ldiv(long long) msvcrt.ldiv +@ cdecl -ret64 ldiv(long long) msvcrt.ldiv @ cdecl localeconv() msvcrt.localeconv @ cdecl localtime(ptr) msvcrt.localtime @ cdecl log(double) msvcrt.log diff --git a/dlls/msvcrtd/msvcrtd.spec b/dlls/msvcrtd/msvcrtd.spec index b502ed78d1..45f5888922 100644 --- a/dlls/msvcrtd/msvcrtd.spec +++ b/dlls/msvcrtd/msvcrtd.spec @@ -718,7 +718,7 @@ @ cdecl isxdigit(long) MSVCRT_isxdigit @ cdecl labs(long) MSVCRT_labs @ cdecl ldexp(double long) MSVCRT_ldexp -@ cdecl ldiv(long long) MSVCRT_ldiv +@ cdecl -ret64 ldiv(long long) MSVCRT_ldiv @ cdecl localeconv() MSVCRT_localeconv @ cdecl localtime(ptr) MSVCRT_localtime @ cdecl log(double) MSVCRT_log diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index a968cdaaa1..6a919a823f 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -2376,7 +2376,7 @@ @ cdecl isxdigit(long) MSVCRT_isxdigit @ cdecl labs(long) MSVCRT_labs @ cdecl ldexp(double long) MSVCRT_ldexp -@ cdecl ldiv(long long) MSVCRT_ldiv +@ cdecl -ret64 ldiv(long long) MSVCRT_ldiv @ cdecl lgamma(double) MSVCR120_lgamma @ cdecl lgammaf(float) MSVCR120_lgammaf @ cdecl lgammal(double) MSVCR120_lgammal
1
0
0
0
Thomas Crider : ntdll: Add missing LC_NUMERIC locale setting to init_locale.
by Alexandre Julliard
06 Jul '20
06 Jul '20
Module: wine Branch: master Commit: 031c744a1fb9b94f7a4634eae5f56845b586554d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=031c744a1fb9b94f7a4634ea…
Author: Thomas Crider <gloriouseggroll(a)gmail.com> Date: Sun Jul 5 11:16:06 2020 -0600 ntdll: Add missing LC_NUMERIC locale setting to init_locale. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=49489
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=49417
Signed-off-by: Thomas Crider <gloriouseggroll(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/env.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/ntdll/unix/env.c b/dlls/ntdll/unix/env.c index eb75e6e949..c9764e5c6e 100644 --- a/dlls/ntdll/unix/env.c +++ b/dlls/ntdll/unix/env.c @@ -943,6 +943,7 @@ static void init_locale(void) if (preferred_langs) CFRelease( preferred_langs ); } #endif + setlocale( LC_NUMERIC, "C" ); /* FIXME: oleaut32 depends on this */ }
1
0
0
0
Gijs Vermeulen : amstream/tests: Add IAMMediaStream::JoinFilter() tests.
by Alexandre Julliard
06 Jul '20
06 Jul '20
Module: wine Branch: master Commit: 6bfd79be6def16935a9a8e88c5ec3175512ed536 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6bfd79be6def16935a9a8e88…
Author: Gijs Vermeulen <gijsvrm(a)gmail.com> Date: Mon Jul 6 17:42:48 2020 +0200 amstream/tests: Add IAMMediaStream::JoinFilter() tests. Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/amstream/tests/amstream.c | 62 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c index 7ebd54f6da..608bb2267f 100644 --- a/dlls/amstream/tests/amstream.c +++ b/dlls/amstream/tests/amstream.c @@ -4262,6 +4262,67 @@ static void test_ammediastream_join_am_multi_media_stream(void) check_ammediastream_join_am_multi_media_stream(&CLSID_AMDirectDrawStream); } +static void check_ammediastream_join_filter(const CLSID *clsid) +{ + IAMMultiMediaStream *mmstream = create_ammultimediastream(); + IMediaStreamFilter *filter, *filter2, *filter3; + IAMMediaStream *stream; + HRESULT hr; + ULONG ref; + + hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(!!filter, "Expected non-null filter.\n"); + EXPECT_REF(filter, 3); + + hr = CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IAMMediaStream, (void **)&stream); + ok(hr == S_OK, "Got hr %#x.\n", hr); + EXPECT_REF(filter, 3); + + hr = CoCreateInstance(&CLSID_MediaStreamFilter, NULL, CLSCTX_INPROC_SERVER, + &IID_IMediaStreamFilter, (void **)&filter2); + ok(hr == S_OK, "Got hr %#x.\n", hr); + EXPECT_REF(filter, 3); + EXPECT_REF(filter2, 1); + + hr = IAMMediaStream_JoinFilter(stream, filter2); + ok(hr == S_OK, "Got hr %#x.\n", hr); + EXPECT_REF(filter, 3); + EXPECT_REF(filter2, 1); + + /* Crashes on native. */ + if (0) + { + hr = IAMMediaStream_JoinFilter(stream, NULL); + ok(hr == S_OK, "Got hr %#x.\n", hr); + } + + hr = IAMMultiMediaStream_GetFilter(mmstream, &filter3); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(filter3 == filter, "Expected filter %p, got %p.\n", filter, filter3); + EXPECT_REF(filter, 4); + + IMediaStreamFilter_Release(filter3); + EXPECT_REF(filter, 3); + + ref = IMediaStreamFilter_Release(filter2); + ok(!ref, "Got outstanding refcount %d.\n", ref); + ref = IAMMediaStream_Release(stream); + ok(!ref, "Got outstanding refcount %d.\n", ref); + EXPECT_REF(filter, 3); + ref = IAMMultiMediaStream_Release(mmstream); + ok(!ref, "Got outstanding refcount %d.\n", ref); + EXPECT_REF(filter, 1); + ref = IMediaStreamFilter_Release(filter); + ok(!ref, "Got outstanding refcount %d.\n", ref); +} + +static void test_ammediastream_join_filter(void) +{ + check_ammediastream_join_filter(&CLSID_AMAudioStream); + check_ammediastream_join_filter(&CLSID_AMDirectDrawStream); +} + void test_mediastreamfilter_get_state(void) { IAMMultiMediaStream *mmstream = create_ammultimediastream(); @@ -4956,6 +5017,7 @@ START_TEST(amstream) test_ddrawstream_getsetdirectdraw(); test_ammediastream_join_am_multi_media_stream(); + test_ammediastream_join_filter(); test_mediastreamfilter_get_state(); test_mediastreamfilter_stop_pause_run();
1
0
0
0
Gijs Vermeulen : amstream: Increment/decrement IMediaStreamFilter refcount twice in multimedia_stream_create/release().
by Alexandre Julliard
06 Jul '20
06 Jul '20
Module: wine Branch: master Commit: f446bb21f29fee1aabc7e4d6fe62b55dbd359741 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f446bb21f29fee1aabc7e4d6…
Author: Gijs Vermeulen <gijsvrm(a)gmail.com> Date: Mon Jul 6 17:42:47 2020 +0200 amstream: Increment/decrement IMediaStreamFilter refcount twice in multimedia_stream_create/release(). Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/amstream/multimedia.c | 4 ++++ dlls/amstream/tests/amstream.c | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dlls/amstream/multimedia.c b/dlls/amstream/multimedia.c index e058e639dd..f615e436b1 100644 --- a/dlls/amstream/multimedia.c +++ b/dlls/amstream/multimedia.c @@ -92,6 +92,7 @@ static ULONG WINAPI multimedia_stream_Release(IAMMultiMediaStream *iface) if (This->ipin) IPin_Release(This->ipin); IMediaStreamFilter_Release(This->filter); + IMediaStreamFilter_Release(This->filter); if (This->media_seeking) IMediaSeeking_Release(This->media_seeking); if (This->media_control) @@ -518,6 +519,9 @@ HRESULT multimedia_stream_create(IUnknown *outer, void **out) return hr; } + /* The stream takes an additional reference to the filter. */ + IMediaStreamFilter_AddRef(object->filter); + TRACE("Created multimedia stream %p.\n", object); *out = &object->IAMMultiMediaStream_iface; diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c index 3fb77f277a..7ebd54f6da 100644 --- a/dlls/amstream/tests/amstream.c +++ b/dlls/amstream/tests/amstream.c @@ -1140,7 +1140,7 @@ static void test_enum_pins(void) ok(hr == S_OK, "Got hr %#x.\n", hr); ref = get_refcount(filter); - todo_wine ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %d.\n", ref); hr = IMediaStreamFilter_EnumPins(filter, NULL); ok(hr == E_POINTER, "Got hr %#x.\n", hr); @@ -1148,7 +1148,7 @@ static void test_enum_pins(void) hr = IMediaStreamFilter_EnumPins(filter, &enum1); ok(hr == S_OK, "Got hr %#x.\n", hr); ref = get_refcount(filter); - todo_wine ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %d.\n", ref); ref = get_refcount(enum1); ok(ref == 1, "Got unexpected refcount %d.\n", ref); @@ -1186,7 +1186,7 @@ static void test_enum_pins(void) ok(hr == S_OK, "Got hr %#x.\n", hr); ref = get_refcount(filter); - todo_wine ok(ref == 4, "Got unexpected refcount %d.\n", ref); + ok(ref == 4, "Got unexpected refcount %d.\n", ref); ref = get_refcount(enum1); ok(ref == 1, "Got unexpected refcount %d.\n", ref); ref = get_refcount(pin); @@ -1196,7 +1196,7 @@ static void test_enum_pins(void) ok(hr == S_OK, "Got hr %#x.\n", hr); ok(pins[0] == pin, "Expected pin %p, got %p.\n", pin, pins[0]); ref = get_refcount(filter); - todo_wine ok(ref == 4, "Got unexpected refcount %d.\n", ref); + ok(ref == 4, "Got unexpected refcount %d.\n", ref); ref = get_refcount(enum1); ok(ref == 1, "Got unexpected refcount %d.\n", ref); ref = get_refcount(pin);
1
0
0
0
Jacek Caban : server: Get rid of no longer needed read_console_input request.
by Alexandre Julliard
06 Jul '20
06 Jul '20
Module: wine Branch: master Commit: b116cf848a0816e8d03fad93bba1022baf53a229 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b116cf848a0816e8d03fad93…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jul 6 19:29:24 2020 +0200 server: Get rid of no longer needed read_console_input request. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/wine/server_protocol.h | 22 +------------------ server/console.c | 49 ------------------------------------------ server/protocol.def | 10 --------- server/request.h | 7 ------ server/trace.c | 15 ------------- 5 files changed, 1 insertion(+), 102 deletions(-) diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 331bab8687..26cedfcedf 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -2163,23 +2163,6 @@ struct write_console_input_reply -struct read_console_input_request -{ - struct request_header __header; - obj_handle_t handle; - int flush; - char __pad_20[4]; -}; -struct read_console_input_reply -{ - struct reply_header __header; - int read; - /* VARARG(rec,input_records); */ - char __pad_12[4]; -}; - - - struct write_console_output_request { struct request_header __header; @@ -5892,7 +5875,6 @@ enum request REQ_set_console_output_info, REQ_get_console_output_info, REQ_write_console_input, - REQ_read_console_input, REQ_write_console_output, REQ_fill_console_output, REQ_read_console_output, @@ -6196,7 +6178,6 @@ union generic_request struct set_console_output_info_request set_console_output_info_request; struct get_console_output_info_request get_console_output_info_request; struct write_console_input_request write_console_input_request; - struct read_console_input_request read_console_input_request; struct write_console_output_request write_console_output_request; struct fill_console_output_request fill_console_output_request; struct read_console_output_request read_console_output_request; @@ -6498,7 +6479,6 @@ union generic_reply struct set_console_output_info_reply set_console_output_info_reply; struct get_console_output_info_reply get_console_output_info_reply; struct write_console_input_reply write_console_input_reply; - struct read_console_input_reply read_console_input_reply; struct write_console_output_reply write_console_output_reply; struct fill_console_output_reply fill_console_output_reply; struct read_console_output_reply read_console_output_reply; @@ -6722,7 +6702,7 @@ union generic_reply /* ### protocol_version begin ### */ -#define SERVER_PROTOCOL_VERSION 613 +#define SERVER_PROTOCOL_VERSION 614 /* ### protocol_version end ### */ diff --git a/server/console.c b/server/console.c index 841fc839d1..9e3fa1d673 100644 --- a/server/console.c +++ b/server/console.c @@ -798,48 +798,6 @@ static int write_console_input( struct console_input* console, int count, return count; } -/* retrieve a pointer to the console input records */ -static int read_console_input_req( obj_handle_t handle, int count, int flush ) -{ - struct console_input *console; - - if (!(console = (struct console_input *)get_handle_obj( current->process, handle, - FILE_READ_DATA, &console_input_ops ))) - return -1; - - if (!count) - { - /* special case: do not retrieve anything, but return - * the total number of records available */ - count = console->recnum; - } - else - { - if (count > console->recnum) count = console->recnum; - set_reply_data( console->records, count * sizeof(INPUT_RECORD) ); - } - if (flush) - { - int i; - for (i = count; i < console->recnum; i++) - console->records[i-count] = console->records[i]; - if ((console->recnum -= count) > 0) - { - INPUT_RECORD *new_rec = realloc( console->records, - console->recnum * sizeof(INPUT_RECORD) ); - if (new_rec) console->records = new_rec; - } - else - { - free( console->records ); - console->records = NULL; - reset_event( console->event ); - } - } - release_object( console ); - return count; -} - /* set misc console input information */ static int set_console_input_info( const struct set_console_input_info_request *req, const WCHAR *title, data_size_t len ) @@ -1895,13 +1853,6 @@ DECL_HANDLER(write_console_input) release_object( console ); } -/* fetch input records from a console input queue */ -DECL_HANDLER(read_console_input) -{ - int count = get_reply_max_size() / sizeof(INPUT_RECORD); - reply->read = read_console_input_req( req->handle, count, req->flush ); -} - /* appends a string to console's history */ DECL_HANDLER(append_console_input_history) { diff --git a/server/protocol.def b/server/protocol.def index 6416306c0a..87ec4dbd48 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -1706,16 +1706,6 @@ struct console_renderer_event @END -/* Fetch input records from a console input queue */ -@REQ(read_console_input) - obj_handle_t handle; /* handle to the console input */ - int flush; /* flush the retrieved records from the queue? */ -@REPLY - int read; /* number of records read */ - VARARG(rec,input_records); /* input records */ -@END - - /* write data (chars and/or attributes) in a screen buffer */ @REQ(write_console_output) obj_handle_t handle; /* handle to the console output */ diff --git a/server/request.h b/server/request.h index 62937d9a5a..199b6bc81d 100644 --- a/server/request.h +++ b/server/request.h @@ -196,7 +196,6 @@ DECL_HANDLER(create_console_output); DECL_HANDLER(set_console_output_info); DECL_HANDLER(get_console_output_info); DECL_HANDLER(write_console_input); -DECL_HANDLER(read_console_input); DECL_HANDLER(write_console_output); DECL_HANDLER(fill_console_output); DECL_HANDLER(read_console_output); @@ -499,7 +498,6 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] = (req_handler)req_set_console_output_info, (req_handler)req_get_console_output_info, (req_handler)req_write_console_input, - (req_handler)req_read_console_input, (req_handler)req_write_console_output, (req_handler)req_fill_console_output, (req_handler)req_read_console_output, @@ -1246,11 +1244,6 @@ C_ASSERT( FIELD_OFFSET(struct write_console_input_request, handle) == 12 ); C_ASSERT( sizeof(struct write_console_input_request) == 16 ); C_ASSERT( FIELD_OFFSET(struct write_console_input_reply, written) == 8 ); C_ASSERT( sizeof(struct write_console_input_reply) == 16 ); -C_ASSERT( FIELD_OFFSET(struct read_console_input_request, handle) == 12 ); -C_ASSERT( FIELD_OFFSET(struct read_console_input_request, flush) == 16 ); -C_ASSERT( sizeof(struct read_console_input_request) == 24 ); -C_ASSERT( FIELD_OFFSET(struct read_console_input_reply, read) == 8 ); -C_ASSERT( sizeof(struct read_console_input_reply) == 16 ); C_ASSERT( FIELD_OFFSET(struct write_console_output_request, handle) == 12 ); C_ASSERT( FIELD_OFFSET(struct write_console_output_request, x) == 16 ); C_ASSERT( FIELD_OFFSET(struct write_console_output_request, y) == 20 ); diff --git a/server/trace.c b/server/trace.c index 2fb5afd5ef..5b3da34872 100644 --- a/server/trace.c +++ b/server/trace.c @@ -2194,18 +2194,6 @@ static void dump_write_console_input_reply( const struct write_console_input_rep fprintf( stderr, " written=%d", req->written ); } -static void dump_read_console_input_request( const struct read_console_input_request *req ) -{ - fprintf( stderr, " handle=%04x", req->handle ); - fprintf( stderr, ", flush=%d", req->flush ); -} - -static void dump_read_console_input_reply( const struct read_console_input_reply *req ) -{ - fprintf( stderr, " read=%d", req->read ); - dump_varargs_input_records( ", rec=", cur_size ); -} - static void dump_write_console_output_request( const struct write_console_output_request *req ) { fprintf( stderr, " handle=%04x", req->handle ); @@ -4700,7 +4688,6 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = { (dump_func)dump_set_console_output_info_request, (dump_func)dump_get_console_output_info_request, (dump_func)dump_write_console_input_request, - (dump_func)dump_read_console_input_request, (dump_func)dump_write_console_output_request, (dump_func)dump_fill_console_output_request, (dump_func)dump_read_console_output_request, @@ -5000,7 +4987,6 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = { NULL, (dump_func)dump_get_console_output_info_reply, (dump_func)dump_write_console_input_reply, - (dump_func)dump_read_console_input_reply, (dump_func)dump_write_console_output_reply, (dump_func)dump_fill_console_output_reply, (dump_func)dump_read_console_output_reply, @@ -5300,7 +5286,6 @@ static const char * const req_names[REQ_NB_REQUESTS] = { "set_console_output_info", "get_console_output_info", "write_console_input", - "read_console_input", "write_console_output", "fill_console_output", "read_console_output",
1
0
0
0
Jacek Caban : kernelbase: Reimplement PeekConsoleInputW using IOCTL_CONDRV_PEEK.
by Alexandre Julliard
06 Jul '20
06 Jul '20
Module: wine Branch: master Commit: e3caa9c420bcad90bb850e588845d18f4d99e435 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e3caa9c420bcad90bb850e58…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jul 6 19:29:13 2020 +0200 kernelbase: Reimplement PeekConsoleInputW using IOCTL_CONDRV_PEEK. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernelbase/console.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/dlls/kernelbase/console.c b/dlls/kernelbase/console.c index f4af228436..59285f75e1 100644 --- a/dlls/kernelbase/console.c +++ b/dlls/kernelbase/console.c @@ -790,20 +790,11 @@ BOOL WINAPI DECLSPEC_HOTPATCH PeekConsoleInputA( HANDLE handle, INPUT_RECORD *bu BOOL WINAPI DECLSPEC_HOTPATCH PeekConsoleInputW( HANDLE handle, INPUT_RECORD *buffer, DWORD length, DWORD *count ) { - BOOL ret; - - SERVER_START_REQ( read_console_input ) - { - req->handle = console_handle_unmap( handle ); - req->flush = FALSE; - wine_server_set_reply( req, buffer, length * sizeof(INPUT_RECORD) ); - if ((ret = !wine_server_call_err( req ))) - { - if (count) *count = length ? reply->read : 0; - } - } - SERVER_END_REQ; - return ret; + DWORD read; + if (!DeviceIoControl( handle, IOCTL_CONDRV_PEEK, NULL, 0, buffer, length * sizeof(*buffer), &read, NULL )) + return FALSE; + if (count) *count = read / sizeof(*buffer); + return TRUE; }
1
0
0
0
Jacek Caban : kernel32: Use IOCTL_CONDRV_READ_INPUT in read_console_input.
by Alexandre Julliard
06 Jul '20
06 Jul '20
Module: wine Branch: master Commit: 25f7aa52adf126b24c1fa2eaed9bd4b40152aa82 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=25f7aa52adf126b24c1fa2ea…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jul 6 19:28:57 2020 +0200 kernel32: Use IOCTL_CONDRV_READ_INPUT in read_console_input. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/console.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c index e64f488afc..b1fc231c77 100644 --- a/dlls/kernel32/console.c +++ b/dlls/kernel32/console.c @@ -54,6 +54,7 @@ #include "winnls.h" #include "winerror.h" #include "wincon.h" +#include "wine/condrv.h" #include "wine/server.h" #include "wine/exception.h" #include "wine/unicode.h" @@ -409,6 +410,8 @@ static enum read_console_input_return read_console_input(HANDLE handle, PINPUT_R { int fd; enum read_console_input_return ret; + int blocking = timeout != 0; + DWORD read_bytes; if ((fd = get_console_bare_fd(handle)) != -1) { @@ -421,25 +424,10 @@ static enum read_console_input_return read_console_input(HANDLE handle, PINPUT_R close(fd); if (ret != rci_gotone) return ret; } - else - { - if (!VerifyConsoleIoHandle(handle)) return rci_error; - - if (WaitForSingleObject(handle, timeout) != WAIT_OBJECT_0) - return rci_timeout; - } - - SERVER_START_REQ( read_console_input ) - { - req->handle = console_handle_unmap(handle); - req->flush = TRUE; - wine_server_set_reply( req, ir, sizeof(INPUT_RECORD) ); - if (wine_server_call_err( req ) || !reply->read) ret = rci_error; - else ret = rci_gotone; - } - SERVER_END_REQ; - return ret; + if (!DeviceIoControl( handle, IOCTL_CONDRV_READ_INPUT, &blocking, sizeof(blocking), ir, sizeof(*ir), &read_bytes, NULL )) + return rci_error; + return read_bytes ? rci_gotone : rci_timeout; }
1
0
0
0
Jacek Caban : server: Introduce IOCTL_CONDRV_READ_INPUT and IOCTL_CONDRV_PEEK ioctls.
by Alexandre Julliard
06 Jul '20
06 Jul '20
Module: wine Branch: master Commit: af9a8b1b0890cad21b23279d7f0dae083859e960 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=af9a8b1b0890cad21b23279d…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jul 6 19:28:40 2020 +0200 server: Introduce IOCTL_CONDRV_READ_INPUT and IOCTL_CONDRV_PEEK ioctls. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/wine/condrv.h | 2 ++ server/console.c | 99 +++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 98 insertions(+), 3 deletions(-) diff --git a/include/wine/condrv.h b/include/wine/condrv.h index dc1250a43f..0107da1f2f 100644 --- a/include/wine/condrv.h +++ b/include/wine/condrv.h @@ -24,6 +24,8 @@ #include "winioctl.h" /* console input ioctls */ +#define IOCTL_CONDRV_READ_INPUT CTL_CODE(FILE_DEVICE_CONSOLE, 10, METHOD_BUFFERED, FILE_READ_ACCESS) +#define IOCTL_CONDRV_PEEK CTL_CODE(FILE_DEVICE_CONSOLE, 12, METHOD_BUFFERED, FILE_READ_ACCESS) #define IOCTL_CONDRV_GET_INPUT_INFO CTL_CODE(FILE_DEVICE_CONSOLE, 13, METHOD_BUFFERED, FILE_READ_PROPERTIES) /* IOCTL_CONDRV_GET_INPUT_INFO result */ diff --git a/server/console.c b/server/console.c index 8902943776..841fc839d1 100644 --- a/server/console.c +++ b/server/console.c @@ -71,6 +71,7 @@ struct console_input user_handle_t win; /* window handle if backend supports it */ struct event *event; /* event to wait on for input queue */ struct fd *fd; /* for bare console, attached input fd */ + struct async_queue read_q; /* read queue */ }; static void console_input_dump( struct object *obj, int verbose ); @@ -389,6 +390,7 @@ static struct object *create_console_input( struct thread* renderer, int fd ) console_input->win = 0; console_input->event = create_event( NULL, NULL, 0, 1, 0, NULL ); console_input->fd = NULL; + init_async_queue( &console_input->read_q ); if (!console_input->history || (renderer && !console_input->evt) || !console_input->event) { @@ -697,11 +699,61 @@ static int set_console_mode( obj_handle_t handle, int mode ) return ret; } +/* retrieve a pointer to the console input records */ +static int read_console_input( struct console_input *console, struct async *async, int flush ) +{ + struct iosb *iosb = async_get_iosb( async ); + data_size_t count; + + count = min( iosb->out_size / sizeof(INPUT_RECORD), console->recnum ); + if (count) + { + if (!(iosb->out_data = malloc( count * sizeof(INPUT_RECORD) ))) + { + set_error( STATUS_NO_MEMORY ); + release_object( iosb ); + return 0; + } + iosb->out_size = iosb->result = count * sizeof(INPUT_RECORD); + memcpy( iosb->out_data, console->records, iosb->result ); + iosb->status = STATUS_SUCCESS; + async_terminate( async, STATUS_ALERTED ); + } + else + { + async_terminate( async, STATUS_SUCCESS ); + } + + release_object( iosb ); + + if (flush && count) + { + if (console->recnum > count) + { + INPUT_RECORD *new_rec; + memmove( console->records, console->records + count, (console->recnum - count) * sizeof(*console->records) ); + console->recnum -= count; + new_rec = realloc( console->records, console->recnum * sizeof(*console->records) ); + if (new_rec) console->records = new_rec; + } + else + { + console->recnum = 0; + free( console->records ); + console->records = NULL; + reset_event( console->event ); + } + } + + return 1; +} + /* add input events to a console input queue */ static int write_console_input( struct console_input* console, int count, const INPUT_RECORD *records ) { INPUT_RECORD *new_rec; + struct async *async; if (!count) return 0; if (!(new_rec = realloc( console->records, @@ -736,13 +788,18 @@ static int write_console_input( struct console_input* console, int count, else i++; } } - if (!console->recnum && count) set_event( console->event ); console->recnum += count; + while (console->recnum && (async = find_pending_async( &console->read_q ))) + { + read_console_input( console, async, 1 ); + release_object( async ); + } + if (console->recnum) set_event( console->event ); return count; } /* retrieve a pointer to the console input records */ -static int read_console_input( obj_handle_t handle, int count, int flush ) +static int read_console_input_req( obj_handle_t handle, int count, int flush ) { struct console_input *console; @@ -1197,6 +1254,7 @@ static void console_input_destroy( struct object *obj ) if (curr->input == console_in) curr->input = NULL; } + free_async_queue( &console_in->read_q ); if (console_in->evt) { release_object( console_in->evt ); @@ -1495,6 +1553,41 @@ static int console_ioctl( struct fd *fd, ioctl_code_t code, struct async *async switch (code) { + case IOCTL_CONDRV_READ_INPUT: + { + int blocking = 0; + if (get_reply_max_size() % sizeof(INPUT_RECORD)) + { + set_error( STATUS_INVALID_PARAMETER ); + return 0; + } + if (get_req_data_size()) + { + if (get_req_data_size() != sizeof(int)) + { + set_error( STATUS_INVALID_PARAMETER ); + return 0; + } + blocking = *(int *)get_req_data(); + } + set_error( STATUS_PENDING ); + if (blocking && !console->recnum) + { + queue_async( &console->read_q, async ); + return 1; + } + return read_console_input( console, async, 1 ); + } + + case IOCTL_CONDRV_PEEK: + if (get_reply_max_size() % sizeof(INPUT_RECORD)) + { + set_error( STATUS_INVALID_PARAMETER ); + return 0; + } + set_error( STATUS_PENDING ); + return read_console_input( console, async, 0 ); + case IOCTL_CONDRV_GET_INPUT_INFO: { struct condrv_input_info info; @@ -1806,7 +1899,7 @@ DECL_HANDLER(write_console_input) DECL_HANDLER(read_console_input) { int count = get_reply_max_size() / sizeof(INPUT_RECORD); - reply->read = read_console_input( req->handle, count, req->flush ); + reply->read = read_console_input_req( req->handle, count, req->flush ); } /* appends a string to console's history */
1
0
0
0
Jacek Caban : kernelbase: Reimplement GetNumberOfConsoleInputEvents using IOCTL_CONDRV_GET_INPUT_INFO.
by Alexandre Julliard
06 Jul '20
06 Jul '20
Module: wine Branch: master Commit: 4448715cfbd70b214c332ab9fdfdfe3f28508177 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4448715cfbd70b214c332ab9…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jul 6 19:27:08 2020 +0200 kernelbase: Reimplement GetNumberOfConsoleInputEvents using IOCTL_CONDRV_GET_INPUT_INFO. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernelbase/console.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/dlls/kernelbase/console.c b/dlls/kernelbase/console.c index 2e90a905cb..f4af228436 100644 --- a/dlls/kernelbase/console.c +++ b/dlls/kernelbase/console.c @@ -36,6 +36,7 @@ #include "winnls.h" #include "winerror.h" #include "wincon.h" +#include "wine/condrv.h" #include "wine/server.h" #include "wine/exception.h" #include "wine/debug.h" @@ -760,24 +761,11 @@ COORD WINAPI DECLSPEC_HOTPATCH GetLargestConsoleWindowSize( HANDLE handle ) */ BOOL WINAPI DECLSPEC_HOTPATCH GetNumberOfConsoleInputEvents( HANDLE handle, DWORD *count ) { - BOOL ret; - - SERVER_START_REQ( read_console_input ) - { - req->handle = console_handle_unmap( handle ); - req->flush = FALSE; - if ((ret = !wine_server_call_err( req ))) - { - if (count) *count = reply->read; - else - { - SetLastError( ERROR_INVALID_ACCESS ); - ret = FALSE; - } - } - } - SERVER_END_REQ; - return ret; + struct condrv_input_info info; + if (!DeviceIoControl( handle, IOCTL_CONDRV_GET_INPUT_INFO, NULL, 0, &info, sizeof(info), NULL, NULL )) + return FALSE; + *count = info.input_count; + return TRUE; }
1
0
0
0
Jacek Caban : server: Introduce IOCTL_CONDRV_GET_INPUT_INFO ioctl.
by Alexandre Julliard
06 Jul '20
06 Jul '20
Module: wine Branch: master Commit: dc672b49ca887c78a3e20854d96e7a56e967c072 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=dc672b49ca887c78a3e20854…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jul 6 19:26:56 2020 +0200 server: Introduce IOCTL_CONDRV_GET_INPUT_INFO ioctl. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/wine/condrv.h | 35 +++++++++++++++++++++++++++++++++++ server/console.c | 28 +++++++++++++++++++++++++++- 2 files changed, 62 insertions(+), 1 deletion(-) diff --git a/include/wine/condrv.h b/include/wine/condrv.h new file mode 100644 index 0000000000..dc1250a43f --- /dev/null +++ b/include/wine/condrv.h @@ -0,0 +1,35 @@ +/* + * Console driver ioctls + * + * Copyright 2020 Jacek Caban 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 + */ + +#ifndef _INC_CONDRV +#define _INC_CONDRV + +#include "winioctl.h" + +/* console input ioctls */ +#define IOCTL_CONDRV_GET_INPUT_INFO CTL_CODE(FILE_DEVICE_CONSOLE, 13, METHOD_BUFFERED, FILE_READ_PROPERTIES) + +/* IOCTL_CONDRV_GET_INPUT_INFO result */ +struct condrv_input_info +{ + unsigned int input_count; /* number of available input records */ +}; + +#endif /* _INC_CONDRV */ diff --git a/server/console.c b/server/console.c index fc12a3a8f3..8902943776 100644 --- a/server/console.c +++ b/server/console.c @@ -38,6 +38,7 @@ #include "unicode.h" #include "wincon.h" #include "winternl.h" +#include "wine/condrv.h" struct screen_buffer; struct console_input_events; @@ -200,6 +201,7 @@ static const struct object_ops screen_buffer_ops = }; static enum server_fd_type console_get_fd_type( struct fd *fd ); +static int console_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ); static const struct fd_ops console_fd_ops = { @@ -211,7 +213,7 @@ static const struct fd_ops console_fd_ops = no_fd_flush, /* flush */ no_fd_get_file_info, /* get_file_info */ no_fd_get_volume_info, /* get_volume_info */ - default_fd_ioctl, /* ioctl */ + console_ioctl, /* ioctl */ default_fd_queue_async, /* queue_async */ default_fd_reselect_async /* reselect_async */ }; @@ -1487,6 +1489,30 @@ static void scroll_console_output( struct screen_buffer *screen_buffer, int xsrc console_input_events_append( screen_buffer->input, &evt ); } +static int console_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ) +{ + struct console_input *console = get_fd_user( fd ); + + switch (code) + { + case IOCTL_CONDRV_GET_INPUT_INFO: + { + struct condrv_input_info info; + if (get_reply_max_size() != sizeof(info)) + { + set_error( STATUS_INVALID_PARAMETER ); + return 0; + } + info.input_count = console->recnum; + return set_reply_data( &info, sizeof(info) ) != NULL; + } + + default: + set_error( STATUS_INVALID_HANDLE ); + return 0; + } +} + static struct object_type *console_device_get_type( struct object *obj ) { static const WCHAR name[] = {'D','e','v','i','c','e'};
1
0
0
0
← Newer
1
...
70
71
72
73
74
75
76
...
83
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
Results per page:
10
25
50
100
200