ReactOS.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
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
List overview
Download
Ros-diffs
December 2023
----- 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
ros-diffs@reactos.org
20 participants
274 discussions
Start a n
N
ew thread
[reactos] 02/05: [SHELL32] Update resource file headers
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6295c61f3f0c0f432d685…
commit 6295c61f3f0c0f432d685372440be42fbcc96d55 Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Sun Dec 3 22:38:40 2023 +0300 Commit: Stanislav Motylkov <x86corez(a)gmail.com> CommitDate: Sun Dec 3 22:42:10 2023 +0300 [SHELL32] Update resource file headers Only update files that already have a non-standard header. There are still resource files that just don't have it. Dedicated to Joachim Henze - PR #6004 commit 273a6e25751. --- dll/win32/shell32/lang/cs-CZ.rc | 10 ++++++---- dll/win32/shell32/lang/da-DK.rc | 9 +++++---- dll/win32/shell32/lang/es-ES.rc | 12 ++++++------ dll/win32/shell32/lang/et-EE.rc | 8 ++++---- dll/win32/shell32/lang/eu-ES.rc | 2 +- dll/win32/shell32/lang/he-IL.rc | 7 ++++++- dll/win32/shell32/lang/pl-PL.rc | 9 ++++++--- dll/win32/shell32/lang/ro-RO.rc | 4 ++-- dll/win32/shell32/lang/ru-RU.rc | 12 +++++++----- dll/win32/shell32/lang/sq-AL.rc | 9 ++++++--- dll/win32/shell32/lang/tr-TR.rc | 9 ++++++++- dll/win32/shell32/lang/zh-CN.rc | 2 +- dll/win32/shell32/lang/zh-HK.rc | 2 +- 13 files changed, 59 insertions(+), 36 deletions(-) diff --git a/dll/win32/shell32/lang/cs-CZ.rc b/dll/win32/shell32/lang/cs-CZ.rc index 8af5dce9338..2692c9f3dba 100644 --- a/dll/win32/shell32/lang/cs-CZ.rc +++ b/dll/win32/shell32/lang/cs-CZ.rc @@ -1,7 +1,9 @@ -/* FILE: dll/win32/shell32/lang/cs-CZ.rc - * TRANSLATOR: Radek Liska aka Black_Fox (radekliska at gmail dot com) - * UPDATED: 2015-04-12 - * THANKS TO: navaraf, who translated major part of this file +/* + * PROJECT: ReactOS Shell32 + * LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later
) + * PURPOSE: Czech resource file + * TRANSLATORS: Copyright 2003 Filip Navara (navaraf(a)reactos.org) + * Copyright 2008-2015 Radek Liška (Black_Fox) <radekliska(a)gmail.com> */ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT diff --git a/dll/win32/shell32/lang/da-DK.rc b/dll/win32/shell32/lang/da-DK.rc index a2a8a198f60..2a372d00943 100644 --- a/dll/win32/shell32/lang/da-DK.rc +++ b/dll/win32/shell32/lang/da-DK.rc @@ -1,7 +1,8 @@ -/* PROJECT: ReactOS Shell Library - * FILE: dll/win32/shell32/lang/da-DK.rc - * PURPOSE: Danish resource file - * UPDATED: 01 May 2009 +/* + * PROJECT: ReactOS Shell32 + * LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later
) + * PURPOSE: Danish resource file + * TRANSLATOR: Copyright 2009 Thomas Larsen <sikker2004(a)yahoo.com> */ LANGUAGE LANG_DANISH, SUBLANG_DEFAULT diff --git a/dll/win32/shell32/lang/es-ES.rc b/dll/win32/shell32/lang/es-ES.rc index c455913d518..9b80b3afc66 100644 --- a/dll/win32/shell32/lang/es-ES.rc +++ b/dll/win32/shell32/lang/es-ES.rc @@ -1,10 +1,10 @@ /* - * PROJECT: ReactOS Shell - * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) - * PURPOSE: Spanish locale file - * COPYRIGHT: Ismael Ferreras Morezuelas - * Julio Carchi Ruiz - * Julen Urizar Compains (2020) + * PROJECT: ReactOS Shell32 + * LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later
) + * PURPOSE: Spanish resource file + * TRANSLATORS: Copyright 2014-2015 Ismael Ferreras Morezuelas <swyterzone+ros(a)gmail.com> + * Copyright 2018 Julio Carchi Ruiz <contacto(a)julcar.info.tm> + * Copyright 2020 Julen Urizar Compains <julenuri(a)hotmail.com> */ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL diff --git a/dll/win32/shell32/lang/et-EE.rc b/dll/win32/shell32/lang/et-EE.rc index 82ba06904c7..54c32a62264 100644 --- a/dll/win32/shell32/lang/et-EE.rc +++ b/dll/win32/shell32/lang/et-EE.rc @@ -1,8 +1,8 @@ /* - * PROJECT: shell32 for ReactOS - * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) - * PURPOSE: Estonian Language resource file - * TRANSLATOR: Joann Mõndresku (joannmondresku at gmail dot com) + * PROJECT: ReactOS Shell32 + * LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later
) + * PURPOSE: Estonian resource file + * TRANSLATOR: Copyright 2018 Joann Mõndresku <joannmondresku(a)gmail.com> */ LANGUAGE LANG_ESTONIAN, SUBLANG_DEFAULT diff --git a/dll/win32/shell32/lang/eu-ES.rc b/dll/win32/shell32/lang/eu-ES.rc index aae6824a530..ac771fca25f 100644 --- a/dll/win32/shell32/lang/eu-ES.rc +++ b/dll/win32/shell32/lang/eu-ES.rc @@ -1,6 +1,6 @@ /* * PROJECT: ReactOS Shell32 - * LICENSE: LGPL-2.1+ (
https://spdx.org/licenses/LGPL-2.1+
) + * LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later
) * PURPOSE: Spanish (Basque) resource file * TRANSLATOR: Copyright 2021 Julen Urizar Compains <julenuri(a)hotmail.com> */ diff --git a/dll/win32/shell32/lang/he-IL.rc b/dll/win32/shell32/lang/he-IL.rc index 197e6a853fa..5498554e711 100644 --- a/dll/win32/shell32/lang/he-IL.rc +++ b/dll/win32/shell32/lang/he-IL.rc @@ -1,4 +1,9 @@ -/* Hebrew translation by Baruch Rutman (peterooch) */ +/* + * PROJECT: ReactOS Shell32 + * LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later
) + * PURPOSE: Hebrew resource file + * TRANSLATOR: Copyright 2013-2019 Baruch Rutman <peterooch(a)gmail.com> + */ LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT diff --git a/dll/win32/shell32/lang/pl-PL.rc b/dll/win32/shell32/lang/pl-PL.rc index 6f0eeef2235..d984aef5ce2 100644 --- a/dll/win32/shell32/lang/pl-PL.rc +++ b/dll/win32/shell32/lang/pl-PL.rc @@ -1,7 +1,10 @@ /* - * Updated by Saibamen (July, 2015) - * Updated by BlackDragonDv (January, 2018) - * Updated by Piotr Hetnarowicz <piotrhwz(a)gmail.com> (May, 2021) + * PROJECT: ReactOS Shell32 + * LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later
) + * PURPOSE: Polish resource file + * TRANSLATORS: Copyright 2015 Adam Stachowicz <saibamenppl(a)gmail.com> + * Copyright 2018 Kamil Smoliński <blackdragondev85(a)gmail.com> + * Copyright 2021 Piotr Hetnarowicz <piotrhwz(a)gmail.com> */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT diff --git a/dll/win32/shell32/lang/ro-RO.rc b/dll/win32/shell32/lang/ro-RO.rc index 430797c7f71..a8162813246 100644 --- a/dll/win32/shell32/lang/ro-RO.rc +++ b/dll/win32/shell32/lang/ro-RO.rc @@ -1,6 +1,6 @@ /* - * PROJECT: ReactOS Shell - * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later
) + * PROJECT: ReactOS Shell32 + * LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later
) * PURPOSE: Romanian resource file * TRANSLATORS: Copyright 2011-2019 Ștefan Fulea <stefan.fulea(a)mail.com> * Copyright 2022-2023 Andrei Miloiu <miloiuandrei(a)gmail.com> diff --git a/dll/win32/shell32/lang/ru-RU.rc b/dll/win32/shell32/lang/ru-RU.rc index 4b2d22971d9..1b61f02a500 100644 --- a/dll/win32/shell32/lang/ru-RU.rc +++ b/dll/win32/shell32/lang/ru-RU.rc @@ -1,9 +1,11 @@ /* - Translators: - Kudratov Olimjon (olim98(a)bk.ru) - Abdulganiev Rafael (
abdulganiev.rafael[at]gmail.com
) - Stanislav Motylkov (binarymaster(a)mail.ru) -*/ + * PROJECT: ReactOS Shell32 + * LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later
) + * PURPOSE: Russian resource file + * TRANSLATORS: Copyright 2014-2016 Kudratov Olimjon <olim98(a)bk.ru> + * Copyright 2018 Abdulganiev Rafael <abdulganiev.rafael(a)gmail.com> + * Copyright 2018-2020 Stanislav Motylkov <binarymaster(a)mail.ru> + */ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT diff --git a/dll/win32/shell32/lang/sq-AL.rc b/dll/win32/shell32/lang/sq-AL.rc index 408a46ee2f5..43140f7679b 100644 --- a/dll/win32/shell32/lang/sq-AL.rc +++ b/dll/win32/shell32/lang/sq-AL.rc @@ -1,6 +1,9 @@ -/* TRANSLATOR : Ardit Dani (Ard1t) (ardit.dani(a)gmail.com) - * DATE OF TRANSLATION: 06-02-2014 -*/ +/* + * PROJECT: ReactOS Shell32 + * LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later
) + * PURPOSE: Albanian resource file + * TRANSLATOR: Copyright 2014 Ardit Dani (Ard1t) <ardit.dani(a)gmail.com> + */ LANGUAGE LANG_ALBANIAN, SUBLANG_NEUTRAL diff --git a/dll/win32/shell32/lang/tr-TR.rc b/dll/win32/shell32/lang/tr-TR.rc index 910816daf69..351e8146f4c 100644 --- a/dll/win32/shell32/lang/tr-TR.rc +++ b/dll/win32/shell32/lang/tr-TR.rc @@ -1,4 +1,11 @@ -/* TRANSLATORS: 2006 Fatih Aşıcı, 2012 Arda Tanrıkulu (ardatan) (ardatanrikulu [at] gmail [dot] com), 2015-2016, 2020 Erdem Ersoy (eersoy93) (erdemersoy [at] erdemersoy [dot] net) */ +/* + * PROJECT: ReactOS Shell32 + * LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later
) + * PURPOSE: Turkish resource file + * TRANSLATORS: Copyright 2006 Fatih Aşıcı <fasici(a)linux-sevenler.org> + * Copyright 2012 Arda Tanrıkulu (ardatan) <ardatanrikulu(a)gmail.com> + * Copyright 2015-2016, 2020 Erdem Ersoy (eersoy93) <erdemersoy(a)erdemersoy.net> + */ LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT diff --git a/dll/win32/shell32/lang/zh-CN.rc b/dll/win32/shell32/lang/zh-CN.rc index 24a81bf627b..0d77cd64138 100644 --- a/dll/win32/shell32/lang/zh-CN.rc +++ b/dll/win32/shell32/lang/zh-CN.rc @@ -1,6 +1,6 @@ /* * PROJECT: ReactOS Shell32 - * LICENSE: LGPL-2.1+ (
https://spdx.org/licenses/LGPL-2.1+
) + * LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later
) * PURPOSE: Chinese (Simplified) resource file * TRANSLATORS: Copyright 2008 Zhang Bing <e_zb(a)21cn.com> <ezb(a)mail.gywb.cn> * Copyright 2011 Elton Chung aka MfldElton <elton328(a)gmail.com> diff --git a/dll/win32/shell32/lang/zh-HK.rc b/dll/win32/shell32/lang/zh-HK.rc index 80a753e83f4..3bd063da9f1 100644 --- a/dll/win32/shell32/lang/zh-HK.rc +++ b/dll/win32/shell32/lang/zh-HK.rc @@ -1,7 +1,7 @@ /* * PROJECT: ReactOS Shell32 * LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later
) - * PURPOSE: Chinese (Hong Kong) resources file + * PURPOSE: Chinese (Hong Kong) resource file * TRANSLATORS: Copyright 2021 Chan Chilung <eason066(a)gmail.com> * REFERENCES: Chinese (Traditional) resource file */
1 year
1
0
0
0
[reactos] 01/05: [REACTOS] Omit "aka" for the authors' nicknames
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=51f9b86cbcb39c7d2482b…
commit 51f9b86cbcb39c7d2482ba2a3ae6f56e34caf695 Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Sun Nov 26 23:16:12 2023 +0300 Commit: Stanislav Motylkov <x86corez(a)gmail.com> CommitDate: Sun Dec 3 22:08:20 2023 +0300 [REACTOS] Omit "aka" for the authors' nicknames Based on grep query:
https://git.reactos.org/?p=reactos.git&a=search&h=c00d41d91c181746563e689d3…
Dedicated to Joachim Henze - PR #5978 commit 4c7222bab35. --- base/applications/msconfig/lang/pt-BR.rc | 2 +- base/applications/msconfig_new/lang/pt-BR.rc | 2 +- base/applications/sndvol32/lang/pt-BR.rc | 2 +- base/applications/taskmgr/lang/fr-FR.rc | 2 +- modules/rosapps/applications/screensavers/matrix/Permission.txt | 2 +- win32ss/user/user32/lang/fr-FR.rc | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/base/applications/msconfig/lang/pt-BR.rc b/base/applications/msconfig/lang/pt-BR.rc index 773938475c6..5219f03027e 100644 --- a/base/applications/msconfig/lang/pt-BR.rc +++ b/base/applications/msconfig/lang/pt-BR.rc @@ -1,4 +1,4 @@ -/* Translated by: Mateus de Lima (aka wavemaster) <mateusloliveira [@]
hotmail.com
> */ +/* Translated by: Mateus de Lima (wavemaster) <mateusloliveira [@]
hotmail.com
> */ LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN diff --git a/base/applications/msconfig_new/lang/pt-BR.rc b/base/applications/msconfig_new/lang/pt-BR.rc index 43c3e49da63..73b158284d3 100644 --- a/base/applications/msconfig_new/lang/pt-BR.rc +++ b/base/applications/msconfig_new/lang/pt-BR.rc @@ -1,4 +1,4 @@ -/* Translated by: Mateus de Lima (aka wavemaster) <mateusloliveira [@]
hotmail.com
> */ +/* Translated by: Mateus de Lima (wavemaster) <mateusloliveira [@]
hotmail.com
> */ LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL diff --git a/base/applications/sndvol32/lang/pt-BR.rc b/base/applications/sndvol32/lang/pt-BR.rc index cbf30ef5f71..f34bf2ff857 100644 --- a/base/applications/sndvol32/lang/pt-BR.rc +++ b/base/applications/sndvol32/lang/pt-BR.rc @@ -2,7 +2,7 @@ * PROJECT: ReactOS Sound Volume Control * LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later
) * PURPOSE: Portuguese (Brazil) resource file - * TRANSLATOR: Copyright 2007 Mateus de Lima (aka wavemaster) <mateusloliveira(a)hotmail.com> + * TRANSLATOR: Copyright 2007 Mateus de Lima (wavemaster) <mateusloliveira(a)hotmail.com> */ LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN diff --git a/base/applications/taskmgr/lang/fr-FR.rc b/base/applications/taskmgr/lang/fr-FR.rc index d1b77e436a0..94fcf231128 100644 --- a/base/applications/taskmgr/lang/fr-FR.rc +++ b/base/applications/taskmgr/lang/fr-FR.rc @@ -1,4 +1,4 @@ -// COPYRIGHT: Benoit Plante (aka cmoibenlepro) +// COPYRIGHT: Benoit Plante (cmoibenlepro) LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL diff --git a/modules/rosapps/applications/screensavers/matrix/Permission.txt b/modules/rosapps/applications/screensavers/matrix/Permission.txt index 363394051bc..55f0910f7c0 100644 --- a/modules/rosapps/applications/screensavers/matrix/Permission.txt +++ b/modules/rosapps/applications/screensavers/matrix/Permission.txt @@ -14,4 +14,4 @@ under Public Domain. Do what thou will but please give credit where credit is due. --Magnus Olsen (aka GreatLord) / Aleksey (aka Fireball) +-Magnus Olsen (GreatLord) / Aleksey (Fireball) diff --git a/win32ss/user/user32/lang/fr-FR.rc b/win32ss/user/user32/lang/fr-FR.rc index d5fba47a489..0dcbae3d833 100644 --- a/win32ss/user/user32/lang/fr-FR.rc +++ b/win32ss/user/user32/lang/fr-FR.rc @@ -1,4 +1,4 @@ -/* French translation by Benoit Plante (aka cmoibenlepro) */ +/* French translation by Benoit Plante (cmoibenlepro) */ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
1 year
1
0
0
0
[reactos] 01/01: [NTOS:KE] Don't hardcode pool tag and TSS flag values (#6051)
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2f0a5e546f690fdfdc5b1…
commit 2f0a5e546f690fdfdc5b1e172856b3b0418221d8 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Mon Nov 20 21:35:57 2023 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Dec 3 17:33:10 2023 +0100 [NTOS:KE] Don't hardcode pool tag and TSS flag values (#6051) Co-authored-by: Serge Gautherie <32623169+SergeGautherie(a)users.noreply.github.com> --- ntoskrnl/ke/i386/mproc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ntoskrnl/ke/i386/mproc.c b/ntoskrnl/ke/i386/mproc.c index f469f71df81..6e526d28636 100644 --- a/ntoskrnl/ke/i386/mproc.c +++ b/ntoskrnl/ke/i386/mproc.c @@ -48,7 +48,7 @@ KeStartAllProcessors(VOID) DPCStack = NULL; // Allocate structures for a new CPU. - APInfo = ExAllocatePoolZero(NonPagedPool, sizeof(APINFO), ' eK'); + APInfo = ExAllocatePoolZero(NonPagedPool, sizeof(*APInfo), TAG_KERNEL); if (!APInfo) break; ASSERT(ALIGN_DOWN_POINTER_BY(APInfo, PAGE_SIZE) == APInfo); @@ -83,7 +83,7 @@ KeStartAllProcessors(VOID) KiSetGdtDescriptorBase(KiGetGdtEntry(&APInfo->Gdt, KGDT_TSS), (ULONG_PTR)&APInfo->Tss); // Clear TSS Busy flag (aka set the type to "TSS (Available)") - KiGetGdtEntry(&APInfo->Gdt, KGDT_TSS)->HighWord.Bits.Type = 0b1001; + KiGetGdtEntry(&APInfo->Gdt, KGDT_TSS)->HighWord.Bits.Type = I386_TSS; APInfo->TssDoubleFault.Esp0 = (ULONG_PTR)&APInfo->NMIStackData; APInfo->TssDoubleFault.Esp = (ULONG_PTR)&APInfo->NMIStackData; @@ -146,11 +146,11 @@ KeStartAllProcessors(VOID) ProcessorCount--; if (APInfo) - ExFreePoolWithTag(APInfo, ' eK'); + ExFreePoolWithTag(APInfo, TAG_KERNEL); if (KernelStack) MmDeleteKernelStack(KernelStack, FALSE); if (DPCStack) MmDeleteKernelStack(DPCStack, FALSE); - DPRINT1("KeStartAllProcessors: Sucessful AP startup count is %u\n", ProcessorCount); + DPRINT1("KeStartAllProcessors: Successful AP startup count is %u\n", ProcessorCount); }
1 year
1
0
0
0
[reactos] 01/01: [IMM32][KERNEL32][SDK] Half-implement BaseCheckAppcompatCache (#6069)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6e449d47e83051692edde…
commit 6e449d47e83051692edde58b830f4510fb77cb7d Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sun Dec 3 23:40:49 2023 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sun Dec 3 23:40:49 2023 +0900 [IMM32][KERNEL32][SDK] Half-implement BaseCheckAppcompatCache (#6069) - And add it to <compat_undoc.h>. - Use <compat_undoc.h> in IMM32. - Modify kernel32.spec. CORE-19268 --- dll/win32/imm32/ctf.c | 8 +-- dll/win32/kernel32/client/appcache.c | 118 ++++++++++++++++++++++++++++++++--- dll/win32/kernel32/kernel32.spec | 2 +- sdk/include/reactos/compat_undoc.h | 8 +++ 4 files changed, 120 insertions(+), 16 deletions(-) diff --git a/dll/win32/imm32/ctf.c b/dll/win32/imm32/ctf.c index f4463cc67f1..1a0e26788ed 100644 --- a/dll/win32/imm32/ctf.c +++ b/dll/win32/imm32/ctf.c @@ -8,6 +8,7 @@ #include "precomp.h" #include <msctf.h> /* for ITfLangBarMgr */ #include <objidl.h> /* for IInitializeSpy */ +#include <compat_undoc.h> /* for BaseCheckAppcompatCache */ WINE_DEFAULT_DEBUG_CHANNEL(imm); @@ -228,13 +229,6 @@ HINSTANCE g_hCtfIme = NULL; /* The type of ApphelpCheckIME function in apphelp.dll */ typedef BOOL (WINAPI *FN_ApphelpCheckIME)(_In_z_ LPCWSTR AppName); -/* FIXME: This is kernel32 function. We have to declare this in some header. */ -BOOL WINAPI -BaseCheckAppcompatCache(_In_z_ LPCWSTR ApplicationName, - _In_ HANDLE FileHandle, - _In_opt_z_ LPCWSTR Environment, - _Out_ PULONG pdwReason); - /*********************************************************************** * This function checks whether the app's IME is disabled by application * compatibility patcher. diff --git a/dll/win32/kernel32/client/appcache.c b/dll/win32/kernel32/client/appcache.c index 0b2ebec1afe..fae424c106a 100644 --- a/dll/win32/kernel32/client/appcache.c +++ b/dll/win32/kernel32/client/appcache.c @@ -139,20 +139,122 @@ IsShimInfrastructureDisabled(VOID) * @unimplemented */ BOOL -WINAPI -BaseCheckAppcompatCache(IN PWCHAR ApplicationName, - IN HANDLE FileHandle, - IN PWCHAR Environment, - OUT PULONG Reason) +BasepShimCacheCheckBypass( + _In_ PCWSTR ApplicationName, + _In_ HANDLE FileHandle, + _In_opt_ PCWSTR Environment, + _In_ BOOL bUnknown, + _Out_opt_ PULONG pdwReason) { - DPRINT("BaseCheckAppcompatCache is UNIMPLEMENTED\n"); + DPRINT("fixme:(%S, %p, %S, %d, %p)\n", ApplicationName, FileHandle, Environment, bUnknown, + pdwReason); + return FALSE; +} - if (Reason) *Reason = 0; +/* + * @implemented + */ +BOOL +BasepShimCacheSearch( + _In_ PCWSTR ApplicationName, + _In_ HANDLE FileHandle) +{ + APPHELP_CACHE_SERVICE_LOOKUP Lookup; + RtlInitUnicodeString(&Lookup.ImageName, ApplicationName); + Lookup.ImageHandle = FileHandle; + return NT_SUCCESS(NtApphelpCacheControl(ApphelpCacheServiceLookup, &Lookup)); +} - // We don't know this app. +/* + * @unimplemented + */ +BOOL +BasepCheckCacheExcludeList( + _In_ PCWSTR ApplicationName) +{ return FALSE; } +/* + * @unimplemented + */ +BOOL +BasepCheckCacheExcludeCustom( + _In_ PCWSTR ApplicationName) +{ + return FALSE; +} + +/* + * @implemented + */ +VOID +BasepShimCacheRemoveEntry( + _In_ PCWSTR ApplicationName) +{ + APPHELP_CACHE_SERVICE_LOOKUP Lookup; + RtlInitUnicodeString(&Lookup.ImageName, ApplicationName); + Lookup.ImageHandle = INVALID_HANDLE_VALUE; + NtApphelpCacheControl(ApphelpCacheServiceRemove, &Lookup); +} + +/* + * @unimplemented + */ +BOOL +BasepShimCacheLookup( + _In_ PCWSTR ApplicationName, + _In_ HANDLE FileHandle) +{ + DPRINT("fixme:(%S, %p)\n", ApplicationName, FileHandle); + + if (!BasepShimCacheSearch(ApplicationName, FileHandle)) + return FALSE; + + if (!BasepCheckCacheExcludeList(ApplicationName) || + !BasepCheckCacheExcludeCustom(ApplicationName)) + { + BasepShimCacheRemoveEntry(ApplicationName); + return FALSE; + } + + return TRUE; +} + +/* + * @implemented + */ +BOOL +WINAPI +BaseCheckAppcompatCache( + _In_ PCWSTR ApplicationName, + _In_ HANDLE FileHandle, + _In_opt_ PCWSTR Environment, + _Out_opt_ PULONG pdwReason) +{ + BOOL ret = FALSE; + ULONG dwReason; + + DPRINT("(%S, %p, %S, %p)\n", ApplicationName, FileHandle, Environment, pdwReason); + + dwReason = 0; + if (BasepShimCacheCheckBypass(ApplicationName, FileHandle, Environment, TRUE, &dwReason)) + { + dwReason |= 2; + } + else + { + ret = BasepShimCacheLookup(ApplicationName, FileHandle); + if (!ret) + dwReason |= 1; + } + + if (pdwReason) + *pdwReason = dwReason; + + return ret; +} + static VOID BaseInitApphelp(VOID) diff --git a/dll/win32/kernel32/kernel32.spec b/dll/win32/kernel32/kernel32.spec index 3b41edde6d8..5fe3047cb42 100644 --- a/dll/win32/kernel32/kernel32.spec +++ b/dll/win32/kernel32/kernel32.spec @@ -24,7 +24,7 @@ @ stdcall BackupRead(ptr ptr long ptr long long ptr) @ stdcall BackupSeek(ptr long long ptr ptr ptr) @ stdcall BackupWrite(ptr ptr long ptr long long ptr) -@ stdcall BaseCheckAppcompatCache(long long long ptr) +@ stdcall BaseCheckAppcompatCache(wstr ptr wstr ptr) @ stdcall BaseCheckRunApp(long ptr long long long long long long long long) @ stdcall BaseCleanupAppcompatCacheSupport(ptr) @ stdcall BaseDumpAppcompatCache() diff --git a/sdk/include/reactos/compat_undoc.h b/sdk/include/reactos/compat_undoc.h index b0516322a37..cea9930e648 100644 --- a/sdk/include/reactos/compat_undoc.h +++ b/sdk/include/reactos/compat_undoc.h @@ -46,4 +46,12 @@ UINT RosGetProcessEffectiveVersion(VOID) return (peb->OSMajorVersion << 8) | (peb->OSMinorVersion); } +BOOL +WINAPI +BaseCheckAppcompatCache( + _In_ PCWSTR ApplicationName, + _In_ HANDLE FileHandle, + _In_opt_ PCWSTR Environment, + _Out_opt_ PULONG pdwReason); + #endif // COMPAT_UNDOC_H
1 year
1
0
0
0
[reactos] 01/01: [NTOS:PNP][UMPNPMGR] GUID_DEVICE_ENUMERATED should be a DeviceInstallEvent
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d8ba5920a2914067a5bb4…
commit d8ba5920a2914067a5bb404ef5d76ce5c3011e50 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Sun Dec 3 14:00:34 2023 +0100 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Sun Dec 3 14:00:34 2023 +0100 [NTOS:PNP][UMPNPMGR] GUID_DEVICE_ENUMERATED should be a DeviceInstallEvent - Move the GUID_DEVICE_ENUMERATED event from the TargetDeviceChangeEvent category to the DeviceInstallEvent category - Create a new function that handles DeviceInstallEvent category events --- base/services/umpnpmgr/event.c | 72 ++++++++++++++++++++++++------------------ ntoskrnl/include/internal/io.h | 10 ++++-- ntoskrnl/io/pnpmgr/devaction.c | 8 +++-- ntoskrnl/io/pnpmgr/plugplay.c | 43 ++++++++++++++++++++++++- 4 files changed, 97 insertions(+), 36 deletions(-) diff --git a/base/services/umpnpmgr/event.c b/base/services/umpnpmgr/event.c index d9ae579cad2..5340431c005 100644 --- a/base/services/umpnpmgr/event.c +++ b/base/services/umpnpmgr/event.c @@ -42,34 +42,9 @@ ProcessTargetDeviceEvent( { RPC_STATUS RpcStatus; - if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_ENUMERATED, &RpcStatus)) - { - DeviceInstallParams* Params; - DWORD len; - DWORD DeviceIdLength; - - DPRINT("Device enumerated: %S\n", PnpEvent->TargetDevice.DeviceIds); + DPRINT("ProcessTargetDeviceEvent(%p)\n", PnpEvent); - DeviceIdLength = lstrlenW(PnpEvent->TargetDevice.DeviceIds); - if (DeviceIdLength) - { - /* Allocate a new device-install event */ - len = FIELD_OFFSET(DeviceInstallParams, DeviceIds) + (DeviceIdLength + 1) * sizeof(WCHAR); - Params = HeapAlloc(GetProcessHeap(), 0, len); - if (Params) - { - wcscpy(Params->DeviceIds, PnpEvent->TargetDevice.DeviceIds); - - /* Queue the event (will be dequeued by DeviceInstallThread) */ - WaitForSingleObject(hDeviceInstallListMutex, INFINITE); - InsertTailList(&DeviceInstallListHead, &Params->ListEntry); - ReleaseMutex(hDeviceInstallListMutex); - - SetEvent(hDeviceInstallListNotEmpty); - } - } - } - else if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_ARRIVAL, &RpcStatus)) + if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_ARRIVAL, &RpcStatus)) { // DWORD dwRecipient; @@ -143,8 +118,8 @@ VOID ProcessDeviceClassChangeEvent( _In_ PPLUGPLAY_EVENT_BLOCK PnpEvent) { - DPRINT("DeviceClassChangeEvent: %S\n", PnpEvent->DeviceClass.SymbolicLinkName); - + DPRINT("ProcessDeviceClassChangeEvent(%p)\n", PnpEvent); + DPRINT("SymbolicLink: %S\n", PnpEvent->DeviceClass.SymbolicLinkName); DPRINT("ClassGuid: {%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}\n", PnpEvent->DeviceClass.ClassGuid.Data1, PnpEvent->DeviceClass.ClassGuid.Data2, PnpEvent->DeviceClass.ClassGuid.Data3, PnpEvent->DeviceClass.ClassGuid.Data4[0], PnpEvent->DeviceClass.ClassGuid.Data4[1], PnpEvent->DeviceClass.ClassGuid.Data4[2], @@ -153,6 +128,39 @@ ProcessDeviceClassChangeEvent( } +static +VOID +ProcessDeviceInstallEvent( + _In_ PPLUGPLAY_EVENT_BLOCK PnpEvent) +{ + DeviceInstallParams* Params; + DWORD len; + DWORD DeviceIdLength; + + DPRINT("ProcessDeviceInstallEvent(%p)\n", PnpEvent); + DPRINT("Device enumerated: %S\n", PnpEvent->InstallDevice.DeviceId); + + DeviceIdLength = lstrlenW(PnpEvent->InstallDevice.DeviceId); + if (DeviceIdLength) + { + /* Allocate a new device-install event */ + len = FIELD_OFFSET(DeviceInstallParams, DeviceIds) + (DeviceIdLength + 1) * sizeof(WCHAR); + Params = HeapAlloc(GetProcessHeap(), 0, len); + if (Params) + { + wcscpy(Params->DeviceIds, PnpEvent->InstallDevice.DeviceId); + + /* Queue the event (will be dequeued by DeviceInstallThread) */ + WaitForSingleObject(hDeviceInstallListMutex, INFINITE); + InsertTailList(&DeviceInstallListHead, &Params->ListEntry); + ReleaseMutex(hDeviceInstallListMutex); + + SetEvent(hDeviceInstallListNotEmpty); + } + } +} + + DWORD WINAPI PnpEventThread( @@ -213,7 +221,11 @@ PnpEventThread( break; // case CustomDeviceEvent: -// case DeviceInstallEvent: + + case DeviceInstallEvent: + ProcessDeviceInstallEvent(PnpEvent); + break; + // case DeviceArrivalEvent: // case PowerEvent: // case VetoEvent: diff --git a/ntoskrnl/include/internal/io.h b/ntoskrnl/include/internal/io.h index 54a21832815..a349b48582d 100644 --- a/ntoskrnl/include/internal/io.h +++ b/ntoskrnl/include/internal/io.h @@ -676,9 +676,13 @@ IopQueueDeviceChangeEvent( NTSTATUS IopQueueTargetDeviceEvent( - const GUID *Guid, - PUNICODE_STRING DeviceIds -); + _In_ const GUID *Guid, + _In_ PUNICODE_STRING DeviceIds); + +NTSTATUS +IopQueueDeviceInstallEvent( + _In_ const GUID *Guid, + _In_ PUNICODE_STRING DeviceId); NTSTATUS NTAPI diff --git a/ntoskrnl/io/pnpmgr/devaction.c b/ntoskrnl/io/pnpmgr/devaction.c index 8b133ef80f4..94e384fac13 100644 --- a/ntoskrnl/io/pnpmgr/devaction.c +++ b/ntoskrnl/io/pnpmgr/devaction.c @@ -1331,8 +1331,8 @@ PiInitializeDevNode( if (!IopDeviceNodeHasFlag(DeviceNode, DNF_LEGACY_DRIVER)) { /* Report the device to the user-mode pnp manager */ - IopQueueTargetDeviceEvent(&GUID_DEVICE_ENUMERATED, - &DeviceNode->InstancePath); + IopQueueDeviceInstallEvent(&GUID_DEVICE_ENUMERATED, + &DeviceNode->InstancePath); } return STATUS_SUCCESS; @@ -2580,6 +2580,10 @@ PipDeviceActionWorker( case PiActionResetDevice: // TODO: the operation is a no-op for everything except removed nodes // for removed nodes, it returns them back to DeviceNodeUninitialized + if (deviceNode->State == DeviceNodeRemoved) + { + deviceNode->State = DeviceNodeUninitialized; + } status = STATUS_SUCCESS; break; diff --git a/ntoskrnl/io/pnpmgr/plugplay.c b/ntoskrnl/io/pnpmgr/plugplay.c index 3b01ed06a1c..63556d0099b 100644 --- a/ntoskrnl/io/pnpmgr/plugplay.c +++ b/ntoskrnl/io/pnpmgr/plugplay.c @@ -93,6 +93,46 @@ IopQueueDeviceChangeEvent( return STATUS_SUCCESS; } +NTSTATUS +IopQueueDeviceInstallEvent( + _In_ const GUID *EventGuid, + _In_ PUNICODE_STRING DeviceId) +{ + PPNP_EVENT_ENTRY EventEntry; + UNICODE_STRING Copy; + ULONG TotalSize; + + /* Allocate a big enough buffer */ + Copy.Length = 0; + Copy.MaximumLength = DeviceId->Length + sizeof(UNICODE_NULL); + TotalSize = + FIELD_OFFSET(PLUGPLAY_EVENT_BLOCK, InstallDevice.DeviceId) + + Copy.MaximumLength; + + EventEntry = ExAllocatePool(NonPagedPool, + TotalSize + FIELD_OFFSET(PNP_EVENT_ENTRY, Event)); + if (!EventEntry) + return STATUS_INSUFFICIENT_RESOURCES; + RtlZeroMemory(EventEntry, TotalSize + FIELD_OFFSET(PNP_EVENT_ENTRY, Event)); + + /* Fill the buffer with the event GUID */ + RtlCopyMemory(&EventEntry->Event.EventGuid, EventGuid, sizeof(GUID)); + EventEntry->Event.EventCategory = DeviceInstallEvent; + EventEntry->Event.TotalSize = TotalSize; + + /* Fill the symbolic link name */ + RtlCopyMemory(&EventEntry->Event.InstallDevice.DeviceId, + DeviceId->Buffer, DeviceId->Length); + EventEntry->Event.InstallDevice.DeviceId[DeviceId->Length / sizeof(WCHAR)] = UNICODE_NULL; + + InsertHeadList(&IopPnpEventQueueHead, &EventEntry->ListEntry); + + KeSetEvent(&IopPnpNotifyEvent, 0, FALSE); + + return STATUS_SUCCESS; +} + + NTSTATUS IopQueueTargetDeviceEvent(const GUID *Guid, PUNICODE_STRING DeviceIds) @@ -331,7 +371,8 @@ PiControlInitializeDevice( /* Insert as a root enumerated device node */ PiInsertDevNode(DeviceNode, IopRootDeviceNode); - IopQueueTargetDeviceEvent(&GUID_DEVICE_ENUMERATED, &DeviceInstance); + /* Report the device to the user-mode pnp manager */ + IopQueueDeviceInstallEvent(&GUID_DEVICE_ENUMERATED, &DeviceNode->InstancePath); ZwClose(InstanceKey); done:
1 year
1
0
0
0
[reactos] 01/01: [UMPNPMGR] Split the notification code by event category
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=30b9be047f9679b7443f6…
commit 30b9be047f9679b7443f678f62806cc29f36c9ca Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Sun Dec 3 11:08:57 2023 +0100 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Sun Dec 3 11:08:57 2023 +0100 [UMPNPMGR] Split the notification code by event category - Move the TargetDeviceChangeEvent code into a separate function. - Add a new function for the DeviceClassChangeEvent category. --- base/services/umpnpmgr/event.c | 229 +++++++++++++++++++++++++---------------- 1 file changed, 139 insertions(+), 90 deletions(-) diff --git a/base/services/umpnpmgr/event.c b/base/services/umpnpmgr/event.c index 678022de61b..d9ae579cad2 100644 --- a/base/services/umpnpmgr/event.c +++ b/base/services/umpnpmgr/event.c @@ -35,13 +35,132 @@ /* FUNCTIONS *****************************************************************/ -DWORD WINAPI -PnpEventThread(LPVOID lpParameter) +static +VOID +ProcessTargetDeviceEvent( + _In_ PPLUGPLAY_EVENT_BLOCK PnpEvent) +{ + RPC_STATUS RpcStatus; + + if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_ENUMERATED, &RpcStatus)) + { + DeviceInstallParams* Params; + DWORD len; + DWORD DeviceIdLength; + + DPRINT("Device enumerated: %S\n", PnpEvent->TargetDevice.DeviceIds); + + DeviceIdLength = lstrlenW(PnpEvent->TargetDevice.DeviceIds); + if (DeviceIdLength) + { + /* Allocate a new device-install event */ + len = FIELD_OFFSET(DeviceInstallParams, DeviceIds) + (DeviceIdLength + 1) * sizeof(WCHAR); + Params = HeapAlloc(GetProcessHeap(), 0, len); + if (Params) + { + wcscpy(Params->DeviceIds, PnpEvent->TargetDevice.DeviceIds); + + /* Queue the event (will be dequeued by DeviceInstallThread) */ + WaitForSingleObject(hDeviceInstallListMutex, INFINITE); + InsertTailList(&DeviceInstallListHead, &Params->ListEntry); + ReleaseMutex(hDeviceInstallListMutex); + + SetEvent(hDeviceInstallListNotEmpty); + } + } + } + else if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_ARRIVAL, &RpcStatus)) + { +// DWORD dwRecipient; + + DPRINT("Device arrival: %S\n", PnpEvent->TargetDevice.DeviceIds); + +// dwRecipient = BSM_ALLDESKTOPS | BSM_APPLICATIONS; +// BroadcastSystemMessageW(BSF_POSTMESSAGE, +// &dwRecipient, +// WM_DEVICECHANGE, +// DBT_DEVNODES_CHANGED, +// 0); + SendMessageW(HWND_BROADCAST, WM_DEVICECHANGE, DBT_DEVNODES_CHANGED, 0); + } + else if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_EJECT_VETOED, &RpcStatus)) + { + DPRINT1("Eject vetoed: %S\n", PnpEvent->TargetDevice.DeviceIds); + } + else if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_KERNEL_INITIATED_EJECT, &RpcStatus)) + { + DPRINT1("Kernel initiated eject: %S\n", PnpEvent->TargetDevice.DeviceIds); + } + else if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_SAFE_REMOVAL, &RpcStatus)) + { +// DWORD dwRecipient; + + DPRINT1("Safe removal: %S\n", PnpEvent->TargetDevice.DeviceIds); + +// dwRecipient = BSM_ALLDESKTOPS | BSM_APPLICATIONS; +// BroadcastSystemMessageW(BSF_POSTMESSAGE, +// &dwRecipient, +// WM_DEVICECHANGE, +// DBT_DEVNODES_CHANGED, +// 0); + SendMessageW(HWND_BROADCAST, WM_DEVICECHANGE, DBT_DEVNODES_CHANGED, 0); + } + else if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_SURPRISE_REMOVAL, &RpcStatus)) + { +// DWORD dwRecipient; + + DPRINT1("Surprise removal: %S\n", PnpEvent->TargetDevice.DeviceIds); + +// dwRecipient = BSM_ALLDESKTOPS | BSM_APPLICATIONS; +// BroadcastSystemMessageW(BSF_POSTMESSAGE, +// &dwRecipient, +// WM_DEVICECHANGE, +// DBT_DEVNODES_CHANGED, +// 0); + SendMessageW(HWND_BROADCAST, WM_DEVICECHANGE, DBT_DEVNODES_CHANGED, 0); + } + else if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_REMOVAL_VETOED, &RpcStatus)) + { + DPRINT1("Removal vetoed: %S\n", PnpEvent->TargetDevice.DeviceIds); + } + else if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_REMOVE_PENDING, &RpcStatus)) + { + DPRINT1("Removal pending: %S\n", PnpEvent->TargetDevice.DeviceIds); + } + else + { + DPRINT1("Unknown event, GUID {%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}\n", + PnpEvent->EventGuid.Data1, PnpEvent->EventGuid.Data2, PnpEvent->EventGuid.Data3, + PnpEvent->EventGuid.Data4[0], PnpEvent->EventGuid.Data4[1], PnpEvent->EventGuid.Data4[2], + PnpEvent->EventGuid.Data4[3], PnpEvent->EventGuid.Data4[4], PnpEvent->EventGuid.Data4[5], + PnpEvent->EventGuid.Data4[6], PnpEvent->EventGuid.Data4[7]); + } +} + + +static +VOID +ProcessDeviceClassChangeEvent( + _In_ PPLUGPLAY_EVENT_BLOCK PnpEvent) +{ + DPRINT("DeviceClassChangeEvent: %S\n", PnpEvent->DeviceClass.SymbolicLinkName); + + DPRINT("ClassGuid: {%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}\n", + PnpEvent->DeviceClass.ClassGuid.Data1, PnpEvent->DeviceClass.ClassGuid.Data2, PnpEvent->DeviceClass.ClassGuid.Data3, + PnpEvent->DeviceClass.ClassGuid.Data4[0], PnpEvent->DeviceClass.ClassGuid.Data4[1], PnpEvent->DeviceClass.ClassGuid.Data4[2], + PnpEvent->DeviceClass.ClassGuid.Data4[3], PnpEvent->DeviceClass.ClassGuid.Data4[4], PnpEvent->DeviceClass.ClassGuid.Data4[5], + PnpEvent->DeviceClass.ClassGuid.Data4[6], PnpEvent->DeviceClass.ClassGuid.Data4[7]); +} + + +DWORD +WINAPI +PnpEventThread( + _In_ LPVOID lpParameter) { PLUGPLAY_CONTROL_USER_RESPONSE_DATA ResponseData = {0, 0, 0, 0}; DWORD dwRet = ERROR_SUCCESS; NTSTATUS Status; - RPC_STATUS RpcStatus; PPLUGPLAY_EVENT_BLOCK PnpEvent, NewPnpEvent; ULONG PnpEventSize; @@ -81,98 +200,28 @@ PnpEventThread(LPVOID lpParameter) /* Process the PnP event */ DPRINT("Received PnP Event\n"); - if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_ENUMERATED, &RpcStatus)) - { - DeviceInstallParams* Params; - DWORD len; - DWORD DeviceIdLength; - - DPRINT("Device enumerated: %S\n", PnpEvent->TargetDevice.DeviceIds); - - DeviceIdLength = lstrlenW(PnpEvent->TargetDevice.DeviceIds); - if (DeviceIdLength) - { - /* Allocate a new device-install event */ - len = FIELD_OFFSET(DeviceInstallParams, DeviceIds) + (DeviceIdLength + 1) * sizeof(WCHAR); - Params = HeapAlloc(GetProcessHeap(), 0, len); - if (Params) - { - wcscpy(Params->DeviceIds, PnpEvent->TargetDevice.DeviceIds); - - /* Queue the event (will be dequeued by DeviceInstallThread) */ - WaitForSingleObject(hDeviceInstallListMutex, INFINITE); - InsertTailList(&DeviceInstallListHead, &Params->ListEntry); - ReleaseMutex(hDeviceInstallListMutex); - - SetEvent(hDeviceInstallListNotEmpty); - } - } - } - else if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_ARRIVAL, &RpcStatus)) - { -// DWORD dwRecipient; - - DPRINT("Device arrival: %S\n", PnpEvent->TargetDevice.DeviceIds); - -// dwRecipient = BSM_ALLDESKTOPS | BSM_APPLICATIONS; -// BroadcastSystemMessageW(BSF_POSTMESSAGE, -// &dwRecipient, -// WM_DEVICECHANGE, -// DBT_DEVNODES_CHANGED, -// 0); - SendMessageW(HWND_BROADCAST, WM_DEVICECHANGE, DBT_DEVNODES_CHANGED, 0); - } - else if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_EJECT_VETOED, &RpcStatus)) + switch (PnpEvent->EventCategory) { - DPRINT1("Eject vetoed: %S\n", PnpEvent->TargetDevice.DeviceIds); - } - else if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_KERNEL_INITIATED_EJECT, &RpcStatus)) - { - DPRINT1("Kernel initiated eject: %S\n", PnpEvent->TargetDevice.DeviceIds); - } - else if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_SAFE_REMOVAL, &RpcStatus)) - { -// DWORD dwRecipient; +// case HardwareProfileChangeEvent: - DPRINT1("Safe removal: %S\n", PnpEvent->TargetDevice.DeviceIds); + case TargetDeviceChangeEvent: + ProcessTargetDeviceEvent(PnpEvent); + break; -// dwRecipient = BSM_ALLDESKTOPS | BSM_APPLICATIONS; -// BroadcastSystemMessageW(BSF_POSTMESSAGE, -// &dwRecipient, -// WM_DEVICECHANGE, -// DBT_DEVNODES_CHANGED, -// 0); - SendMessageW(HWND_BROADCAST, WM_DEVICECHANGE, DBT_DEVNODES_CHANGED, 0); - } - else if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_SURPRISE_REMOVAL, &RpcStatus)) - { -// DWORD dwRecipient; + case DeviceClassChangeEvent: + ProcessDeviceClassChangeEvent(PnpEvent); + break; - DPRINT1("Surprise removal: %S\n", PnpEvent->TargetDevice.DeviceIds); +// case CustomDeviceEvent: +// case DeviceInstallEvent: +// case DeviceArrivalEvent: +// case PowerEvent: +// case VetoEvent: +// case BlockedDriverEvent: -// dwRecipient = BSM_ALLDESKTOPS | BSM_APPLICATIONS; -// BroadcastSystemMessageW(BSF_POSTMESSAGE, -// &dwRecipient, -// WM_DEVICECHANGE, -// DBT_DEVNODES_CHANGED, -// 0); - SendMessageW(HWND_BROADCAST, WM_DEVICECHANGE, DBT_DEVNODES_CHANGED, 0); - } - else if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_REMOVAL_VETOED, &RpcStatus)) - { - DPRINT1("Removal vetoed: %S\n", PnpEvent->TargetDevice.DeviceIds); - } - else if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_REMOVE_PENDING, &RpcStatus)) - { - DPRINT1("Removal pending: %S\n", PnpEvent->TargetDevice.DeviceIds); - } - else - { - DPRINT1("Unknown event, GUID {%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}\n", - PnpEvent->EventGuid.Data1, PnpEvent->EventGuid.Data2, PnpEvent->EventGuid.Data3, - PnpEvent->EventGuid.Data4[0], PnpEvent->EventGuid.Data4[1], PnpEvent->EventGuid.Data4[2], - PnpEvent->EventGuid.Data4[3], PnpEvent->EventGuid.Data4[4], PnpEvent->EventGuid.Data4[5], - PnpEvent->EventGuid.Data4[6], PnpEvent->EventGuid.Data4[7]); + default: + DPRINT1("Unsupported Event Category: %lu\n", PnpEvent->EventCategory); + break; } /* Dequeue the current PnP event and signal the next one */
1 year
1
0
0
0
[reactos] 01/01: [IMM32][SDK][NTUSER] Implement ImmProcessKey for Cicero (#6106)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=75cf6920bc62f70dc481b…
commit 75cf6920bc62f70dc481be5f5d0e63e18cfafd81 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sun Dec 3 17:33:22 2023 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sun Dec 3 17:33:22 2023 +0900 [IMM32][SDK][NTUSER] Implement ImmProcessKey for Cicero (#6106) Complete CTF IMM. - Add CtfImeProcessCicHotkey and CtfImeSetActiveContextAlways to access CTF IMEs. - Check whether Cicero is started in the current thread in ImmProcessKey. - Call CtfImeProcessCicHotkey if necessary in ImmProcessKey. - Modify <CtfImeTable.h>. - Add CI_CICERO_STARTED flag to "ntuser.h". - Fix Imm32JCloseOpen. CORE-19268 --- dll/win32/imm32/ctf.c | 106 +++++++++++++++++++++++++++++- dll/win32/imm32/imm.c | 9 +-- dll/win32/imm32/keymsg.c | 134 +++++++++++--------------------------- dll/win32/imm32/precomp.h | 18 +++++ sdk/include/reactos/CtfImeTable.h | 4 +- win32ss/include/ntuser.h | 1 + 6 files changed, 163 insertions(+), 109 deletions(-) diff --git a/dll/win32/imm32/ctf.c b/dll/win32/imm32/ctf.c index 23e4b41c3ed..f4463cc67f1 100644 --- a/dll/win32/imm32/ctf.c +++ b/dll/win32/imm32/ctf.c @@ -738,6 +738,20 @@ CtfImeCreateThreadMgr(VOID) return CTF_IME_FN(CtfImeCreateThreadMgr)(); } +/*********************************************************************** + * This function calls the same name function of the CTF IME side. + */ +BOOL +CtfImeProcessCicHotkey(_In_ HIMC hIMC, _In_ UINT vKey, _In_ LPARAM lParam) +{ + TRACE("(%p, %u, %p)\n", hIMC, vKey, lParam); + + if (!Imm32LoadCtfIme()) + return FALSE; + + return CTF_IME_FN(CtfImeProcessCicHotkey)(hIMC, vKey, lParam); +} + /*********************************************************************** * This function calls the same name function of the CTF IME side. */ @@ -775,7 +789,7 @@ BOOL WINAPI CtfImmIsCiceroStartedInThread(VOID) { TRACE("()\n"); - return !!(GetWin32ClientInfo()->CI_flags & 0x200); + return !!(GetWin32ClientInfo()->CI_flags & CI_CICERO_STARTED); } /*********************************************************************** @@ -785,9 +799,9 @@ VOID WINAPI CtfImmSetCiceroStartInThread(_In_ BOOL bStarted) { TRACE("(%d)\n", bStarted); if (bStarted) - GetWin32ClientInfo()->CI_flags |= 0x200; + GetWin32ClientInfo()->CI_flags |= CI_CICERO_STARTED; else - GetWin32ClientInfo()->CI_flags &= ~0x200; + GetWin32ClientInfo()->CI_flags &= ~CI_CICERO_STARTED; } /*********************************************************************** @@ -832,6 +846,24 @@ CtfImeDestroyInputContext(_In_ HIMC hIMC) return CTF_IME_FN(CtfImeDestroyInputContext)(hIMC); } +/*********************************************************************** + * This function calls the same name function of the CTF IME side. + */ +HRESULT +CtfImeSetActiveContextAlways( + _In_ HIMC hIMC, + _In_ BOOL fActive, + _In_ HWND hWnd, + _In_ HKL hKL) +{ + TRACE("(%p, %d, %p, %p)\n", hIMC, fActive, hWnd, hKL); + + if (!Imm32LoadCtfIme()) + return E_FAIL; + + return CTF_IME_FN(CtfImeSetActiveContextAlways)(hIMC, fActive, hWnd, hKL); +} + /*********************************************************************** * The callback function to activate CTF IMEs. Used in CtfAImmActivate. */ @@ -1173,6 +1205,74 @@ CtfImmTIMActivate(_In_ HKL hKL) return hr; } +/*********************************************************************** + * Setting language band + */ + +typedef struct IMM_DELAY_SET_LANG_BAND +{ + HWND hWnd; + BOOL fSet; +} IMM_DELAY_SET_LANG_BAND, *PIMM_DELAY_SET_LANG_BAND; + +/* Sends a message to set the language band with delay. */ +static DWORD APIENTRY Imm32DelaySetLangBandProc(LPVOID arg) +{ + HWND hwndDefIME; + WPARAM wParam; + DWORD_PTR lResult; + PIMM_DELAY_SET_LANG_BAND pSetBand = arg; + + Sleep(3000); /* Delay 3 seconds! */ + + hwndDefIME = ImmGetDefaultIMEWnd(pSetBand->hWnd); + if (hwndDefIME) + { + wParam = (pSetBand->fSet ? IMS_SETLANGBAND : IMS_UNSETLANGBAND); + SendMessageTimeoutW(hwndDefIME, WM_IME_SYSTEM, wParam, (LPARAM)pSetBand->hWnd, + SMTO_BLOCK | SMTO_ABORTIFHUNG, 5000, &lResult); + } + ImmLocalFree(pSetBand); + return FALSE; +} + +/* Updates the language band. */ +LRESULT +CtfImmSetLangBand( + _In_ HWND hWnd, + _In_ BOOL fSet) +{ + HANDLE hThread; + PWND pWnd = NULL; + PIMM_DELAY_SET_LANG_BAND pSetBand; + DWORD_PTR lResult = 0; + + if (hWnd && gpsi) + pWnd = ValidateHwndNoErr(hWnd); + + if (IS_NULL_UNEXPECTEDLY(pWnd)) + return 0; + + if (pWnd->state2 & WNDS2_WMCREATEMSGPROCESSED) + { + SendMessageTimeoutW(hWnd, WM_USER + 0x105, 0, fSet, SMTO_BLOCK | SMTO_ABORTIFHUNG, + 5000, &lResult); + return lResult; + } + + pSetBand = ImmLocalAlloc(0, sizeof(IMM_DELAY_SET_LANG_BAND)); + if (IS_NULL_UNEXPECTEDLY(pSetBand)) + return 0; + + pSetBand->hWnd = hWnd; + pSetBand->fSet = fSet; + + hThread = CreateThread(NULL, 0, Imm32DelaySetLangBandProc, pSetBand, 0, NULL); + if (hThread) + CloseHandle(hThread); + return 0; +} + /*********************************************************************** * CtfImmGenerateMessage (IMM32.@) */ diff --git a/dll/win32/imm32/imm.c b/dll/win32/imm32/imm.c index 3ea5bae50ea..aa81c0935bd 100644 --- a/dll/win32/imm32/imm.c +++ b/dll/win32/imm32/imm.c @@ -183,7 +183,6 @@ Retry: return TRUE; } -// Win: SelectInputContext VOID APIENTRY Imm32SelectInputContext(HKL hNewKL, HKL hOldKL, HIMC hIMC) { PCLIENTIMC pClientImc; @@ -490,12 +489,6 @@ BOOL WINAPI ImmActivateLayout(HKL hKL) return TRUE; } -/* Win: Internal_CtfImeSetActiveContextAlways */ -static VOID APIENTRY Imm32CiceroSetActiveContext(HIMC hIMC, BOOL fActive, HWND hWnd, HKL hKL) -{ - TRACE("We have to do something\n"); -} - /*********************************************************************** * ImmAssociateContext (IMM32.@) */ @@ -1196,7 +1189,7 @@ BOOL WINAPI ImmSetActiveContext(HWND hWnd, HIMC hIMC, BOOL fActive) hKL = GetKeyboardLayout(0); if (IS_CICERO_MODE() && !IS_16BIT_MODE()) { - Imm32CiceroSetActiveContext(hIMC, fActive, hWnd, hKL); + CtfImeSetActiveContextAlways(hIMC, fActive, hWnd, hKL); hKL = GetKeyboardLayout(0); } diff --git a/dll/win32/imm32/keymsg.c b/dll/win32/imm32/keymsg.c index 4131b751071..f1dd211b607 100644 --- a/dll/win32/imm32/keymsg.c +++ b/dll/win32/imm32/keymsg.c @@ -158,7 +158,6 @@ BOOL APIENTRY Imm32CSymbolToggle(HIMC hIMC, HKL hKL, HWND hWnd) } /* Open or close Japanese IME */ -/* Win: JCloseOpen */ BOOL APIENTRY Imm32JCloseOpen(HIMC hIMC, HKL hKL, HWND hWnd) { BOOL fOpen; @@ -177,7 +176,7 @@ BOOL APIENTRY Imm32JCloseOpen(HIMC hIMC, HKL hKL, HWND hWnd) pIC = (LPINPUTCONTEXTDX)ImmLockIMC(hIMC); if (pIC) { - pIC->dwChange |= INPUTCONTEXTDX_CHANGE_OPEN; /* Notify open change */ + pIC->dwChange |= INPUTCONTEXTDX_CHANGE_FORCE_OPEN; ImmUnlockIMC(hIMC); } } @@ -331,85 +330,23 @@ ImmIsUIMessageAW(HWND hWndIME, UINT msg, WPARAM wParam, LPARAM lParam, BOOL bAns return TRUE; } -typedef struct IMM_DELAY_SET_LANG_BAND -{ - HWND hWnd; - BOOL fSet; -} IMM_DELAY_SET_LANG_BAND, *PIMM_DELAY_SET_LANG_BAND; - -/* Sends a message to set the language band with delay. */ -/* Win: DelaySetLangBand */ -static DWORD APIENTRY Imm32DelaySetLangBandProc(LPVOID arg) -{ - HWND hwndDefIME; - WPARAM wParam; - DWORD_PTR lResult; - PIMM_DELAY_SET_LANG_BAND pSetBand = arg; - - Sleep(3000); /* Delay 3 seconds! */ - - hwndDefIME = ImmGetDefaultIMEWnd(pSetBand->hWnd); - if (hwndDefIME) - { - wParam = (pSetBand->fSet ? IMS_SETLANGBAND : IMS_UNSETLANGBAND); - SendMessageTimeoutW(hwndDefIME, WM_IME_SYSTEM, wParam, (LPARAM)pSetBand->hWnd, - SMTO_BLOCK | SMTO_ABORTIFHUNG, 5000, &lResult); - } - ImmLocalFree(pSetBand); - return FALSE; -} - -/* Updates the language band. */ -/* Win: CtfImmSetLangBand */ -LRESULT APIENTRY CtfImmSetLangBand(HWND hWnd, BOOL fSet) -{ - HANDLE hThread; - PWND pWnd = NULL; - PIMM_DELAY_SET_LANG_BAND pSetBand; - DWORD_PTR lResult = 0; - - if (hWnd && gpsi) - pWnd = ValidateHwndNoErr(hWnd); - - if (IS_NULL_UNEXPECTEDLY(pWnd)) - return 0; - - if (pWnd->state2 & WNDS2_WMCREATEMSGPROCESSED) - { - SendMessageTimeoutW(hWnd, WM_USER + 0x105, 0, fSet, SMTO_BLOCK | SMTO_ABORTIFHUNG, - 5000, &lResult); - return lResult; - } - - pSetBand = ImmLocalAlloc(0, sizeof(IMM_DELAY_SET_LANG_BAND)); - if (IS_NULL_UNEXPECTEDLY(pSetBand)) - return 0; - - pSetBand->hWnd = hWnd; - pSetBand->fSet = fSet; - - hThread = CreateThread(NULL, 0, Imm32DelaySetLangBandProc, pSetBand, 0, NULL); - if (hThread) - CloseHandle(hThread); - return 0; -} - -/* Win: SendNotificationProc */ -static BOOL CALLBACK Imm32SendNotificationProc(HIMC hIMC, LPARAM lParam) +static BOOL CALLBACK +Imm32SendNotificationProc( + _In_ HIMC hIMC, + _In_ LPARAM lParam) { HWND hWnd; LPINPUTCONTEXTDX pIC; + UNREFERENCED_PARAMETER(lParam); + pIC = (LPINPUTCONTEXTDX)ImmLockIMC(hIMC); if (IS_NULL_UNEXPECTEDLY(pIC)) return TRUE; hWnd = pIC->hWnd; - if (hWnd == NULL || !IsWindow(hWnd)) - { - ERR("\n"); + if (!IsWindow(hWnd)) goto Quit; - } TRACE("dwChange: 0x%08X\n", pIC->dwChange); @@ -427,7 +364,6 @@ Quit: return TRUE; } -/* Win: ImmSendNotification */ BOOL APIENTRY Imm32SendNotification(BOOL bProcess) { return ImmEnumInputContext((bProcess ? -1 : 0), Imm32SendNotificationProc, 0); @@ -783,11 +719,11 @@ ImmProcessKey(HWND hWnd, HKL hKL, UINT vKey, LPARAM lParam, DWORD dwHotKeyID) PIMEDPI pImeDpi; LPINPUTCONTEXTDX pIC; BYTE KeyState[256]; - UINT vk; - BOOL bUseIme = TRUE, bSkipThisKey = FALSE, bLowWordOnly = FALSE; + BOOL bLowWordOnly = FALSE, bSkipThisKey = FALSE, bHotKeyDone = TRUE; TRACE("(%p, %p, 0x%X, %p, 0x%lX)\n", hWnd, hKL, vKey, lParam, dwHotKeyID); + /* Process the key by the IME */ hIMC = ImmGetContext(hWnd); pImeDpi = ImmLockImeDpi(hKL); if (pImeDpi) @@ -795,7 +731,7 @@ ImmProcessKey(HWND hWnd, HKL hKL, UINT vKey, LPARAM lParam, DWORD dwHotKeyID) pIC = (LPINPUTCONTEXTDX)ImmLockIMC(hIMC); if (pIC) { - if (LOBYTE(vKey) == VK_PACKET && + if ((LOBYTE(vKey) == VK_PACKET) && !(pImeDpi->ImeInfo.fdwProperty & IME_PROP_ACCEPT_WIDE_VKEY)) { if (ImeDpi_IsUnicode(pImeDpi)) @@ -804,29 +740,23 @@ ImmProcessKey(HWND hWnd, HKL hKL, UINT vKey, LPARAM lParam, DWORD dwHotKeyID) } else { - bUseIme = FALSE; if (pIC->fOpen) - bSkipThisKey = TRUE; + ret |= IPHK_SKIPTHISKEY; + + bSkipThisKey = TRUE; } } - if (bUseIme) + if (!bSkipThisKey && GetKeyboardState(KeyState)) { - if (GetKeyboardState(KeyState)) + UINT vk = (bLowWordOnly ? LOWORD(vKey) : vKey); + if (pImeDpi->ImeProcessKey(hIMC, vk, lParam, KeyState)) { - vk = (bLowWordOnly ? LOWORD(vKey) : vKey); - if (pImeDpi->ImeProcessKey(hIMC, vk, lParam, KeyState)) - { - pIC->bNeedsTrans = TRUE; - pIC->nVKey = vKey; - ret |= IPHK_PROCESSBYIME; - } + pIC->bNeedsTrans = TRUE; + pIC->nVKey = vKey; + ret |= IPHK_PROCESSBYIME; } } - else if (bSkipThisKey) - { - ret |= IPHK_SKIPTHISKEY; - } ImmUnlockIMC(hIMC); } @@ -834,21 +764,32 @@ ImmProcessKey(HWND hWnd, HKL hKL, UINT vKey, LPARAM lParam, DWORD dwHotKeyID) ImmUnlockImeDpi(pImeDpi); } - if (dwHotKeyID != INVALID_HOTKEY_ID) /* Valid Hot-key */ + /* Process the hot-key if necessary */ + if (!CtfImmIsCiceroStartedInThread()) /* Not Cicero? */ + { + /* Process IMM IME hotkey */ + if ((dwHotKeyID == INVALID_HOTKEY_ID) || !Imm32ProcessHotKey(hWnd, hIMC, hKL, dwHotKeyID)) + bHotKeyDone = FALSE; + } + else if (!CtfImeProcessCicHotkey(hIMC, vKey, lParam)) /* CTF IME not processed the hotkey? */ { - if (Imm32ProcessHotKey(hWnd, hIMC, hKL, dwHotKeyID)) + /* Process IMM IME hotkey */ + if (!IS_IME_HKL(hKL) || + ((dwHotKeyID == INVALID_HOTKEY_ID) || !Imm32ProcessHotKey(hWnd, hIMC, hKL, dwHotKeyID))) { - if (vKey != VK_KANJI || dwHotKeyID != IME_JHOTKEY_CLOSE_OPEN) - ret |= IPHK_HOTKEY; + bHotKeyDone = FALSE; } } + if (bHotKeyDone && ((vKey != VK_KANJI) || (dwHotKeyID != IME_JHOTKEY_CLOSE_OPEN))) + ret |= IPHK_HOTKEY; + if ((ret & IPHK_PROCESSBYIME) && (ImmGetAppCompatFlags(hIMC) & 0x10000)) { /* The key has been processed by IME's ImeProcessKey */ LANGID wLangID = LANGIDFROMLCID(GetSystemDefaultLCID()); - if (PRIMARYLANGID(wLangID) == LANG_KOREAN && - (vKey == VK_PROCESSKEY || (ret & IPHK_HOTKEY))) + if ((PRIMARYLANGID(wLangID) == LANG_KOREAN) && + ((vKey == VK_PROCESSKEY) || (ret & IPHK_HOTKEY))) { /* Korean don't want VK_PROCESSKEY and IME hot-keys */ } @@ -856,6 +797,7 @@ ImmProcessKey(HWND hWnd, HKL hKL, UINT vKey, LPARAM lParam, DWORD dwHotKeyID) { /* Add WM_KEYDOWN:VK_PROCESSKEY message */ ImmTranslateMessage(hWnd, WM_KEYDOWN, VK_PROCESSKEY, lParam); + ret &= ~IPHK_PROCESSBYIME; ret |= IPHK_SKIPTHISKEY; } diff --git a/dll/win32/imm32/precomp.h b/dll/win32/imm32/precomp.h index 3f667d1d6f5..cb87f48890c 100644 --- a/dll/win32/imm32/precomp.h +++ b/dll/win32/imm32/precomp.h @@ -201,3 +201,21 @@ HRESULT CtfImmCoInitialize(VOID); HRESULT CtfImeCreateThreadMgr(VOID); HRESULT CtfImeDestroyThreadMgr(VOID); HRESULT Imm32ActivateOrDeactivateTIM(_In_ BOOL bCreate); + +HRESULT +CtfImeSetActiveContextAlways( + _In_ HIMC hIMC, + _In_ BOOL fActive, + _In_ HWND hWnd, + _In_ HKL hKL); + +BOOL +CtfImeProcessCicHotkey( + _In_ HIMC hIMC, + _In_ UINT vKey, + _In_ LPARAM lParam); + +LRESULT +CtfImmSetLangBand( + _In_ HWND hWnd, + _In_ BOOL fSet); diff --git a/sdk/include/reactos/CtfImeTable.h b/sdk/include/reactos/CtfImeTable.h index 14f701b6c46..99a208e6f42 100644 --- a/sdk/include/reactos/CtfImeTable.h +++ b/sdk/include/reactos/CtfImeTable.h @@ -12,7 +12,7 @@ DEFINE_CTF_IME_FN(CtfImeCreateThreadMgr, HRESULT, (VOID)) DEFINE_CTF_IME_FN(CtfImeDestroyThreadMgr, HRESULT, (VOID)) DEFINE_CTF_IME_FN(CtfImeCreateInputContext, HRESULT, (HIMC hIMC)) DEFINE_CTF_IME_FN(CtfImeDestroyInputContext, HRESULT, (HIMC hIMC)) -DEFINE_CTF_IME_FN(CtfImeSetActiveContextAlways, HRESULT, (DWORD dwFIXME1, DWORD dwFIXME2, DWORD dwFIXME3, DWORD dwFIXME4)) -DEFINE_CTF_IME_FN(CtfImeProcessCicHotkey, HRESULT, (DWORD dwFIXME1, DWORD dwFIXME2, DWORD dwFIXME3)) +DEFINE_CTF_IME_FN(CtfImeSetActiveContextAlways, HRESULT, (HIMC hIMC, BOOL fActive, HWND hWnd, HKL hKL)) +DEFINE_CTF_IME_FN(CtfImeProcessCicHotkey, HRESULT, (HIMC hIMC, UINT vKey, LPARAM lParam)) DEFINE_CTF_IME_FN(CtfImeDispatchDefImeMessage, LRESULT, (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)) DEFINE_CTF_IME_FN(CtfImeIsIME, BOOL, (HKL hKL)) diff --git a/win32ss/include/ntuser.h b/win32ss/include/ntuser.h index 2763b4b24cc..c5e08f83ac2 100644 --- a/win32ss/include/ntuser.h +++ b/win32ss/include/ntuser.h @@ -305,6 +305,7 @@ typedef struct _CALLBACKWND #define CI_IMMACTIVATE 0x00000040 /* IMM/IME (Asian input) */ #define CI_CTFCOINIT 0x00000080 /* Did CTF CoInitialize? */ #define CI_CTFTIM 0x00000100 /* CTF Thread Input Manager (TIM) */ +#define CI_CICERO_STARTED 0x00000200 /* Is Cicero started in the thread? */ #define CI_TSFDISABLED 0x00000400 /* TSF (Text Services Framework a.k.a. Cicero) */ #define CI_AIMMACTIVATED 0x00000800 /* Active IMM (AIMM) */
1 year
1
0
0
0
[reactos] 01/01: [HH] Check LoadLibrary and GetProcAddress return value (#6082)
by Thamatip Chitpong
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9ea2222967054bc086d6c…
commit 9ea2222967054bc086d6cf5f2b75935b13f2d60e Author: Thamatip Chitpong <thamatip.chitpong(a)reactos.org> AuthorDate: Sun Dec 3 08:15:08 2023 +0700 Commit: GitHub <noreply(a)github.com> CommitDate: Sun Dec 3 08:15:08 2023 +0700 [HH] Check LoadLibrary and GetProcAddress return value (#6082) Handle failure cases. --- base/applications/hh/main.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/base/applications/hh/main.c b/base/applications/hh/main.c index 3d06156167b..beb2882ee4e 100644 --- a/base/applications/hh/main.c +++ b/base/applications/hh/main.c @@ -15,11 +15,14 @@ WinMain(HINSTANCE hInst, int ret = -1; hModule = LoadLibraryA("hhctrl.ocx"); - doWinMain = (DOWINMAIN*) GetProcAddress(hModule, "doWinMain"); + if (hModule) + { + doWinMain = (DOWINMAIN*)GetProcAddress(hModule, "doWinMain"); + if (doWinMain) + ret = doWinMain(hInst, cmdline); - ret = doWinMain(hInst, cmdline); - - FreeLibrary(hModule); + FreeLibrary(hModule); + } return ret; }
1 year
1
0
0
0
[reactos] 01/01: [IMM32][SDK] Implement GetKeyboardLayoutCP (#6068)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d795021a750e92f320c3a…
commit d795021a750e92f320c3a07c73bfe3cbcc799567 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sun Dec 3 07:46:35 2023 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sun Dec 3 07:46:35 2023 +0900 [IMM32][SDK] Implement GetKeyboardLayoutCP (#6068) - Add IMM32!GetKeyboardLayoutCP function. - Add it to <imm32_undoc.h>. - Delete ImmDisableLegacyIME and ImmSendMessageToActiveDefImeWndW functions (2k3/xp IMM32 doesn't have such functions). - Modify imm32.spec. - Refer ntdll!RtlDllShutdownInProgress function (that is WinXP+). CORE-19268 --- dll/win32/imm32/ctf.c | 21 ++++----------------- dll/win32/imm32/ime.c | 9 --------- dll/win32/imm32/imm.c | 32 +++++++++++++++++++++++++++----- dll/win32/imm32/imm32.spec | 3 +-- dll/win32/imm32/keymsg.c | 18 ------------------ sdk/include/reactos/imm32_undoc.h | 2 ++ 6 files changed, 34 insertions(+), 51 deletions(-) diff --git a/dll/win32/imm32/ctf.c b/dll/win32/imm32/ctf.c index be1853f02c3..23e4b41c3ed 100644 --- a/dll/win32/imm32/ctf.c +++ b/dll/win32/imm32/ctf.c @@ -1,7 +1,7 @@ /* * PROJECT: ReactOS IMM32 * LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later
) - * PURPOSE: Implementing the IMM32 Cicero-aware Text Framework (CTF) + * PURPOSE: Implementing IMM CTF (Collaborative Translation Framework) * COPYRIGHT: Copyright 2022-2023 Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> */ @@ -11,11 +11,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(imm); -/* FIXME: Use RTL */ -static BOOL WINAPI RtlDllShutdownInProgress(VOID) -{ - return FALSE; -} +/* FIXME: Use proper header */ +BOOLEAN WINAPI RtlDllShutdownInProgress(VOID); static BOOL Imm32InsideLoaderLock(VOID) { @@ -201,17 +198,7 @@ VOID Imm32TF_InvalidAssemblyListCacheIfExist(VOID) } /*********************************************************************** - * CTF IME support - * - * TSF stands for "Text Services Framework". "Cicero" is the code name of TSF. - * CTF stands for "Cicero-aware Text Framework". - * - * Comparing with old-style IMM IME, the combination of CTF IME and TSF provides - * new-style and high-level input method. - * - * The CTF IME file is a DLL file that the software developer distributes. - * The export functions of the CTF IME file are defined in <CtfImeTable.h> of - * this folder. + * CTF (Collaborative Translation Framework) IME support */ /* "Active IMM" compatibility flags */ diff --git a/dll/win32/imm32/ime.c b/dll/win32/imm32/ime.c index 9268b66a0a7..a30b86af31b 100644 --- a/dll/win32/imm32/ime.c +++ b/dll/win32/imm32/ime.c @@ -925,15 +925,6 @@ BOOL WINAPI ImmNotifyIME(HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD dwValue return ret; } -/*********************************************************************** - * ImmDisableLegacyIME(IMM32.@) - */ -BOOL WINAPI ImmDisableLegacyIME(void) -{ - FIXME("stub\n"); - return TRUE; -} - /*********************************************************************** * ImmGetImeInfoEx (IMM32.@) */ diff --git a/dll/win32/imm32/imm.c b/dll/win32/imm32/imm.c index 5723fde1a59..3ea5bae50ea 100644 --- a/dll/win32/imm32/imm.c +++ b/dll/win32/imm32/imm.c @@ -14,13 +14,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(imm); -HMODULE ghImm32Inst = NULL; // Win: ghInst -PSERVERINFO gpsi = NULL; // Win: gpsi -SHAREDINFO gSharedInfo = { NULL }; // Win: gSharedInfo -BYTE gfImmInitialized = FALSE; // Win: gfInitialized +HMODULE ghImm32Inst = NULL; /* The IMM32 instance */ +PSERVERINFO gpsi = NULL; +SHAREDINFO gSharedInfo = { NULL }; +BYTE gfImmInitialized = FALSE; /* Is IMM32 initialized? */ ULONG_PTR gHighestUserAddress = 0; -// Win: ImmInitializeGlobals static BOOL APIENTRY ImmInitializeGlobals(HMODULE hMod) { NTSTATUS status; @@ -1257,6 +1256,29 @@ BOOL WINAPI ImmSetActiveContextConsoleIME(HWND hwnd, BOOL fFlag) return ImmSetActiveContext(hwnd, hIMC, fFlag); } +/*********************************************************************** + * GetKeyboardLayoutCP (IMM32.@) + */ +UINT WINAPI GetKeyboardLayoutCP(_In_ LANGID wLangId) +{ + WCHAR szText[8]; + static LANGID s_wKeyboardLangIdCache = 0; + static UINT s_uKeyboardLayoutCPCache = 0; + + TRACE("(%u)\n", wLangId); + + if (wLangId == s_wKeyboardLangIdCache) + return s_uKeyboardLayoutCPCache; + + if (!GetLocaleInfoW(wLangId, LOCALE_IDEFAULTANSICODEPAGE, szText, _countof(szText))) + return 0; + + s_wKeyboardLangIdCache = wLangId; + szText[_countof(szText) - 1] = UNICODE_NULL; /* Avoid buffer overrun */ + s_uKeyboardLayoutCPCache = wcstol(szText, NULL, 10); + return s_uKeyboardLayoutCPCache; +} + #ifndef NDEBUG VOID APIENTRY Imm32UnitTest(VOID) { diff --git a/dll/win32/imm32/imm32.spec b/dll/win32/imm32/imm32.spec index 2e84d6a143c..3bd4c297f44 100644 --- a/dll/win32/imm32/imm32.spec +++ b/dll/win32/imm32/imm32.spec @@ -17,6 +17,7 @@ @ stdcall CtfImmSetAppCompatFlags(long) @ stdcall CtfImmSetCiceroStartInThread(long) @ stdcall CtfImmTIMActivate(ptr) +@ stdcall GetKeyboardLayoutCP(long) @ stdcall ImmActivateLayout(ptr) @ stdcall ImmAssociateContext(ptr ptr) @ stdcall ImmAssociateContextEx(ptr ptr long) @@ -31,7 +32,6 @@ @ stdcall ImmDestroySoftKeyboard(ptr) @ stdcall ImmDisableIME(long) @ stdcall ImmDisableIme(long) ImmDisableIME -@ stdcall ImmDisableLegacyIME() @ stdcall ImmDisableTextFrameService(long) @ stdcall ImmEnumInputContext(long ptr long) @ stdcall ImmEnumRegisterWordA(long ptr str long str ptr) @@ -105,7 +105,6 @@ @ stdcall ImmRequestMessageW(ptr ptr ptr) @ stdcall ImmSendIMEMessageExA(ptr ptr) @ stdcall ImmSendIMEMessageExW(ptr ptr) -@ stdcall ImmSendMessageToActiveDefImeWndW(long ptr ptr) @ stdcall ImmSetActiveContext(ptr ptr long) @ stdcall ImmSetActiveContextConsoleIME(ptr long) @ stdcall ImmSetCandidateWindow(ptr ptr) diff --git a/dll/win32/imm32/keymsg.c b/dll/win32/imm32/keymsg.c index 3f2fb48be31..4131b751071 100644 --- a/dll/win32/imm32/keymsg.c +++ b/dll/win32/imm32/keymsg.c @@ -1184,24 +1184,6 @@ LRESULT WINAPI ImmRequestMessageW(HIMC hIMC, WPARAM wParam, LPARAM lParam) return ImmRequestMessageAW(hIMC, wParam, lParam, FALSE); } -/*********************************************************************** - * ImmSendMessageToActiveDefImeWndW (IMM32.@) - */ -LRESULT WINAPI -ImmSendMessageToActiveDefImeWndW(UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - HWND hwndIME; - - if (uMsg != WM_COPYDATA) - return 0; - - hwndIME = (HWND)NtUserQueryWindow((HWND)wParam, QUERY_WINDOW_DEFAULT_IME); - if (IS_NULL_UNEXPECTEDLY(hwndIME)) - return 0; - - return SendMessageW(hwndIME, uMsg, wParam, lParam); -} - /*********************************************************************** * ImmCallImeConsoleIME (IMM32.@) */ diff --git a/sdk/include/reactos/imm32_undoc.h b/sdk/include/reactos/imm32_undoc.h index 08be32a2dcd..75eb48f5692 100644 --- a/sdk/include/reactos/imm32_undoc.h +++ b/sdk/include/reactos/imm32_undoc.h @@ -11,6 +11,8 @@ extern "C" { #endif +UINT WINAPI GetKeyboardLayoutCP(_In_ LANGID wLangId); + BOOL WINAPI ImmGetImeInfoEx(PIMEINFOEX pImeInfoEx, IMEINFOEXCLASS SearchType, PVOID pvSearchKey);
1 year
1
0
0
0
[reactos] 01/01: [HAL] Implement IPI support functions
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=40b6b1dab3169b1a59473…
commit 40b6b1dab3169b1a59473bed06de9a9588f24d5b Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Sun Nov 26 17:32:27 2023 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Sun Dec 3 00:07:53 2023 +0200 [HAL] Implement IPI support functions --- hal/hal.spec | 4 +- hal/halx86/apic/apicp.h | 2 +- hal/halx86/apic/apicsmp.c | 177 +++++++++++++++++++++++++++++++++++++++++++-- hal/halx86/generic/up.c | 19 +++++ hal/halx86/include/smp.h | 38 ++++++++++ hal/halx86/smp/ipi.c | 24 ++++++ sdk/include/ndk/halfuncs.h | 17 +++++ 7 files changed, 270 insertions(+), 11 deletions(-) diff --git a/hal/hal.spec b/hal/hal.spec index 94bb141afee..2a3285e1c81 100644 --- a/hal/hal.spec +++ b/hal/hal.spec @@ -41,8 +41,8 @@ @ stdcall HalRequestIpi(long) @ fastcall HalRequestSoftwareInterrupt(long) @ stdcall HalReturnToFirmware(long) -;@ stdcall -arch=x86_64 HalSendNMI() -;@ stdcall -arch=x86_64 HalSendSoftwareInterrupt() +@ stdcall -arch=x86_64 HalSendNMI(int64) +@ stdcall -arch=x86_64 HalSendSoftwareInterrupt(int64 long) @ stdcall HalSetBusData(long long long ptr long) @ stdcall HalSetBusDataByOffset(long long long ptr long long) @ stdcall HalSetDisplayParameters(long long) diff --git a/hal/halx86/apic/apicp.h b/hal/halx86/apic/apicp.h index 245ab197f59..0a91da45992 100644 --- a/hal/halx86/apic/apicp.h +++ b/hal/halx86/apic/apicp.h @@ -151,7 +151,7 @@ typedef enum _APIC_DSH APIC_DSH_Destination, APIC_DSH_Self, APIC_DSH_AllIncludingSelf, - APIC_DSH_AllExclusingSelf + APIC_DSH_AllExcludingSelf } APIC_DSH; /* Write Constants */ diff --git a/hal/halx86/apic/apicsmp.c b/hal/halx86/apic/apicsmp.c index d8684742268..47415bc84b6 100644 --- a/hal/halx86/apic/apicsmp.c +++ b/hal/halx86/apic/apicsmp.c @@ -106,14 +106,6 @@ ApicRequestGlobalInterrupt( /* SMP SUPPORT FUNCTIONS ******************************************************/ -VOID -NTAPI -HalpRequestIpi(_In_ KAFFINITY TargetProcessors) -{ - UNIMPLEMENTED; - __debugbreak(); -} - VOID ApicStartApplicationProcessor( _In_ ULONG NTProcessorNumber, @@ -138,3 +130,172 @@ ApicStartApplicationProcessor( ApicRequestGlobalInterrupt(HalpProcessorIdentity[NTProcessorNumber].LapicId, (StartupLoc.LowPart) >> 12, APIC_MT_Startup, APIC_TGM_Edge, APIC_DSH_Destination); } + +/* HAL IPI FUNCTIONS **********************************************************/ + +/*! + * \brief Broadcasts an IPI with a specified vector to all processors. + * + * \param Vector - Specifies the interrupt vector to be delivered. + * \param IncludeSelf - Specifies whether to include the current processor. + */ +VOID +NTAPI +HalpBroadcastIpiSpecifyVector( + _In_ UCHAR Vector, + _In_ BOOLEAN IncludeSelf) +{ + APIC_DSH DestinationShortHand = IncludeSelf ? + APIC_DSH_AllIncludingSelf : APIC_DSH_AllExcludingSelf; + + /* Request the interrupt targeted at all processors */ + ApicRequestGlobalInterrupt(0, // Ignored + Vector, + APIC_MT_Fixed, + APIC_TGM_Edge, + DestinationShortHand); +} + +/*! + * \brief Requests an IPI with a specified vector on the specified processors. + * + * \param TargetSet - Specifies the set of processors to send the IPI to. + * \param Vector - Specifies the interrupt vector to be delivered. + * + * \remarks This function is exported on Windows 10. + */ +VOID +NTAPI +HalRequestIpiSpecifyVector( + _In_ KAFFINITY TargetSet, + _In_ UCHAR Vector) +{ + KAFFINITY ActiveProcessors = KeQueryActiveProcessors(); + KAFFINITY RemainingSet, SetMember; + ULONG ProcessorIndex; + ULONG LApicId; + + /* Sanitize the target set */ + TargetSet &= ActiveProcessors; + + /* Check if all processors are requested */ + if (TargetSet == ActiveProcessors) + { + /* Send an IPI to all processors, including this processor */ + HalpBroadcastIpiSpecifyVector(Vector, TRUE); + return; + } + + /* Check if all processors except the current one are requested */ + if (TargetSet == (ActiveProcessors & ~KeGetCurrentPrcb()->SetMember)) + { + /* Send an IPI to all processors, excluding this processor */ + HalpBroadcastIpiSpecifyVector(Vector, FALSE); + return; + } + + /* Loop while we have more processors */ + RemainingSet = TargetSet; + while (RemainingSet != 0) + { + NT_VERIFY(BitScanForwardAffinity(&ProcessorIndex, RemainingSet) != 0); + ASSERT(ProcessorIndex < KeNumberProcessors); + SetMember = AFFINITY_MASK(ProcessorIndex); + RemainingSet &= ~SetMember; + + /* Send the interrupt to the target processor */ + LApicId = HalpProcessorIdentity[ProcessorIndex].LapicId; + ApicRequestGlobalInterrupt(LApicId, + Vector, + APIC_MT_Fixed, + APIC_TGM_Edge, + APIC_DSH_Destination); + } +} + +/*! + * \brief Requests an IPI interrupt on the specified processors. + * + * \param TargetSet - Specifies the set of processors to send the IPI to. + */ +VOID +NTAPI +HalpRequestIpi( + _In_ KAFFINITY TargetSet) +{ + /* Request the IPI vector */ + HalRequestIpiSpecifyVector(TargetSet, APIC_IPI_VECTOR); +} + +#ifdef _M_AMD64 + +/*! + * \brief Requests a software interrupt on the specified processors. + * + * \param TargetSet - Specifies the set of processors to send the IPI to. + * \param Irql - Specifies the IRQL of the software interrupt. + */ +VOID +NTAPI +HalpSendSoftwareInterrupt( + _In_ KAFFINITY TargetSet, + _In_ KIRQL Irql) +{ + UCHAR Vector; + + /* Get the vector for the requested IRQL */ + if (Irql == APC_LEVEL) + { + Vector = APC_VECTOR; + } + else if (Irql == DISPATCH_LEVEL) + { + Vector = DISPATCH_VECTOR; + } + else + { + ASSERT(FALSE); + return; + } + + /* Request the IPI with the specified vector */ + HalRequestIpiSpecifyVector(TargetSet, Vector); +} + +/*! + * \brief Requests an NMI interrupt on the specified processors. + * + * \param TargetSet - Specifies the set of processors to send the IPI to. + */ +VOID +NTAPI +HalpSendNMI( + _In_ KAFFINITY TargetSet) +{ + KAFFINITY RemainingSet, SetMember; + ULONG ProcessorIndex; + ULONG LApicId; + + /* Make sure we do not send an NMI to ourselves */ + ASSERT((TargetSet & ~KeGetCurrentPrcb()->SetMember) == 0); + + /* Loop while we have more processors */ + RemainingSet = TargetSet; + while (RemainingSet != 0) + { + NT_VERIFY(BitScanForwardAffinity(&ProcessorIndex, RemainingSet) != 0); + ASSERT(ProcessorIndex < KeNumberProcessors); + SetMember = AFFINITY_MASK(ProcessorIndex); + RemainingSet &= ~SetMember; + + /* Send and NMI to the target processor */ + LApicId = HalpProcessorIdentity[ProcessorIndex].LapicId; + ApicRequestGlobalInterrupt(LApicId, + 0, + APIC_MT_NMI, + APIC_TGM_Edge, + APIC_DSH_Destination); + } +} + +#endif // _M_AMD64 diff --git a/hal/halx86/generic/up.c b/hal/halx86/generic/up.c index a7162774d89..dd60cc1cffb 100644 --- a/hal/halx86/generic/up.c +++ b/hal/halx86/generic/up.c @@ -32,3 +32,22 @@ HalStartNextProcessor( /* Always return false on UP systems */ return FALSE; } + +#ifdef _M_AMD64 + +VOID +NTAPI +HalSendNMI( + _In_ KAFFINITY TargetSet) +{ +} + +VOID +NTAPI +HalSendSoftwareInterrupt( + _In_ KAFFINITY TargetSet, + _In_ KIRQL Irql) +{ +} + +#endif // _M_AMD64 diff --git a/hal/halx86/include/smp.h b/hal/halx86/include/smp.h index 86b1ded5f77..d35189801c5 100644 --- a/hal/halx86/include/smp.h +++ b/hal/halx86/include/smp.h @@ -7,6 +7,15 @@ #pragma once +#define AFFINITY_MASK(Id) ((KAFFINITY)1 << (Id)) + +/* Helper to find the lowest CPU in a KAFFINITY */ +#ifdef _WIN64 +#define BitScanForwardAffinity BitScanForward64 +#else +#define BitScanForwardAffinity BitScanForward +#endif + /* This table is filled for each physical processor on system */ typedef struct _PROCESSOR_IDENTITY { @@ -53,3 +62,32 @@ VOID NTAPI HalpRequestIpi( _In_ KAFFINITY TargetProcessors); + +VOID +NTAPI +HalpBroadcastIpiSpecifyVector( + _In_ UCHAR Vector, + _In_ BOOLEAN IncludeSelf); + +VOID +NTAPI +HalRequestIpiSpecifyVector( + _In_ KAFFINITY TargetSet, + _In_ UCHAR Vector); + +#ifdef _M_AMD64 + +NTHALAPI +VOID +NTAPI +HalpSendNMI( + _In_ KAFFINITY TargetSet); + +NTHALAPI +VOID +NTAPI +HalpSendSoftwareInterrupt( + _In_ KAFFINITY TargetSet, + _In_ KIRQL Irql); + +#endif // _M_AMD64 diff --git a/hal/halx86/smp/ipi.c b/hal/halx86/smp/ipi.c index b215508c622..a2411961dae 100644 --- a/hal/halx86/smp/ipi.c +++ b/hal/halx86/smp/ipi.c @@ -22,3 +22,27 @@ HalRequestIpi( { HalpRequestIpi(TargetProcessors); } + +#ifdef _M_AMD64 + +VOID +NTAPI +HalSendNMI( + _In_ KAFFINITY TargetSet) +{ + HalpSendNMI(TargetSet); +} + +// See: +// -
https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Runtime/r0drv/nt/int…
+//
https://github.com/mirror/vbox/blob/b9657cd5351cf17432b664009cc25bb480dc64c…
+VOID +NTAPI +HalSendSoftwareInterrupt( + _In_ KAFFINITY TargetSet, + _In_ KIRQL Irql) +{ + HalpSendSoftwareInterrupt(TargetSet, Irql); +} + +#endif // _M_AMD64 diff --git a/sdk/include/ndk/halfuncs.h b/sdk/include/ndk/halfuncs.h index 2c4b56075ad..d5bb1aae56d 100644 --- a/sdk/include/ndk/halfuncs.h +++ b/sdk/include/ndk/halfuncs.h @@ -192,6 +192,23 @@ HalRequestSoftwareInterrupt( _In_ KIRQL SoftwareInterruptRequested ); +#ifdef _M_AMD64 + +NTHALAPI +VOID +NTAPI +HalSendNMI( + _In_ KAFFINITY TargetSet); + +NTHALAPI +VOID +NTAPI +HalSendSoftwareInterrupt( + _In_ KAFFINITY TargetSet, + _In_ KIRQL Irql); + +#endif // _M_AMD64 + NTHALAPI VOID NTAPI
1 year
1
0
0
0
← Newer
1
...
23
24
25
26
27
28
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
Results per page:
10
25
50
100
200