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
July 2008
----- 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
25 participants
761 discussions
Start a n
N
ew thread
[janderwald] 34319: - allow translation of static shell verbs such as open/edit/find/play/preview/print/runas used in context menu items
by janderwald@svn.reactos.org
Author: janderwald Date: Sun Jul 6 01:26:00 2008 New Revision: 34319 URL:
http://svn.reactos.org/svn/reactos?rev=34319&view=rev
Log: - allow translation of static shell verbs such as open/edit/find/play/preview/print/runas used in context menu items Modified: trunk/reactos/dll/win32/shell32/lang/bg-BG.rc trunk/reactos/dll/win32/shell32/lang/ca-ES.rc trunk/reactos/dll/win32/shell32/lang/cs-CZ.rc trunk/reactos/dll/win32/shell32/lang/da-DK.rc trunk/reactos/dll/win32/shell32/lang/de-DE.rc trunk/reactos/dll/win32/shell32/lang/el-GR.rc trunk/reactos/dll/win32/shell32/lang/en-GB.rc trunk/reactos/dll/win32/shell32/lang/en-US.rc trunk/reactos/dll/win32/shell32/lang/es-ES.rc trunk/reactos/dll/win32/shell32/lang/fi-FI.rc trunk/reactos/dll/win32/shell32/lang/fr-FR.rc trunk/reactos/dll/win32/shell32/lang/hu-HU.rc trunk/reactos/dll/win32/shell32/lang/it-IT.rc trunk/reactos/dll/win32/shell32/lang/ja-JP.rc trunk/reactos/dll/win32/shell32/lang/ko-KR.rc trunk/reactos/dll/win32/shell32/lang/nb-NO.rc trunk/reactos/dll/win32/shell32/lang/nl-NL.rc trunk/reactos/dll/win32/shell32/lang/pl-PL.rc trunk/reactos/dll/win32/shell32/lang/pt-BR.rc trunk/reactos/dll/win32/shell32/lang/pt-PT.rc trunk/reactos/dll/win32/shell32/lang/ru-RU.rc trunk/reactos/dll/win32/shell32/lang/sk-SK.rc trunk/reactos/dll/win32/shell32/lang/sl-SI.rc trunk/reactos/dll/win32/shell32/lang/sv-SE.rc trunk/reactos/dll/win32/shell32/lang/tr-TR.rc trunk/reactos/dll/win32/shell32/lang/uk-UA.rc trunk/reactos/dll/win32/shell32/lang/zh-CN.rc trunk/reactos/dll/win32/shell32/lang/zh-TW.rc trunk/reactos/dll/win32/shell32/shresdef.h trunk/reactos/dll/win32/shell32/shv_item_cmenu.c Modified: trunk/reactos/dll/win32/shell32/lang/bg-BG.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/bg-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/bg-BG.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/bg-BG.rc [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -682,8 +682,17 @@ IDS_INI_FILE "Configuration Settings" IDS_LNK_FILE "Shortcut" IDS_SYS_FILE "System file" -END - - - - + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" + +END + + + + Modified: trunk/reactos/dll/win32/shell32/lang/ca-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/ca-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/ca-ES.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/ca-ES.rc [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -679,4 +679,12 @@ IDS_INI_FILE "Configuration Settings" IDS_LNK_FILE "Shortcut" IDS_SYS_FILE "System file" -END + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" +END Modified: trunk/reactos/dll/win32/shell32/lang/cs-CZ.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/cs-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/cs-CZ.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/cs-CZ.rc [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -676,8 +676,16 @@ IDS_EXE_FILE "Aplikace" IDS_FON_FILE "Soubor písma" IDS_TTF_FILE "Soubor písma TrueType" - IDS_HLP_FILE "Soubor nápovìdy" + IDS_HLP_FILE "Soubor nápovìdy" IDS_INI_FILE "Konfiguraèní nastavení" IDS_LNK_FILE "Zástupce" IDS_SYS_FILE "Systémový soubor" -END + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" +END Modified: trunk/reactos/dll/win32/shell32/lang/da-DK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/da-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/da-DK.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/da-DK.rc [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -680,4 +680,11 @@ IDS_LNK_FILE "Shortcut" IDS_SYS_FILE "System file" -END + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" +END Modified: trunk/reactos/dll/win32/shell32/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/de-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/de-DE.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/de-DE.rc [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -679,4 +679,12 @@ IDS_INI_FILE "Konfigurationseinstellungen" IDS_LNK_FILE "Verknüpfung" IDS_SYS_FILE "Systemdatei" -END + + IDS_OPEN_VERB "Öffnen" + IDS_RUNAS_VERB "Ausführen als " + IDS_EDIT_VERB "Bearbeiten" + IDS_FIND_VERB "Finden" + IDS_PRINT_VERB "Drucken" + IDS_PLAY_VERB "Abspielen" + IDS_PREVIEW_VERB "Vorschau" +END Modified: trunk/reactos/dll/win32/shell32/lang/el-GR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/el-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/el-GR.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/el-GR.rc [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -679,4 +679,12 @@ IDS_INI_FILE "Configuration Settings" IDS_LNK_FILE "Shortcut" IDS_SYS_FILE "System file" -END + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" +END Modified: trunk/reactos/dll/win32/shell32/lang/en-GB.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/en-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/en-GB.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/en-GB.rc [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -679,4 +679,12 @@ IDS_INI_FILE "Configuration Settings" IDS_LNK_FILE "Shortcut" IDS_SYS_FILE "System file" -END + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" +END Modified: trunk/reactos/dll/win32/shell32/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/en-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/en-US.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/en-US.rc [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -679,4 +679,12 @@ IDS_INI_FILE "Configuration Settings" IDS_LNK_FILE "Shortcut" IDS_SYS_FILE "System file" -END + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" +END Modified: trunk/reactos/dll/win32/shell32/lang/es-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/es-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/es-ES.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/es-ES.rc [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -681,4 +681,12 @@ IDS_INI_FILE "Opciones de configuración" IDS_LNK_FILE "Acceso directo" IDS_SYS_FILE "Archivo del sistema" -END + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" +END Modified: trunk/reactos/dll/win32/shell32/lang/fi-FI.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/fi-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/fi-FI.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/fi-FI.rc [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -679,4 +679,12 @@ IDS_INI_FILE "Configuration Settings" IDS_LNK_FILE "Shortcut" IDS_SYS_FILE "System file" -END + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" +END Modified: trunk/reactos/dll/win32/shell32/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/fr-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/fr-FR.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/fr-FR.rc [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -683,4 +683,12 @@ IDS_INI_FILE "Fichier de configuration" IDS_LNK_FILE "Raccourci" IDS_SYS_FILE "Fichier système" -END + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" +END Modified: trunk/reactos/dll/win32/shell32/lang/hu-HU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/hu-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/hu-HU.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/hu-HU.rc [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -682,4 +682,12 @@ IDS_INI_FILE "Configuration Settings" IDS_LNK_FILE "Shortcut" IDS_SYS_FILE "System file" -END + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" +END Modified: trunk/reactos/dll/win32/shell32/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/it-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/it-IT.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/it-IT.rc [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -680,4 +680,12 @@ IDS_INI_FILE "Impostazioni di configurazione" IDS_LNK_FILE "Collegamento" IDS_SYS_FILE "File di sistema" -END + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" +END Modified: trunk/reactos/dll/win32/shell32/lang/ja-JP.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/ja-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/ja-JP.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/ja-JP.rc [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -679,4 +679,12 @@ IDS_INI_FILE "Configuration Settings" IDS_LNK_FILE "Shortcut" IDS_SYS_FILE "System file" -END + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" +END Modified: trunk/reactos/dll/win32/shell32/lang/ko-KR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/ko-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/ko-KR.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/ko-KR.rc [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -679,4 +679,12 @@ IDS_INI_FILE "Configuration Settings" IDS_LNK_FILE "Shortcut" IDS_SYS_FILE "System file" -END + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" +END Modified: trunk/reactos/dll/win32/shell32/lang/nb-NO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/nb-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/nb-NO.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/nb-NO.rc [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -679,4 +679,12 @@ IDS_INI_FILE "Configuration Settings" IDS_LNK_FILE "Shortcut" IDS_SYS_FILE "System file" -END + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" +END Modified: trunk/reactos/dll/win32/shell32/lang/nl-NL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/nl-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/nl-NL.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/nl-NL.rc [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -679,4 +679,12 @@ IDS_INI_FILE "Configuration Settings" IDS_LNK_FILE "Shortcut" IDS_SYS_FILE "System file" -END + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" +END Modified: trunk/reactos/dll/win32/shell32/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/pl-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/pl-PL.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/pl-PL.rc [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -685,4 +685,12 @@ IDS_INI_FILE "Ustawienia konfiguracji" IDS_LNK_FILE "Skrót" IDS_SYS_FILE "Plik systemowy" -END + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" +END Modified: trunk/reactos/dll/win32/shell32/lang/pt-BR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/pt-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/pt-BR.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/pt-BR.rc [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -681,4 +681,12 @@ IDS_INI_FILE "Configuration Settings" IDS_LNK_FILE "Shortcut" IDS_SYS_FILE "System file" -END + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" +END Modified: trunk/reactos/dll/win32/shell32/lang/pt-PT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/pt-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/pt-PT.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/pt-PT.rc [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -681,4 +681,12 @@ IDS_INI_FILE "Configuration Settings" IDS_LNK_FILE "Shortcut" IDS_SYS_FILE "System file" -END + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" +END Modified: trunk/reactos/dll/win32/shell32/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/ru-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/ru-RU.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/ru-RU.rc [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -677,4 +677,12 @@ IDS_INI_FILE "Ôàéë êîíôèãóðàöèè" IDS_LNK_FILE "ßðëûê" IDS_SYS_FILE "Ñèñòåìíûé ôàéë" -END + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" +END Modified: trunk/reactos/dll/win32/shell32/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/sk-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/sk-SK.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/sk-SK.rc [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -685,4 +685,12 @@ IDS_INI_FILE "Konfiguraèné nastavenia" IDS_LNK_FILE "Odkaz" IDS_SYS_FILE "Systémový súbor" -END + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" +END Modified: trunk/reactos/dll/win32/shell32/lang/sl-SI.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/sl-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/sl-SI.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/sl-SI.rc [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -679,4 +679,12 @@ IDS_INI_FILE "Configuration Settings" IDS_LNK_FILE "Shortcut" IDS_SYS_FILE "System file" -END + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" +END Modified: trunk/reactos/dll/win32/shell32/lang/sv-SE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/sv-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/sv-SE.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/sv-SE.rc [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -679,4 +679,12 @@ IDS_INI_FILE "Configuration Settings" IDS_LNK_FILE "Shortcut" IDS_SYS_FILE "System file" -END + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" +END Modified: trunk/reactos/dll/win32/shell32/lang/tr-TR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/tr-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/tr-TR.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/tr-TR.rc [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -679,4 +679,12 @@ IDS_INI_FILE "Configuration Settings" IDS_LNK_FILE "Shortcut" IDS_SYS_FILE "System file" -END + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" +END Modified: trunk/reactos/dll/win32/shell32/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/uk-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/uk-UA.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/uk-UA.rc [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -680,4 +680,12 @@ IDS_INI_FILE "Ôàéë íàëàøòóâàíü" IDS_LNK_FILE "ßðëèê" IDS_SYS_FILE "Ñèñòåìíèé ôàéë" -END + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" +END Modified: trunk/reactos/dll/win32/shell32/lang/zh-CN.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/zh-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/zh-CN.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/zh-CN.rc [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -680,6 +680,14 @@ IDS_INI_FILE "Configuration Settings" IDS_LNK_FILE "Shortcut" IDS_SYS_FILE "System file" + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" END #pragma code_page(default) Modified: trunk/reactos/dll/win32/shell32/lang/zh-TW.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/zh-…
============================================================================== --- trunk/reactos/dll/win32/shell32/lang/zh-TW.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/lang/zh-TW.rc [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -680,6 +680,14 @@ IDS_INI_FILE "Configuration Settings" IDS_LNK_FILE "Shortcut" IDS_SYS_FILE "System file" + + IDS_OPEN_VERB "Open" + IDS_RUNAS_VERB "Run as " + IDS_EDIT_VERB "Edit" + IDS_FIND_VERB "Find" + IDS_PRINT_VERB "Print" + IDS_PLAY_VERB "Play" + IDS_PREVIEW_VERB "Preview" END #pragma code_page(default) Modified: trunk/reactos/dll/win32/shell32/shresdef.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shresdef…
============================================================================== --- trunk/reactos/dll/win32/shell32/shresdef.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shresdef.h [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -133,6 +133,13 @@ #define IDS_LNK_FILE 170 #define IDS_SYS_FILE 171 #define IDS_EMPTY_BITBUCKET 172 +#define IDS_OPEN_VERB 300 +#define IDS_RUNAS_VERB 301 +#define IDS_EDIT_VERB 302 +#define IDS_FIND_VERB 303 +#define IDS_PRINT_VERB 304 +#define IDS_PLAY_VERB 305 +#define IDS_PREVIEW_VERB 306 /* Note: this string is referenced from the registry */ #define IDS_RECYCLEBIN_FOLDER_NAME 8964 Modified: trunk/reactos/dll/win32/shell32/shv_item_cmenu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shv_item…
============================================================================== --- trunk/reactos/dll/win32/shell32/shv_item_cmenu.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shv_item_cmenu.c [iso-8859-1] Sun Jul 6 01:26:00 2008 @@ -37,6 +37,7 @@ #include "shell32_main.h" #include "shellfolder.h" #include "debughlp.h" +#include "shresdef.h" WINE_DEFAULT_DEBUG_CHANNEL(shell); /* ugly hack for cut&paste files */ @@ -518,6 +519,8 @@ { MENUITEMINFOW mii; PStaticShellEntry curEntry; + WCHAR szVerb[20]; + UINT idResource; mii.cbSize = sizeof(mii); mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE | MIIM_DATA; @@ -530,11 +533,42 @@ while(curEntry) { - /* FIXME - * load localized verbs if its an open edit find print printto openas properties verb - */ - - mii.dwTypeData = curEntry->szVerb; + if (!wcsicmp(curEntry->szVerb, L"open")) + idResource = IDS_OPEN_VERB; + else if (!wcsicmp(curEntry->szVerb, L"runas")) + idResource = IDS_RUNAS_VERB; + else if (!wcsicmp(curEntry->szVerb, L"edit")) + idResource = IDS_EDIT_VERB; + else if (!wcsicmp(curEntry->szVerb, L"find")) + idResource = IDS_FIND_VERB; + else if (!wcsicmp(curEntry->szVerb, L"print")) + idResource = IDS_PRINT_VERB; + else if (!wcsicmp(curEntry->szVerb, L"play")) + idResource = IDS_PLAY_VERB; + else if (!wcsicmp(curEntry->szVerb, L"preview")) + idResource = IDS_PREVIEW_VERB; + else + idResource = 0; + + if (idResource > 0) + { + if (LoadStringW(shell32_hInstance, idResource, szVerb, sizeof(szVerb)/sizeof(WCHAR))) + { + szVerb[(sizeof(szVerb)/sizeof(WCHAR))-1] = L'\0'; + mii.dwTypeData = szVerb; + } + else + { + WARN("unknown verb %s\n", debugstr_w(curEntry->szVerb)); + mii.dwTypeData = curEntry->szVerb; + } + } + else + { + WARN("unknown verb %s\n", debugstr_w(curEntry->szVerb)); + mii.dwTypeData = curEntry->szVerb; + } + mii.cch = strlenW(mii.dwTypeData); InsertMenuItemW(hMenu, indexMenu++, TRUE, &mii); mii.fState = MFS_ENABLED;
16 years, 5 months
1
0
0
0
[janderwald] 34318: - don't load OpenWith shell extension on desktop, mydocuments, controlpanel, recyclebin, drive, control panel and folder items
by janderwald@svn.reactos.org
Author: janderwald Date: Sun Jul 6 00:26:34 2008 New Revision: 34318 URL:
http://svn.reactos.org/svn/reactos?rev=34318&view=rev
Log: - don't load OpenWith shell extension on desktop, mydocuments, controlpanel, recyclebin, drive, control panel and folder items Modified: trunk/reactos/dll/win32/shell32/she_ocmenu.c Modified: trunk/reactos/dll/win32/shell32/she_ocmenu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/she_ocme…
============================================================================== --- trunk/reactos/dll/win32/shell32/she_ocmenu.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/she_ocmenu.c [iso-8859-1] Sun Jul 6 00:26:34 2008 @@ -1230,7 +1230,8 @@ ERR("no mem\n"); return E_OUTOFMEMORY; } - if (_ILIsFolder(pidl_child)) + if (_ILIsDesktop(pidl_child) || _ILIsMyDocuments(pidl_child) || _ILIsControlPanel(pidl_child) || + _ILIsBitBucket(pidl_child) || _ILIsDrive(pidl_child) || _ILIsCPanelStruct(pidl_child) || _ILIsFolder(pidl_child)) { TRACE("pidl is a folder\n"); SHFree((void*)pidl);
16 years, 5 months
1
0
0
0
[silverblade] 34317: Added macros to ntddsnd.h to make device type checking easier (can now check if a device is a wave device without comparing against wave in and wave out individually). Renamed CreateSoundDevice to AddSoundDevice (doesn't actually *create* devices!) and implemented wave format setting via IOCTL_WAVE_SET_FORMAT.
by silverblade@svn.reactos.org
Author: silverblade Date: Sat Jul 5 19:42:38 2008 New Revision: 34317 URL:
http://svn.reactos.org/svn/reactos?rev=34317&view=rev
Log: Added macros to ntddsnd.h to make device type checking easier (can now check if a device is a wave device without comparing against wave in and wave out individually). Renamed CreateSoundDevice to AddSoundDevice (doesn't actually *create* devices!) and implemented wave format setting via IOCTL_WAVE_SET_FORMAT. Modified: branches/silverblade-audio/include/ddk/ntddsnd.h branches/silverblade-audio/include/reactos/libs/sound/mmebuddy.h branches/silverblade-audio/lib/drivers/sound/mmebuddy/devices.c branches/silverblade-audio/lib/drivers/sound/mmebuddy/testing.c Modified: branches/silverblade-audio/include/ddk/ntddsnd.h URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/include/ddk/n…
============================================================================== --- branches/silverblade-audio/include/ddk/ntddsnd.h [iso-8859-1] (original) +++ branches/silverblade-audio/include/ddk/ntddsnd.h [iso-8859-1] Sat Jul 5 19:42:38 2008 @@ -7,6 +7,8 @@ History: 24 May 2008 - Created + 2 July 2008 - Added device names as seen from user-mode + 5 July 2008 - Added macros for checking device type This file contains definitions and structures for Windows NT4 style multimedia drivers. The NT4 DDK has these split across multiple header @@ -48,6 +50,18 @@ #define VALID_SOUND_DEVICE_TYPE(x) \ ( ( x >= MIN_SOUND_DEVICE_TYPE ) && ( x <= MAX_SOUND_DEVICE_TYPE ) ) +#define IS_WAVE_DEVICE_TYPE(x) \ + ( ( x == WAVE_IN_DEVICE_TYPE ) || ( x == WAVE_OUT_DEVICE_TYPE ) ) + +#define IS_MIDI_DEVICE_TYPE(x) \ + ( ( x == MIDI_IN_DEVICE_TYPE ) || ( x == MIDI_OUT_DEVICE_TYPE ) ) + +#define IS_AUX_DEVICE_TYPE(x) \ + ( x == AUX_DEVICE_TYPE ) + +#define IS_MIXER_DEVICE_TYPE(x) \ + ( x == MIXER_DEVICE_TYPE ) + /* Base device names Modified: branches/silverblade-audio/include/reactos/libs/sound/mmebuddy.h URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/include/react…
============================================================================== --- branches/silverblade-audio/include/reactos/libs/sound/mmebuddy.h [iso-8859-1] (original) +++ branches/silverblade-audio/include/reactos/libs/sound/mmebuddy.h [iso-8859-1] Sat Jul 5 19:42:38 2008 @@ -115,7 +115,7 @@ IN struct _SOUND_DEVICE* SoundDevice, OUT PUNIVERSAL_CAPS Capabilities); -typedef MMRESULT (*MMQUERYWAVEFORMAT_FUNC)( +typedef MMRESULT (*MMWAVEFORMAT_FUNC)( IN struct _SOUND_DEVICE* SoundDevice, IN PWAVEFORMATEX WaveFormat, IN DWORD WaveFormatSize); @@ -125,7 +125,9 @@ MMOPEN_FUNC Open; MMCLOSE_FUNC Close; MMGETCAPS_FUNC GetCapabilities; - MMQUERYWAVEFORMAT_FUNC QueryWaveFormat; + + MMWAVEFORMAT_FUNC QueryWaveFormat; + MMWAVEFORMAT_FUNC SetWaveFormat; } MMFUNCTION_TABLE, *PMMFUNCTION_TABLE; @@ -196,12 +198,12 @@ UCHAR DeviceType); BOOLEAN -CreateSoundDevice( +AddSoundDevice( UCHAR DeviceType, PWSTR DevicePath); BOOLEAN -DestroySoundDevice( +RemoveSoundDevice( UCHAR DeviceType, ULONG Index); @@ -340,6 +342,18 @@ IN PWAVEFORMATEX WaveFormat, IN DWORD WaveFormatSize); +MMRESULT +SetWaveDeviceFormat( + IN PSOUND_DEVICE Device, + IN PWAVEFORMATEX WaveFormat, + IN DWORD WaveFormatSize); + +MMRESULT +DefaultSetWaveDeviceFormat( + IN PSOUND_DEVICE Device, + IN PWAVEFORMATEX WaveFormat, + IN DWORD WaveFormatSize); + /* thread.c Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/devices.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/devices.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/devices.c [iso-8859-1] Sat Jul 5 19:42:38 2008 @@ -150,11 +150,12 @@ { Device->Functions.GetCapabilities = DefaultGetSoundDeviceCapabilities; Device->Functions.QueryWaveFormat = DefaultQueryWaveDeviceFormatSupport; + Device->Functions.SetWaveFormat = DefaultSetWaveDeviceFormat; } BOOLEAN -CreateSoundDevice( +AddSoundDevice( UCHAR DeviceType, LPWSTR DevicePath) { @@ -237,7 +238,7 @@ BOOLEAN -DestroySoundDevice( +RemoveSoundDevice( UCHAR DeviceType, ULONG Index) { @@ -430,8 +431,7 @@ return MMSYSERR_INVALPARAM; /* Make sure we have a wave device */ - if ( ( Device->DeviceType != WAVE_OUT_DEVICE_TYPE ) && - ( Device->DeviceType != WAVE_IN_DEVICE_TYPE ) ) + if ( IS_WAVE_DEVICE_TYPE(Device->DeviceType) ) { return MMSYSERR_INVALPARAM; } @@ -446,3 +446,51 @@ return Result; } +MMRESULT +SetWaveDeviceFormat( + IN PSOUND_DEVICE Device, + IN PWAVEFORMATEX WaveFormat, + IN DWORD WaveFormatSize) +{ + if ( ! Device ) + return MMSYSERR_INVALPARAM; + + if ( ! WaveFormat ) + return MMSYSERR_INVALPARAM; + + /* TODO: Should we check the size? */ + + return Device->Functions.SetWaveFormat(Device, WaveFormat, WaveFormatSize); +} + +MMRESULT +DefaultSetWaveDeviceFormat( + IN PSOUND_DEVICE Device, + IN PWAVEFORMATEX WaveFormat, + IN DWORD WaveFormatSize) +{ + MMRESULT Result; + DWORD BytesReturned = 0; + + if ( ! Device ) + return MMSYSERR_INVALPARAM; + + if ( ! WaveFormat ) + return MMSYSERR_INVALPARAM; + + /* Make sure we have a wave device */ + if ( IS_WAVE_DEVICE_TYPE(Device->DeviceType) ) + { + return MMSYSERR_INVALPARAM; + } + + Result = WriteSoundDevice(Device, + IOCTL_WAVE_SET_FORMAT, + (LPVOID) WaveFormat, + WaveFormatSize, + &BytesReturned, + NULL); + + return Result; +} + Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/testing.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/testing.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/testing.c [iso-8859-1] Sat Jul 5 19:42:38 2008 @@ -35,7 +35,7 @@ { MessageBox(0, DevicePath, L"CALLBACK", MB_OK | MB_TASKMODAL); - CreateSoundDevice(DeviceType, DevicePath); + AddSoundDevice(DeviceType, DevicePath); return TRUE; } @@ -96,7 +96,7 @@ PSOUND_DEVICE Device; MMRESULT Result; - CreateSoundDevice(WAVE_OUT_DEVICE_TYPE, L"\\\\.\\SBWaveOut0"); + AddSoundDevice(WAVE_OUT_DEVICE_TYPE, L"\\\\.\\SBWaveOut0"); Result = GetSoundDevice(WAVE_OUT_DEVICE_TYPE, 0, &Device); if ( Result != MMSYSERR_NOERROR ) @@ -126,7 +126,7 @@ MMRESULT Result; WAVEFORMATEX fmt; - CreateSoundDevice(WAVE_OUT_DEVICE_TYPE, L"\\\\.\\SBWaveOut0"); + AddSoundDevice(WAVE_OUT_DEVICE_TYPE, L"\\\\.\\SBWaveOut0"); Result = GetSoundDevice(WAVE_OUT_DEVICE_TYPE, 0, &Device); if ( Result != MMSYSERR_NOERROR ) @@ -188,7 +188,7 @@ PSOUND_DEVICE Device; PSOUND_DEVICE_INSTANCE Instance; - CreateSoundDevice(WAVE_OUT_DEVICE_TYPE, L"\\\\.\\SBWaveOut0"); + AddSoundDevice(WAVE_OUT_DEVICE_TYPE, L"\\\\.\\SBWaveOut0"); Result = GetSoundDevice(WAVE_OUT_DEVICE_TYPE, 0, &Device); if ( Result != MMSYSERR_NOERROR ) { @@ -216,14 +216,6 @@ MessageBox(0, L"Click to kill thread", L"Bai", MB_OK | MB_TASKMODAL); StopWaveThread(Instance); -/* - P - -MMRESULT -CreateSoundThread( - IN PSOUND_DEVICE_INSTANCE Instance, - OUT PSOUND_THREAD* Thread); -*/ }
16 years, 5 months
1
0
0
0
[silverblade] 34316: Implemented routines for querying if a particular wave format is supported by an audio device. This is done by sending IOCTL_WAVE_QUERY_FORMAT to the driver. This has been tested with the NT4 Sound Blaster driver, which return success for 22050Hz/16bit/Mono, and returns MMSYSERR_NOTSUPPORTED if the same request is then sent with a request for an abnormally high number of channels.
by silverblade@svn.reactos.org
Author: silverblade Date: Sat Jul 5 19:15:43 2008 New Revision: 34316 URL:
http://svn.reactos.org/svn/reactos?rev=34316&view=rev
Log: Implemented routines for querying if a particular wave format is supported by an audio device. This is done by sending IOCTL_WAVE_QUERY_FORMAT to the driver. This has been tested with the NT4 Sound Blaster driver, which return success for 22050Hz/16bit/Mono, and returns MMSYSERR_NOTSUPPORTED if the same request is then sent with a request for an abnormally high number of channels. Modified: branches/silverblade-audio/include/reactos/libs/sound/mmebuddy.h branches/silverblade-audio/lib/drivers/sound/mmebuddy/devices.c branches/silverblade-audio/lib/drivers/sound/mmebuddy/instances.c branches/silverblade-audio/lib/drivers/sound/mmebuddy/nt4.c branches/silverblade-audio/lib/drivers/sound/mmebuddy/testing.c Modified: branches/silverblade-audio/include/reactos/libs/sound/mmebuddy.h URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/include/react…
============================================================================== --- branches/silverblade-audio/include/reactos/libs/sound/mmebuddy.h [iso-8859-1] (original) +++ branches/silverblade-audio/include/reactos/libs/sound/mmebuddy.h [iso-8859-1] Sat Jul 5 19:15:43 2008 @@ -115,11 +115,17 @@ IN struct _SOUND_DEVICE* SoundDevice, OUT PUNIVERSAL_CAPS Capabilities); +typedef MMRESULT (*MMQUERYWAVEFORMAT_FUNC)( + IN struct _SOUND_DEVICE* SoundDevice, + IN PWAVEFORMATEX WaveFormat, + IN DWORD WaveFormatSize); + typedef struct _MMFUNCTION_TABLE { - MMOPEN_FUNC Open; - MMCLOSE_FUNC Close; - MMGETCAPS_FUNC GetCapabilities; + MMOPEN_FUNC Open; + MMCLOSE_FUNC Close; + MMGETCAPS_FUNC GetCapabilities; + MMQUERYWAVEFORMAT_FUNC QueryWaveFormat; } MMFUNCTION_TABLE, *PMMFUNCTION_TABLE; @@ -322,6 +328,18 @@ IN PSOUND_DEVICE Device, OUT PUNIVERSAL_CAPS Capabilities); +MMRESULT +QueryWaveDeviceFormatSupport( + IN PSOUND_DEVICE Device, + IN PWAVEFORMATEX WaveFormat, + IN DWORD WaveFormatSize); + +MMRESULT +DefaultQueryWaveDeviceFormatSupport( + IN PSOUND_DEVICE Device, + IN PWAVEFORMATEX WaveFormat, + IN DWORD WaveFormatSize); + /* thread.c Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/devices.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/devices.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/devices.c [iso-8859-1] Sat Jul 5 19:15:43 2008 @@ -149,6 +149,7 @@ IN PSOUND_DEVICE Device) { Device->Functions.GetCapabilities = DefaultGetSoundDeviceCapabilities; + Device->Functions.QueryWaveFormat = DefaultQueryWaveDeviceFormatSupport; } @@ -306,28 +307,142 @@ } - -/* Should this go somewhere else? */ +#include <ntddk.h> /* How do I avoid this? */ + +/* Should these go somewhere else? */ MMRESULT GetSoundDeviceCapabilities( - PSOUND_DEVICE SoundDevice, + PSOUND_DEVICE Device, PUNIVERSAL_CAPS Capabilities) { - if ( ! SoundDevice ) + if ( ! Device ) return MMSYSERR_INVALPARAM; if ( ! Capabilities ) return MMSYSERR_INVALPARAM; - return SoundDevice->Functions.GetCapabilities(SoundDevice, Capabilities); -} - -MMRESULT -IsSoundDeviceFormatSupported( - IN PSOUND_DEVICE SoundDevice /* what else? */) -{ - /* TODO */ - return MMSYSERR_NOTSUPPORTED; -} - + return Device->Functions.GetCapabilities(Device, Capabilities); +} + +MMRESULT +DefaultGetSoundDeviceCapabilities( + IN PSOUND_DEVICE Device, + OUT PUNIVERSAL_CAPS Capabilities) +{ + PVOID RawCapsPtr = NULL; + ULONG CapsSize = 0; + DWORD Ioctl; + MMRESULT Result; + DWORD BytesReturned; + + ZeroMemory(Capabilities, sizeof(UNIVERSAL_CAPS)); + + if ( ! Device ) + return MMSYSERR_INVALPARAM; + + if ( ! Capabilities ) + return MMSYSERR_INVALPARAM; + + /* Select appropriate IOCTL and capabilities structure */ + switch ( Device->DeviceType ) + { + case WAVE_OUT_DEVICE_TYPE : + Ioctl = IOCTL_WAVE_GET_CAPABILITIES; + RawCapsPtr = (PVOID) &Capabilities->WaveOut; + CapsSize = sizeof(WAVEOUTCAPS); + break; + + case WAVE_IN_DEVICE_TYPE : + Ioctl = IOCTL_WAVE_GET_CAPABILITIES; + RawCapsPtr = (PVOID) &Capabilities->WaveIn; + CapsSize = sizeof(WAVEINCAPS); + break; + + case MIDI_OUT_DEVICE_TYPE : + Ioctl = IOCTL_MIDI_GET_CAPABILITIES; + RawCapsPtr = (PVOID) &Capabilities->MidiOut; + CapsSize = sizeof(MIDIOUTCAPS); + break; + + case MIDI_IN_DEVICE_TYPE : + Ioctl = IOCTL_MIDI_GET_CAPABILITIES; + RawCapsPtr = (PVOID) &Capabilities->MidiIn; + CapsSize = sizeof(MIDIINCAPS); + break; + + case MIXER_DEVICE_TYPE : + /* TODO */ + /*Ioctl = IOCTL_MIX_GET_CAPABILITIES;*/ + return MMSYSERR_NOTSUPPORTED; + + case AUX_DEVICE_TYPE : + /* TODO */ + Ioctl = IOCTL_AUX_GET_CAPABILITIES; + return MMSYSERR_NOTSUPPORTED; + + default : + return MMSYSERR_NOTSUPPORTED; + } + + /* Call the driver */ + Result = ReadSoundDevice( + Device, + Ioctl, + (LPVOID) RawCapsPtr, + CapsSize, + &BytesReturned, + NULL); + + return Result; +} + +MMRESULT +QueryWaveDeviceFormatSupport( + IN PSOUND_DEVICE Device, + IN PWAVEFORMATEX WaveFormat, + IN DWORD WaveFormatSize) +{ + if ( ! Device ) + return MMSYSERR_INVALPARAM; + + if ( ! WaveFormat ) + return MMSYSERR_INVALPARAM; + + /* TODO: Should we check the size? */ + + return Device->Functions.QueryWaveFormat(Device, WaveFormat, WaveFormatSize); +} + +MMRESULT +DefaultQueryWaveDeviceFormatSupport( + IN PSOUND_DEVICE Device, + IN PWAVEFORMATEX WaveFormat, + IN DWORD WaveFormatSize) +{ + MMRESULT Result; + DWORD BytesReturned = 0; + + if ( ! Device ) + return MMSYSERR_INVALPARAM; + + if ( ! WaveFormat ) + return MMSYSERR_INVALPARAM; + + /* Make sure we have a wave device */ + if ( ( Device->DeviceType != WAVE_OUT_DEVICE_TYPE ) && + ( Device->DeviceType != WAVE_IN_DEVICE_TYPE ) ) + { + return MMSYSERR_INVALPARAM; + } + + Result = WriteSoundDevice(Device, + IOCTL_WAVE_QUERY_FORMAT, + (LPVOID) WaveFormat, + WaveFormatSize, + &BytesReturned, + NULL); + + return Result; +} + Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/instances.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/instances.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/instances.c [iso-8859-1] Sat Jul 5 19:15:43 2008 @@ -50,6 +50,7 @@ /* Initialise */ NewInstance->Next = NULL; NewInstance->Device = SoundDevice; + NewInstance->Thread = NULL; /* Search for an appropriate place in the list to put this instance */ CurrentInstance = SoundDevice->FirstInstance; Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/nt4.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/nt4.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/nt4.c [iso-8859-1] Sat Jul 5 19:15:43 2008 @@ -361,78 +361,3 @@ return MMSYSERR_NOERROR; } - - -#include <ntddk.h> /* How do I avoid this? */ - -MMRESULT -DefaultGetSoundDeviceCapabilities( - IN PSOUND_DEVICE Device, - OUT PUNIVERSAL_CAPS Capabilities) -{ - PVOID RawCapsPtr = NULL; - ULONG CapsSize = 0; - DWORD Ioctl; - MMRESULT Result; - DWORD BytesReturned; - - ZeroMemory(Capabilities, sizeof(UNIVERSAL_CAPS)); - - if ( ! Device ) - return MMSYSERR_INVALPARAM; - - if ( ! Capabilities ) - return MMSYSERR_INVALPARAM; - - /* Select appropriate IOCTL and capabilities structure */ - switch ( Device->DeviceType ) - { - case WAVE_OUT_DEVICE_TYPE : - Ioctl = IOCTL_WAVE_GET_CAPABILITIES; - RawCapsPtr = (PVOID) &Capabilities->WaveOut; - CapsSize = sizeof(WAVEOUTCAPS); - break; - - case WAVE_IN_DEVICE_TYPE : - Ioctl = IOCTL_WAVE_GET_CAPABILITIES; - RawCapsPtr = (PVOID) &Capabilities->WaveIn; - CapsSize = sizeof(WAVEINCAPS); - break; - - case MIDI_OUT_DEVICE_TYPE : - Ioctl = IOCTL_MIDI_GET_CAPABILITIES; - RawCapsPtr = (PVOID) &Capabilities->MidiOut; - CapsSize = sizeof(MIDIOUTCAPS); - break; - - case MIDI_IN_DEVICE_TYPE : - Ioctl = IOCTL_MIDI_GET_CAPABILITIES; - RawCapsPtr = (PVOID) &Capabilities->MidiIn; - CapsSize = sizeof(MIDIINCAPS); - break; - - case MIXER_DEVICE_TYPE : - /* TODO */ - /*Ioctl = IOCTL_MIX_GET_CAPABILITIES;*/ - return MMSYSERR_NOTSUPPORTED; - - case AUX_DEVICE_TYPE : - /* TODO */ - Ioctl = IOCTL_AUX_GET_CAPABILITIES; - return MMSYSERR_NOTSUPPORTED; - - default : - return MMSYSERR_NOTSUPPORTED; - } - - /* Call the driver */ - Result = ReadSoundDevice( - Device, - Ioctl, - (LPVOID) RawCapsPtr, - CapsSize, - &BytesReturned, - NULL); - - return Result; -} Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/testing.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/testing.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/testing.c [iso-8859-1] Sat Jul 5 19:15:43 2008 @@ -114,54 +114,49 @@ wsprintf(DevInfo, L"Device name: %hS\nManufacturer ID: %d\nProduct ID: %d\nDriver version: %x\nChannels: %d", Caps.WaveOut.szPname, Caps.WaveOut.wMid, Caps.WaveOut.wPid, Caps.WaveOut.vDriverVersion, Caps.WaveOut.wChannels); - MessageBox(0, DevInfo, L"Result", MB_OK | MB_TASKMODAL); - -#if 0 - HANDLE Handle; + MessageBox(0, DevInfo, L"Device caps", MB_OK | MB_TASKMODAL); +} + + +VOID +TestFormatQuery() +{ + WCHAR msg[1024]; + PSOUND_DEVICE Device; MMRESULT Result; - WAVEOUTCAPS Caps; - DWORD BytesReturned = 0; - WCHAR DevInfo[1024]; - - Result = OpenKernelSoundDevice( - L"\\\\.\\SBWaveOut0", - GENERIC_READ, - &Handle); - - if ( Result != MMSYSERR_NOERROR ) - { - MessageBox(0, L"Fail open", L"Fail open", MB_OK | MB_TASKMODAL); - return; - } - - ZeroMemory(&Caps, sizeof(WAVEOUTCAPS)); - - if ( ! - DeviceIoControl(Handle, - IOCTL_WAVE_GET_CAPABILITIES, - NULL, - 0, - (LPVOID) &Caps, - sizeof(WAVEOUTCAPS), - &BytesReturned, - NULL) ) - { - MessageBox(0, L"Fail", L"Fail", MB_OK | MB_TASKMODAL); - } - else - { - wsprintf(DevInfo, L"%02x %02x %02x %02x %02x %02x", Caps.szPname[0], Caps.szPname[1], Caps.szPname[2], Caps.szPname[3], Caps.szPname[4], Caps.szPname[5]); -/* - wsprintf(DevInfo, L"Device name: %hS\nManufacturer ID: %d\nProduct ID: %d\nDriver version: %x\nChannels: %d", Caps.szPname, Caps.wMid, Caps.wPid, Caps.vDriverVersion, Caps.wChannels); -*/ - - MessageBox(0, DevInfo, L"Result", MB_OK | MB_TASKMODAL); - } - - CloseHandle(Handle); -#endif -} - + WAVEFORMATEX fmt; + + CreateSoundDevice(WAVE_OUT_DEVICE_TYPE, L"\\\\.\\SBWaveOut0"); + Result = GetSoundDevice(WAVE_OUT_DEVICE_TYPE, 0, &Device); + + if ( Result != MMSYSERR_NOERROR ) + { + MessageBox(0, L"Fail 1", L"Fail", MB_OK | MB_TASKMODAL); + return; + } + + /* Request a valid format */ + fmt.wFormatTag = WAVE_FORMAT_PCM; + fmt.nChannels = 1; + fmt.nSamplesPerSec = 22050; + fmt.wBitsPerSample = 16; + fmt.nBlockAlign = fmt.nChannels * (fmt.wBitsPerSample / 8); + fmt.nAvgBytesPerSec = fmt.nSamplesPerSec * fmt.nBlockAlign; + fmt.cbSize = 0; + + Result = QueryWaveDeviceFormatSupport(Device, &fmt, sizeof(WAVEFORMATEX)); + + wsprintf(msg, L"Format support query result: %d", Result); + MessageBox(0, msg, L"Result", MB_OK | MB_TASKMODAL); + + /* Send it some garbage */ + fmt.nChannels = 6969; + + Result = QueryWaveDeviceFormatSupport(Device, &fmt, sizeof(WAVEFORMATEX)); + + wsprintf(msg, L"Format support query result: %d", Result); + MessageBox(0, msg, L"Result", MB_OK | MB_TASKMODAL); +} APIENTRY VOID @@ -238,7 +233,8 @@ LPWSTR lpCmdLine, int nCmdShow) { - TestDevEnum(); + TestFormatQuery(); +// TestDevEnum(); /* TestThreading(); */
16 years, 5 months
1
0
0
0
[silverblade] 34315: Sound worker request dispatcher thread partially implemented, along with routines for starting/stopping the thread and submitting requests. This allows wavethread (and, in future, midithread) to just get on with the required work and leave thread handling to something else. Also added macros to simplify allocation of memory for structures and wide strings.
by silverblade@svn.reactos.org
Author: silverblade Date: Sat Jul 5 18:23:50 2008 New Revision: 34315 URL:
http://svn.reactos.org/svn/reactos?rev=34315&view=rev
Log: Sound worker request dispatcher thread partially implemented, along with routines for starting/stopping the thread and submitting requests. This allows wavethread (and, in future, midithread) to just get on with the required work and leave thread handling to something else. Also added macros to simplify allocation of memory for structures and wide strings. Modified: branches/silverblade-audio/include/reactos/libs/sound/mmebuddy.h branches/silverblade-audio/lib/drivers/sound/mmebuddy/devices.c branches/silverblade-audio/lib/drivers/sound/mmebuddy/instances.c branches/silverblade-audio/lib/drivers/sound/mmebuddy/nt4.c branches/silverblade-audio/lib/drivers/sound/mmebuddy/testing.c branches/silverblade-audio/lib/drivers/sound/mmebuddy/thread.c branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/wavethread.c Modified: branches/silverblade-audio/include/reactos/libs/sound/mmebuddy.h URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/include/react…
============================================================================== --- branches/silverblade-audio/include/reactos/libs/sound/mmebuddy.h [iso-8859-1] (original) +++ branches/silverblade-audio/include/reactos/libs/sound/mmebuddy.h [iso-8859-1] Sat Jul 5 18:23:50 2008 @@ -14,6 +14,40 @@ #ifndef ROS_AUDIO_MMEBUDDY_H #define ROS_AUDIO_MMEBUDDY_H + +/* + Hacky debug macro +*/ + +#define SOUND_DEBUG(x) \ + MessageBox(0, x, L"Debug", MB_OK | MB_TASKMODAL); + + +/* + Some memory allocation helper macros +*/ + +#define AllocateMemory(size) \ + HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size) + +#define FreeMemory(ptr) \ + HeapFree(GetProcessHeap(), 0, ptr) + +#define AllocateMemoryFor(thing) \ + (thing*) AllocateMemory(sizeof(thing)) + +#define StringLengthToBytes(chartype, string_length) \ + ( ( string_length + 1 ) * sizeof(chartype) ) + +#define AllocateWideString(string_length) \ + (PWSTR) AllocateMemory(StringLengthToBytes(WCHAR, string_length)) + +#define ZeroWideString(string) \ + ZeroMemory(string, StringLengthToBytes(WCHAR, wcslen(string))) + +#define CopyWideString(dest, source) \ + CopyMemory(dest, source, StringLengthToBytes(WCHAR, wcslen(source))) + struct _SOUND_DEVICE; struct _SOUND_DEVICE_INSTANCE; @@ -34,28 +68,34 @@ /* + Used internally to shuttle data to/from the sound processing thread. +*/ +typedef struct _THREAD_REQUEST +{ + struct _SOUND_DEVICE_INSTANCE* DeviceInstance; + DWORD RequestId; + PVOID Data; + MMRESULT Result; +} THREAD_REQUEST, *PTHREAD_REQUEST; + + +/* Thread helper operations */ - -typedef MMRESULT (*SOUND_THREAD_OPERATION)( +typedef MMRESULT (*SOUND_THREAD_REQUEST_HANDLER)( IN struct _SOUND_DEVICE_INSTANCE* Instance, + IN DWORD RequestId, IN PVOID Data); - -typedef struct _THREAD_OPERATIONS -{ - struct _THREAD_OPERATIONS* Next; - DWORD Id; - SOUND_THREAD_OPERATION Operation; -} THREAD_OPERATIONS, *PTHREAD_OPERATIONS; typedef struct _SOUND_THREAD { HANDLE Handle; BOOLEAN Running; - PTHREAD_OPERATIONS FirstOperation; - HANDLE KillEvent; - HANDLE RequestEvent; - HANDLE RequestCompletionEvent; + SOUND_THREAD_REQUEST_HANDLER RequestHandler; + HANDLE ReadyEvent; /* Thread waiting for a request */ + HANDLE RequestEvent; /* Caller sending a request */ + HANDLE DoneEvent; /* Thread completed a request */ + THREAD_REQUEST Request; } SOUND_THREAD, *PSOUND_THREAD; @@ -289,11 +329,28 @@ MMRESULT StartSoundThread( - IN PSOUND_DEVICE_INSTANCE Instance); + IN PSOUND_DEVICE_INSTANCE Instance, + IN SOUND_THREAD_REQUEST_HANDLER RequestHandler); MMRESULT StopSoundThread( IN PSOUND_DEVICE_INSTANCE Instance); +MMRESULT +CallSoundThread( + IN PSOUND_DEVICE_INSTANCE Instance, + IN DWORD RequestId, + IN PVOID RequestData); + + + +MMRESULT +StartWaveThread( + IN PSOUND_DEVICE_INSTANCE Instance); + +MMRESULT +StopWaveThread( + IN PSOUND_DEVICE_INSTANCE Instance); + #endif Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/devices.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/devices.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/devices.c [iso-8859-1] Sat Jul 5 18:23:50 2008 @@ -131,7 +131,8 @@ /* Save the next device pointer so we can reference it later */ NextDevice = CurrentDevice->Next; - HeapFree(GetProcessHeap(), 0, CurrentDevice); + FreeMemory(CurrentDevice); + /*HeapFree(GetProcessHeap(), 0, CurrentDevice);*/ CurrentDevice = NextDevice; } @@ -157,7 +158,6 @@ LPWSTR DevicePath) { PSOUND_DEVICE NewDevice; - ULONG DevicePathSize = 0; UCHAR TypeIndex; DPRINT("Adding a sound device to list %d\n", DeviceType); @@ -169,31 +169,37 @@ TypeIndex = DeviceType - MIN_SOUND_DEVICE_TYPE; + NewDevice = AllocateMemoryFor(SOUND_DEVICE); +/* NewDevice = (PSOUND_DEVICE) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(SOUND_DEVICE)); +*/ if ( ! NewDevice ) { return FALSE; } - - DevicePathSize = (wcslen(DevicePath) + 1) * sizeof(WCHAR); NewDevice->Next = NULL; NewDevice->FirstInstance = NULL; NewDevice->DeviceType = DeviceType; NewDevice->Handle = INVALID_HANDLE_VALUE; + NewDevice->DevicePath = AllocateWideString(wcslen(DevicePath)); +/* NewDevice->DevicePath = (LPWSTR) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, DevicePathSize); +*/ if ( ! NewDevice->DevicePath ) { - HeapFree(GetProcessHeap(), 0, NewDevice); - return FALSE; - } - - CopyMemory(NewDevice->DevicePath, DevicePath, DevicePathSize); + FreeMemory(NewDevice); + /*HeapFree(GetProcessHeap(), 0, NewDevice);*/ + return FALSE; + } + + CopyWideString(NewDevice->DevicePath, DevicePath); + /*CopyMemory(NewDevice->DevicePath, DevicePath, DevicePathSize);*/ /* Set up function table */ InitSoundDeviceFunctionTable(NewDevice); @@ -280,7 +286,9 @@ } /* Free the memory associated with the device info */ - HeapFree(GetProcessHeap(), 0, CurrentDevice); + FreeMemory(CurrentDevice->DevicePath); + FreeMemory(CurrentDevice); + /*HeapFree(GetProcessHeap(), 0, CurrentDevice);*/ CurrentDevice = NULL; DPRINT("Removal succeeded\n"); Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/instances.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/instances.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/instances.c [iso-8859-1] Sat Jul 5 18:23:50 2008 @@ -36,10 +36,13 @@ if ( ! Instance ) return MMSYSERR_INVALPARAM; + NewInstance = AllocateMemoryFor(SOUND_DEVICE_INSTANCE); +/* NewInstance = (PSOUND_DEVICE_INSTANCE) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(SOUND_DEVICE_INSTANCE)); +*/ if ( ! NewInstance ) return MMSYSERR_NOMEM; @@ -114,7 +117,8 @@ } /* Kill it! */ - HeapFree(GetProcessHeap(), 0, Instance); + FreeMemory(Instance); + /*HeapFree(GetProcessHeap(), 0, Instance);*/ return MMSYSERR_NOTSUPPORTED; } Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/nt4.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/nt4.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/nt4.c [iso-8859-1] Sat Jul 5 18:23:50 2008 @@ -45,14 +45,15 @@ /* Work out how long the string will be */ KeyLength = wcslen(REG_SERVICES_KEY_NAME_U) + 1 + wcslen(ServiceName) + 1 - + wcslen(REG_PARAMETERS_KEY_NAME_U) + 1; - - KeyLength *= sizeof(WCHAR); + + wcslen(REG_PARAMETERS_KEY_NAME_U); /* Allocate memory for the string */ + ParametersKeyName = AllocateWideString(KeyLength); +/* ParametersKeyName = (PWCHAR) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, KeyLength); +*/ if ( ! ParametersKeyName ) return MMSYSERR_NOMEM; @@ -74,11 +75,13 @@ KeyHandle) != ERROR_SUCCESS ) { /* Couldn't open the key */ - HeapFree(GetProcessHeap(), 0, ParametersKeyName); + FreeMemory(ParametersKeyName); + /*HeapFree(GetProcessHeap(), 0, ParametersKeyName);*/ return MMSYSERR_ERROR; } - HeapFree(GetProcessHeap(), 0, ParametersKeyName); + FreeMemory(ParametersKeyName); + /*HeapFree(GetProcessHeap(), 0, ParametersKeyName);*/ return MMSYSERR_NOERROR; } @@ -93,7 +96,7 @@ IN DWORD DeviceIndex, OUT PHKEY KeyHandle) { - DWORD PathSize; + DWORD PathLength; PWCHAR RegPath; if ( ! ServiceName ) @@ -110,18 +113,19 @@ Parameters\ Device123\ */ - PathSize = wcslen(REG_SERVICES_KEY_NAME_U) + 1 - + wcslen(ServiceName) + 1 - + wcslen(REG_PARAMETERS_KEY_NAME_U) + 1 - + wcslen(REG_DEVICE_KEY_NAME_U) - + GetDigitCount(DeviceIndex) + 1; - - PathSize *= sizeof(WCHAR); + PathLength = wcslen(REG_SERVICES_KEY_NAME_U) + 1 + + wcslen(ServiceName) + 1 + + wcslen(REG_PARAMETERS_KEY_NAME_U) + 1 + + wcslen(REG_DEVICE_KEY_NAME_U) + + GetDigitCount(DeviceIndex); /* Allocate storage for the string */ + RegPath = AllocateWideString(PathLength); +/* RegPath = (PWCHAR) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, PathSize); +*/ if ( ! RegPath ) { @@ -147,11 +151,13 @@ KeyHandle) != ERROR_SUCCESS ) { /* Couldn't open the key */ - HeapFree(GetProcessHeap(), 0, RegPath); + FreeMemory(RegPath); + /*HeapFree(GetProcessHeap(), 0, RegPath);*/ return MMSYSERR_ERROR; } - HeapFree(GetProcessHeap(), HEAP_ZERO_MEMORY, RegPath); + FreeMemory(RegPath); + /*HeapFree(GetProcessHeap(), HEAP_ZERO_MEMORY, RegPath);*/ return MMSYSERR_NOERROR; } @@ -206,13 +212,14 @@ } /* Account for terminating NULL */ - ++ MaxNameLength; - - DevicePath = (PWSTR) HeapAlloc(GetProcessHeap(), - HEAP_ZERO_MEMORY, - (MaxNameLength + - strlen("\\\\.\\")) * - sizeof(WCHAR)); +/* ++ MaxNameLength; + + DevicePath = (PWSTR) AllocateMemory((MaxNameLength + + strlen("\\\\.\\")) * + sizeof(WCHAR)); +*/ + DevicePath = AllocateWideString(MaxNameLength + + strlen("\\\\.\\")); /* Check that the memory allocation was successful */ if ( ! DevicePath ) @@ -230,8 +237,8 @@ /* The offset of the string following this prefix */ ValueName = DevicePath + strlen("\\\\.\\"); - /* Copy this so that it may be overwritten */ - ValueNameLength = MaxNameLength; + /* Copy this so that it may be overwritten - include NULL */ + ValueNameLength = MaxNameLength + sizeof(WCHAR); while ( RegEnumValue(DevicesKey, ValueIndex, @@ -253,8 +260,9 @@ } /* Reset variables for the next iteration */ - ValueNameLength = MaxNameLength; - ZeroMemory(ValueName, MaxNameLength); + ValueNameLength = MaxNameLength + sizeof(WCHAR); + ZeroMemory(ValueName, (MaxNameLength+1)*sizeof(WCHAR)); + /*ZeroWideString(ValueName);*/ ValueDataLength = sizeof(DWORD); ValueData = 0; ValueType = REG_NONE; @@ -262,7 +270,8 @@ ++ ValueIndex; } - HeapFree(GetProcessHeap(), 0, DevicePath); + FreeMemory(DevicePath); + /*HeapFree(GetProcessHeap(), 0, DevicePath);*/ RegCloseKey(DevicesKey); } @@ -291,7 +300,6 @@ SOUND_DEVICE_DETECTED_PROC SoundDeviceDetectedProc) { ULONG DeviceNameLength = 0; - ULONG DeviceNameSize = 0; PWSTR DeviceName = NULL; ULONG Index = 0, Count = 0; HANDLE DeviceHandle; @@ -307,13 +315,12 @@ DeviceNameLength = wcslen(BaseDeviceName); /* Consider the length of the number */ DeviceNameLength += GetDigitCount(Index); - /* ...and the terminating NULL */ - DeviceNameLength += 1; - /* Finally, this is a wide string, so... */ - DeviceNameSize = DeviceNameLength * sizeof(WCHAR); - + + DeviceName = AllocateWideString(DeviceNameLength); +/* DeviceName = (PWSTR) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, DeviceNameSize); +*/ if ( ! DeviceName ) { @@ -323,7 +330,8 @@ while ( DoSearch ) { /* Nothing like a nice clean device name */ - ZeroMemory(DeviceName, DeviceNameSize); + ZeroWideString(DeviceName); +/* ZeroMemory(DeviceName, DeviceNameSize);*/ wsprintf(DeviceName, L"%ls%d", BaseDeviceName, Index); if ( OpenKernelSoundDeviceByName(DeviceName, @@ -348,7 +356,8 @@ } } - HeapFree(GetProcessHeap(), 0, DeviceName); + FreeMemory(DeviceName); + /*HeapFree(GetProcessHeap(), 0, DeviceName);*/ return MMSYSERR_NOERROR; } Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/testing.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/testing.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/testing.c [iso-8859-1] Sat Jul 5 18:23:50 2008 @@ -174,6 +174,18 @@ } +MMRESULT +TestThreadCallback( + IN struct _SOUND_DEVICE_INSTANCE* Instance, + IN DWORD RequestId, + IN PVOID Data) +{ + MessageBox(0, L"Thread Request Callback", L"Woot", MB_OK | MB_TASKMODAL); + + return MMSYSERR_NOERROR; +} + + WINAPI VOID TestThreading() { @@ -196,16 +208,19 @@ return; } - Result = StartSoundThread(Instance); - if ( Result != MMSYSERR_NOERROR ) - { - MessageBox(0, L"Fail 2", L"Fail 2", MB_OK | MB_TASKMODAL); - return; - } + Result = StartWaveThread(Instance); + if ( Result != MMSYSERR_NOERROR ) + { + MessageBox(0, L"Fail 3", L"Fail 3", MB_OK | MB_TASKMODAL); + return; + } + + MessageBox(0, L"Click to send a request", L"Bai", MB_OK | MB_TASKMODAL); + CallSoundThread(Instance, 69, NULL); MessageBox(0, L"Click to kill thread", L"Bai", MB_OK | MB_TASKMODAL); - StopSoundThread(Instance); + StopWaveThread(Instance); /* P @@ -223,7 +238,10 @@ LPWSTR lpCmdLine, int nCmdShow) { + TestDevEnum(); +/* TestThreading(); +*/ MessageBox(0, L"Le end", L"Bai", MB_OK | MB_TASKMODAL); return 0; } Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/thread.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/thread.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/thread.c [iso-8859-1] Sat Jul 5 18:23:50 2008 @@ -10,6 +10,7 @@ History: 4 July 2008 - Created + 5 July 2008 - Implemented basic request processing */ /* @@ -21,6 +22,7 @@ #include <mmsystem.h> #include <mmebuddy.h> + DWORD WINAPI SoundThreadProc( @@ -28,20 +30,45 @@ { PSOUND_DEVICE_INSTANCE Instance; PSOUND_THREAD Thread; - HANDLE Events[2]; + /*HANDLE Events[2];*/ Instance = (PSOUND_DEVICE_INSTANCE) lpParameter; Thread = Instance->Thread; +/* Events[0] = Thread->KillEvent; Events[1] = Thread->RequestEvent; +*/ Thread->Running = TRUE; - MessageBox(0, L"Hi from thread!", L"Hi!", MB_OK | MB_TASKMODAL); + /* We're ready to do work */ + SetEvent(Thread->ReadyEvent); + + /*MessageBox(0, L"Hi from thread!", L"Hi!", MB_OK | MB_TASKMODAL);*/ while ( Thread->Running ) { + /* Wait for some work */ + WaitForSingleObject(Thread->RequestEvent, INFINITE); + + /* Do the work (request 0 kills the thread) */ + Thread->Request.Result = + Thread->RequestHandler(Instance, + Thread->Request.RequestId, + Thread->Request.Data); + + if ( Thread->Request.RequestId == 0 ) + { + Thread->Running = FALSE; + Thread->Request.Result = MMSYSERR_NOERROR; + } + + /* Notify the caller that the work is done */ + SetEvent(Thread->ReadyEvent); + SetEvent(Thread->DoneEvent); + +/* DWORD Signalled = 0; Signalled = WaitForMultipleObjects(2, Events, FALSE, INFINITE); @@ -52,11 +79,11 @@ } else if ( Signalled == WAIT_OBJECT_0 + 1 ) { - /* ... */ } - } - - MessageBox(0, L"Bye from thread!", L"Bye!", MB_OK | MB_TASKMODAL); +*/ + } + + /*MessageBox(0, L"Bye from thread!", L"Bye!", MB_OK | MB_TASKMODAL);*/ ExitThread(0); return 0; @@ -74,21 +101,21 @@ return MMSYSERR_NOMEM; } - /* Create the request completion event */ - Thread->RequestCompletionEvent = CreateEvent(NULL, FALSE, FALSE, NULL); - - if ( ! Thread->RequestCompletionEvent ) + /* Create the 'ready' event */ + Thread->ReadyEvent = CreateEvent(NULL, FALSE, FALSE, NULL); + + if ( ! Thread->ReadyEvent ) { CloseHandle(Thread->RequestEvent); return MMSYSERR_NOMEM; } - /* Create the kill event */ - Thread->KillEvent = CreateEvent(NULL, FALSE, FALSE, NULL); - - if ( ! Thread->KillEvent ) - { - CloseHandle(Thread->RequestCompletionEvent); + /* Create the 'done' event */ + Thread->DoneEvent = CreateEvent(NULL, FALSE, FALSE, NULL); + + if ( ! Thread->DoneEvent ) + { + CloseHandle(Thread->ReadyEvent); CloseHandle(Thread->RequestEvent); return MMSYSERR_NOMEM; } @@ -101,8 +128,13 @@ IN PSOUND_THREAD Thread) { CloseHandle(Thread->RequestEvent); - CloseHandle(Thread->RequestCompletionEvent); - CloseHandle(Thread->KillEvent); + Thread->RequestEvent = INVALID_HANDLE_VALUE; + + CloseHandle(Thread->ReadyEvent); + Thread->ReadyEvent = INVALID_HANDLE_VALUE; + + CloseHandle(Thread->DoneEvent); + Thread->DoneEvent = INVALID_HANDLE_VALUE; return MMSYSERR_NOERROR; } @@ -110,12 +142,16 @@ MMRESULT StartSoundThread( - IN PSOUND_DEVICE_INSTANCE Instance) + IN PSOUND_DEVICE_INSTANCE Instance, + IN SOUND_THREAD_REQUEST_HANDLER RequestHandler) { PSOUND_THREAD SoundThread = NULL; /* Validate parameters */ if ( ! Instance ) + return MMSYSERR_INVALPARAM; + + if ( ! RequestHandler ) return MMSYSERR_INVALPARAM; /* Only allowed one thread per instance */ @@ -123,9 +159,7 @@ return MMSYSERR_ERROR; /* Allocate memory for the thread info */ - SoundThread = (PSOUND_THREAD) HeapAlloc(GetProcessHeap(), - HEAP_ZERO_MEMORY, - sizeof(SOUND_THREAD)); + SoundThread = AllocateMemoryFor(SOUND_THREAD); if ( ! SoundThread ) return MMSYSERR_NOMEM; @@ -133,19 +167,24 @@ /* Initialise */ SoundThread->Running = FALSE; SoundThread->Handle = INVALID_HANDLE_VALUE; - SoundThread->FirstOperation = NULL; + SoundThread->RequestHandler = RequestHandler; + SoundThread->ReadyEvent = INVALID_HANDLE_VALUE; + SoundThread->RequestEvent = INVALID_HANDLE_VALUE; + SoundThread->DoneEvent = INVALID_HANDLE_VALUE; + + /* No need to initialise the requests */ /* Create the events */ if ( CreateThreadEvents(SoundThread) != MMSYSERR_NOERROR ) { - HeapFree(GetProcessHeap(), 0, SoundThread); + FreeMemory(SoundThread); return MMSYSERR_NOMEM; } if ( ! SoundThread->RequestEvent ) { CloseHandle(SoundThread->RequestEvent); - HeapFree(GetProcessHeap(), 0, SoundThread); + FreeMemory(SoundThread); return MMSYSERR_NOMEM; } @@ -159,7 +198,7 @@ if (SoundThread->Handle == INVALID_HANDLE_VALUE ) { - HeapFree(GetProcessHeap(), 0, SoundThread); + FreeMemory(SoundThread); return Win32ErrorToMmResult(GetLastError()); } @@ -182,49 +221,57 @@ if ( ! Instance->Thread ) return MMSYSERR_ERROR; - /* Make the thread quit */ - Instance->Thread->Running = FALSE; - - /* Wait for the thread to respond to our gentle nudge */ - SetEvent(Instance->Thread->KillEvent); - WaitForSingleObject(Instance->Thread, INFINITE); - CloseHandle(Instance->Thread); /* correct way? */ - - /* TODO: A bunch of other stuff - WAIT for thread to die */ - /* Also clean up the events */ - + /* Send request zero to ask the thread to end */ + CallSoundThread(Instance, 0, NULL); + + /* Wait for the thread to exit */ + WaitForSingleObject(Instance->Thread->Handle, INFINITE); + + /* Finish with the thread */ + CloseHandle(Instance->Thread->Handle); + Instance->Thread->Handle = INVALID_HANDLE_VALUE; + + /* Clean up the thread events */ DestroyThreadEvents(Instance->Thread); - HeapFree(GetProcessHeap(), 0, Instance->Thread); - - return MMSYSERR_NOERROR; -} - - -/* - Thread must be started before calling this! -*/ - -MMRESULT -AddSoundThreadOperation( - PSOUND_DEVICE_INSTANCE Instance, - DWORD OperationId, - SOUND_THREAD_OPERATION OperationFunc) -{ - /*SOUND_THREAD_OPERATION OriginalFirstOp;*/ + + /* Free memory associated with the thread */ + FreeMemory(Instance->Thread); + Instance->Thread = NULL; + + return MMSYSERR_NOERROR; +} + +MMRESULT +CallSoundThread( + IN PSOUND_DEVICE_INSTANCE Instance, + IN DWORD RequestId, + IN PVOID RequestData) +{ + MMRESULT Result; if ( ! Instance ) - return MMSYSERR_INVALPARAM; - - if ( ! OperationFunc ) return MMSYSERR_INVALPARAM; if ( ! Instance->Thread ) return MMSYSERR_ERROR; -/* - OriginalFirstOp = Instance->Thread->FirstOperation; - Instance->Thread->FirstOperation->Next = -*/ - - return MMSYSERR_NOTSUPPORTED; -} + /* Wait for the thread to be ready */ + WaitForSingleObject(Instance->Thread->ReadyEvent, INFINITE); + + /* Load the request */ + Instance->Thread->Request.DeviceInstance = Instance; + Instance->Thread->Request.RequestId = RequestId; + Instance->Thread->Request.Data = RequestData; + Instance->Thread->Request.Result = MMSYSERR_NOTSUPPORTED; + + /* Notify the thread that there's a request to be processed */ + SetEvent(Instance->Thread->RequestEvent); + + /* Wait for the thread to be ready (request complete) */ + WaitForSingleObject(Instance->Thread->DoneEvent, INFINITE); + + /* Grab the result */ + Result = Instance->Thread->Request.Result; + + return Result; +} Modified: branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/wavethread.c URL:
http://svn.reactos.org/svn/reactos/branches/silverblade-audio/lib/drivers/s…
============================================================================== --- branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/wavethread.c [iso-8859-1] (original) +++ branches/silverblade-audio/lib/drivers/sound/mmebuddy/wave/wavethread.c [iso-8859-1] Sat Jul 5 18:23:50 2008 @@ -18,21 +18,46 @@ #include <mmebuddy.h> MMRESULT +ProcessWaveThreadRequest( + IN PSOUND_DEVICE_INSTANCE Instance, + IN DWORD RequestId, + IN PVOID Data) +{ + /* Just some temporary testing code for now */ + WCHAR msg[128]; + wsprintf(msg, L"Request %d received", RequestId); + + MessageBox(0, msg, L"Request", MB_OK | MB_TASKMODAL); + + return MMSYSERR_NOTSUPPORTED; +} + +MMRESULT StartWaveThread( IN PSOUND_DEVICE_INSTANCE Instance) { - MMRESULT Result; + MMRESULT Result = MMSYSERR_NOERROR; if ( ! Instance ) return MMSYSERR_INVALPARAM; /* Kick off the thread */ - Result = StartSoundThread(Instance); + Result = StartSoundThread(Instance, ProcessWaveThreadRequest); if ( Result != MMSYSERR_NOERROR ) { return Result; } /* AddSoundThreadOperation(Instance, 69, SayHello); */ - return MMSYSERR_NOTSUPPORTED; + return MMSYSERR_NOERROR; } + +MMRESULT +StopWaveThread( + IN PSOUND_DEVICE_INSTANCE Instance) +{ + if ( ! Instance ) + return MMSYSERR_INVALPARAM; + + return StopSoundThread(Instance); +}
16 years, 5 months
1
0
0
0
[cfinck] 34314: Reenable the VGA option at 1st stage setup now that it's fixed. Physicus, you rock! :-) See issue #2073 for more details.
by cfinck@svn.reactos.org
Author: cfinck Date: Sat Jul 5 18:12:12 2008 New Revision: 34314 URL:
http://svn.reactos.org/svn/reactos?rev=34314&view=rev
Log: Reenable the VGA option at 1st stage setup now that it's fixed. Physicus, you rock! :-) See issue #2073 for more details. Modified: trunk/reactos/boot/bootdata/txtsetup.sif Modified: trunk/reactos/boot/bootdata/txtsetup.sif URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/txtsetup.sif…
============================================================================== --- trunk/reactos/boot/bootdata/txtsetup.sif [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/txtsetup.sif [iso-8859-1] Sat Jul 5 18:12:12 2008 @@ -80,7 +80,7 @@ [Display] ;<id> = <user friendly name>,<spare>,<service key name>,<hight>,<width>,<bpp> -;vga = "VGA Display (640x480x4)",,Vga,640,480,4 +vga = "VGA Display (640x480x4)",,Vga,640,480,4 vbe_640x480x8 = "VESA Display (640x480x8)",,VBE,640,480,8 vbe_640x480x16 = "VESA Display (640x480x16)",,VBE,640,480,16 vbe_640x480x32 = "VESA Display (640x480x32)",,VBE,640,480,32
16 years, 5 months
1
0
0
0
[tkreuzer] 34313: fix vgaddi by linking to libcntpr to resolve crt imports and include ioaccess.h to avoid hal imports, should fix bug 2073 See issue #2073 for more details.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Jul 5 17:41:14 2008 New Revision: 34313 URL:
http://svn.reactos.org/svn/reactos?rev=34313&view=rev
Log: fix vgaddi by linking to libcntpr to resolve crt imports and include ioaccess.h to avoid hal imports, should fix bug 2073 See issue #2073 for more details. Modified: trunk/reactos/drivers/video/displays/vga/vgaddi.h trunk/reactos/drivers/video/displays/vga/vgaddi.rbuild Modified: trunk/reactos/drivers/video/displays/vga/vgaddi.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/displays/vga…
============================================================================== --- trunk/reactos/drivers/video/displays/vga/vgaddi.h [iso-8859-1] (original) +++ trunk/reactos/drivers/video/displays/vga/vgaddi.h [iso-8859-1] Sat Jul 5 17:41:14 2008 @@ -10,6 +10,7 @@ #include <winddi.h> #include <winioctl.h> #include <ntddvdeo.h> +#include <ioaccess.h> #include "vgavideo/vgavideo.h" #include "objects/brush.h" @@ -30,10 +31,6 @@ #define DDKCDECLAPI __cdecl ULONG DbgPrint(PCCH Format,...); -VOID DDKAPI WRITE_PORT_UCHAR(IN PUCHAR Port, IN UCHAR Value); -VOID DDKAPI WRITE_PORT_USHORT(IN PUSHORT Port, IN USHORT Value); -VOID DDKAPI WRITE_REGISTER_UCHAR(IN PUCHAR Register, IN UCHAR Value); -UCHAR DDKAPI READ_REGISTER_UCHAR(IN PUCHAR Register); static __inline BOOLEAN RemoveEntryList( Modified: trunk/reactos/drivers/video/displays/vga/vgaddi.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/displays/vga…
============================================================================== --- trunk/reactos/drivers/video/displays/vga/vgaddi.rbuild [iso-8859-1] (original) +++ trunk/reactos/drivers/video/displays/vga/vgaddi.rbuild [iso-8859-1] Sat Jul 5 17:41:14 2008 @@ -3,8 +3,7 @@ <module name="vgaddi" type="kernelmodedll" entrypoint="DrvEnableDriver@12" installbase="system32" installname="vgaddi.dll"> <importlibrary definition="vgaddi.def" /> <include base="vgaddi">.</include> - <library>ntoskrnl</library> - <library>hal</library> + <library>libcntpr</library> <library>win32k</library> <directory name="main"> <file>enable.c</file>
16 years, 5 months
1
0
0
0
[ekohl] 34312: Implement removal of a user from a user group.
by ekohl@svn.reactos.org
Author: ekohl Date: Sat Jul 5 16:55:16 2008 New Revision: 34312 URL:
http://svn.reactos.org/svn/reactos?rev=34312&view=rev
Log: Implement removal of a user from a user group. Modified: trunk/reactos/dll/cpl/usrmgr/groupprops.c trunk/reactos/dll/cpl/usrmgr/lang/en-US.rc trunk/reactos/dll/cpl/usrmgr/resource.h trunk/reactos/dll/cpl/usrmgr/userprops.c trunk/reactos/dll/cpl/usrmgr/users.c Modified: trunk/reactos/dll/cpl/usrmgr/groupprops.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/usrmgr/groupprops.…
============================================================================== --- trunk/reactos/dll/cpl/usrmgr/groupprops.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/usrmgr/groupprops.c [iso-8859-1] Sat Jul 5 16:55:16 2008 @@ -57,6 +57,84 @@ dwSidSize += wsprintf(pTextSid + dwSidSize, TEXT("-%lu"), *GetSidSubAuthority(pSid, dwCounter)); } +} + + +static VOID +RemoveUserFromGroup(HWND hwndDlg, + PGENERAL_GROUP_DATA pGroupData) +{ + TCHAR szUserName[UNLEN]; + TCHAR szText[256]; + LOCALGROUP_MEMBERS_INFO_3 memberInfo; + HWND hwndLV; + INT nItem; + NET_API_STATUS status; + + hwndLV = GetDlgItem(hwndDlg, IDC_GROUP_GENERAL_MEMBERS); + nItem = ListView_GetNextItem(hwndLV, -1, LVNI_SELECTED); + if (nItem == -1) + return; + + /* Get the new user name */ + ListView_GetItemText(hwndLV, + nItem, 0, + szUserName, + UNLEN); + + /* Display a warning message because the remove operation cannot be reverted */ + wsprintf(szText, TEXT("Do you really want to remove the user \"%s\" from the group \"%s\"?"), + szUserName, pGroupData->szGroupName); + if (MessageBox(NULL, szText, TEXT("User Accounts"), MB_ICONWARNING | MB_YESNO) == IDNO) + return; + + memberInfo.lgrmi3_domainandname = szUserName; + + status = NetLocalGroupDelMembers(NULL, pGroupData->szGroupName, + 3, (LPBYTE)&memberInfo, 1); + if (status != NERR_Success) + { + TCHAR szText[256]; + wsprintf(szText, TEXT("Error: %u"), status); + MessageBox(NULL, szText, TEXT("NetLocalGroupDelMembers"), MB_ICONERROR | MB_OK); + return; + } + + (void)ListView_DeleteItem(hwndLV, nItem); + + if (ListView_GetItemCount(hwndLV) == 0) + EnableWindow(GetDlgItem(hwndDlg, IDC_GROUP_GENERAL_REMOVE), FALSE); +} + + +static BOOL +OnNotify(HWND hwndDlg, + PGENERAL_GROUP_DATA pGroupData, + LPARAM lParam) +{ + LPNMLISTVIEW lpnmlv = (LPNMLISTVIEW)lParam; + + switch (((LPNMHDR)lParam)->idFrom) + { + case IDC_GROUP_GENERAL_MEMBERS: + switch (((LPNMHDR)lParam)->code) + { + case NM_CLICK: + EnableWindow(GetDlgItem(hwndDlg, IDC_GROUP_GENERAL_REMOVE), (lpnmlv->iItem != -1)); + break; + + case LVN_KEYDOWN: + if (((LPNMLVKEYDOWN)lParam)->wVKey == VK_DELETE) + { + RemoveUserFromGroup(hwndDlg, pGroupData); + } + break; + + } + break; + } + + return FALSE; } @@ -216,6 +294,10 @@ if (HIWORD(wParam) == EN_CHANGE) PropSheet_Changed(GetParent(hwndDlg), hwndDlg); break; + + case IDC_GROUP_GENERAL_REMOVE: + RemoveUserFromGroup(hwndDlg, pGroupData); + break; } break; @@ -224,6 +306,10 @@ { SetGeneralGroupData(hwndDlg, pGroupData); return TRUE; + } + else + { + return OnNotify(hwndDlg, pGroupData, lParam); } break; Modified: trunk/reactos/dll/cpl/usrmgr/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/usrmgr/lang/en-US.…
============================================================================== --- trunk/reactos/dll/cpl/usrmgr/lang/en-US.rc [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/usrmgr/lang/en-US.rc [iso-8859-1] Sat Jul 5 16:55:16 2008 @@ -62,6 +62,8 @@ LTEXT "Member of:", -1, 7, 7, 56, 8 CONTROL "", IDC_USER_MEMBERSHIP_LIST, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 7, 18, 238, 173, WS_EX_CLIENTEDGE + PUSHBUTTON "Add...", IDC_USER_MEMBERSHIP_ADD, 7, 197, 50, 14, WS_DISABLED + PUSHBUTTON "Remove", IDC_USER_MEMBERSHIP_REMOVE, 61, 197, 50, 14, WS_DISABLED END @@ -97,6 +99,8 @@ LTEXT "Members:", -1, 7, 63, 45, 8 CONTROL "", IDC_GROUP_GENERAL_MEMBERS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 7, 74, 238, 117, WS_EX_CLIENTEDGE + PUSHBUTTON "Add...", IDC_GROUP_GENERAL_ADD, 7, 197, 50, 14, WS_DISABLED + PUSHBUTTON "Remove", IDC_GROUP_GENERAL_REMOVE, 61, 197, 50, 14, WS_DISABLED END Modified: trunk/reactos/dll/cpl/usrmgr/resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/usrmgr/resource.h?…
============================================================================== --- trunk/reactos/dll/cpl/usrmgr/resource.h [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/usrmgr/resource.h [iso-8859-1] Sat Jul 5 16:55:16 2008 @@ -49,7 +49,8 @@ #define IDC_GROUP_GENERAL_NAME 341 #define IDC_GROUP_GENERAL_DESCRIPTION 342 #define IDC_GROUP_GENERAL_MEMBERS 343 - +#define IDC_GROUP_GENERAL_ADD 344 +#define IDC_GROUP_GENERAL_REMOVE 345 #define IDD_CHANGE_PASSWORD 350 #define IDC_EDIT_PASSWORD1 351 @@ -67,8 +68,10 @@ #define IDC_USER_NEW_NEVER_EXPIRES 368 #define IDC_USER_NEW_DISABLED 369 -#define IDD_USER_MEMBERSHIP 370 -#define IDC_USER_MEMBERSHIP_LIST 371 +#define IDD_USER_MEMBERSHIP 370 +#define IDC_USER_MEMBERSHIP_LIST 371 +#define IDC_USER_MEMBERSHIP_ADD 372 +#define IDC_USER_MEMBERSHIP_REMOVE 373 #define IDD_USER_PROFILE 380 #define IDC_USER_PROFILE_PATH 381 Modified: trunk/reactos/dll/cpl/usrmgr/userprops.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/usrmgr/userprops.c…
============================================================================== --- trunk/reactos/dll/cpl/usrmgr/userprops.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/usrmgr/userprops.c [iso-8859-1] Sat Jul 5 16:55:16 2008 @@ -23,6 +23,12 @@ TCHAR szUserName[1]; } PROFILE_USER_DATA, *PPROFILE_USER_DATA; +typedef struct _MEMBERSHIP_USER_DATA +{ + PLOCALGROUP_USERS_INFO_0 pGroupData; + DWORD dwGroupCount; + TCHAR szUserName[1]; +} MEMBERSHIP_USER_DATA, *PMEMBERSHIP_USER_DATA; static VOID @@ -258,11 +264,9 @@ static VOID -GetMembershipData(HWND hwndDlg, LPTSTR lpUserName) -{ - PLOCALGROUP_USERS_INFO_0 usersInfo = NULL; +GetUserMembershipData(HWND hwndDlg, PMEMBERSHIP_USER_DATA pUserData) +{ NET_API_STATUS status; - DWORD dwRead; DWORD dwTotal; DWORD i; HIMAGELIST hImgList; @@ -293,28 +297,102 @@ (void)ListView_InsertColumn(hwndLV, 0, &column); - status = NetUserGetLocalGroups(NULL, lpUserName, 0, 0, - (LPBYTE*)&usersInfo, + status = NetUserGetLocalGroups(NULL, pUserData->szUserName, 0, 0, + (LPBYTE*)&pUserData->pGroupData, MAX_PREFERRED_LENGTH, - &dwRead, + &pUserData->dwGroupCount, &dwTotal); if (status != NERR_Success) return; - for (i = 0; i < dwRead; i++) + for (i = 0; i < pUserData->dwGroupCount; i++) { ZeroMemory(&lvi, sizeof(lvi)); lvi.mask = LVIF_TEXT | LVIF_STATE | LVIF_IMAGE; - lvi.pszText = usersInfo[i].lgrui0_name; + lvi.pszText = pUserData->pGroupData[i].lgrui0_name; lvi.state = 0; lvi.iImage = 0; (void)ListView_InsertItem(hwndLV, &lvi); } - - - NetApiBufferFree(usersInfo); - +} + + +static VOID +RemoveGroupFromUser(HWND hwndDlg, + PMEMBERSHIP_USER_DATA pUserData) +{ + TCHAR szGroupName[UNLEN]; + TCHAR szText[256]; + LOCALGROUP_MEMBERS_INFO_3 memberInfo; + HWND hwndLV; + INT nItem; + NET_API_STATUS status; + + hwndLV = GetDlgItem(hwndDlg, IDC_USER_MEMBERSHIP_LIST); + nItem = ListView_GetNextItem(hwndLV, -1, LVNI_SELECTED); + if (nItem == -1) + return; + + /* Get the new user name */ + ListView_GetItemText(hwndLV, + nItem, 0, + szGroupName, + UNLEN); + + /* Display a warning message because the remove operation cannot be reverted */ + wsprintf(szText, TEXT("Do you really want to remove the user \"%s\" from the group \"%s\"?"), + pUserData->szUserName, szGroupName); + if (MessageBox(NULL, szText, TEXT("User Accounts"), MB_ICONWARNING | MB_YESNO) == IDNO) + return; + + memberInfo.lgrmi3_domainandname = pUserData->szUserName; + + status = NetLocalGroupDelMembers(NULL, szGroupName, + 3, (LPBYTE)&memberInfo, 1); + if (status != NERR_Success) + { + TCHAR szText[256]; + wsprintf(szText, TEXT("Error: %u"), status); + MessageBox(NULL, szText, TEXT("NetLocalGroupDelMembers"), MB_ICONERROR | MB_OK); + return; + } + + (void)ListView_DeleteItem(hwndLV, nItem); + + if (ListView_GetItemCount(hwndLV) == 0) + EnableWindow(GetDlgItem(hwndDlg, IDC_USER_MEMBERSHIP_REMOVE), FALSE); +} + + +static BOOL +OnNotify(HWND hwndDlg, + PMEMBERSHIP_USER_DATA pUserData, + LPARAM lParam) +{ + LPNMLISTVIEW lpnmlv = (LPNMLISTVIEW)lParam; + + switch (((LPNMHDR)lParam)->idFrom) + { + case IDC_USER_MEMBERSHIP_LIST: + switch (((LPNMHDR)lParam)->code) + { + case NM_CLICK: + EnableWindow(GetDlgItem(hwndDlg, IDC_USER_MEMBERSHIP_REMOVE), (lpnmlv->iItem != -1)); + break; + + case LVN_KEYDOWN: + if (((LPNMLVKEYDOWN)lParam)->wVKey == VK_DELETE) + { + RemoveGroupFromUser(hwndDlg, pUserData); + } + break; + + } + break; + } + + return FALSE; } @@ -324,18 +402,55 @@ WPARAM wParam, LPARAM lParam) { + PMEMBERSHIP_USER_DATA pUserData; UNREFERENCED_PARAMETER(lParam); UNREFERENCED_PARAMETER(wParam); UNREFERENCED_PARAMETER(hwndDlg); + pUserData= (PMEMBERSHIP_USER_DATA)GetWindowLongPtr(hwndDlg, DWLP_USER); + switch (uMsg) { case WM_INITDIALOG: - GetMembershipData(hwndDlg, - (LPTSTR)((PROPSHEETPAGE *)lParam)->lParam); - break; - + pUserData = (PMEMBERSHIP_USER_DATA)HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, + sizeof(MEMBERSHIP_USER_DATA) + + lstrlen((LPTSTR)((PROPSHEETPAGE *)lParam)->lParam) * sizeof(TCHAR)); + lstrcpy(pUserData->szUserName, (LPTSTR)((PROPSHEETPAGE *)lParam)->lParam); + + SetWindowLongPtr(hwndDlg, DWLP_USER, (INT_PTR)pUserData); + + GetUserMembershipData(hwndDlg, pUserData); + break; + + case WM_COMMAND: + switch (LOWORD(wParam)) + { + case IDC_USER_MEMBERSHIP_REMOVE: + RemoveGroupFromUser(hwndDlg, pUserData); + break; + } + break; + + case WM_NOTIFY: + if (((LPPSHNOTIFY)lParam)->hdr.code == PSN_APPLY) + { + return TRUE; + } + else + { + return OnNotify(hwndDlg, pUserData, lParam); + } + break; + + + case WM_DESTROY: + if (pUserData->pGroupData) + NetApiBufferFree(pUserData->pGroupData); + + HeapFree(GetProcessHeap(), 0, pUserData); + break; } return FALSE; Modified: trunk/reactos/dll/cpl/usrmgr/users.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/usrmgr/users.c?rev…
============================================================================== --- trunk/reactos/dll/cpl/usrmgr/users.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/usrmgr/users.c [iso-8859-1] Sat Jul 5 16:55:16 2008 @@ -346,7 +346,7 @@ UNLEN); /* Display a warning message because the delete operation cannot be reverted */ - wsprintf(szText, TEXT("Dou you really want to delete the user \"%s\"?"), szUserName); + wsprintf(szText, TEXT("Do you really want to delete the user \"%s\"?"), szUserName); if (MessageBox(NULL, szText, TEXT("User Accounts"), MB_ICONWARNING | MB_YESNO) == IDNO) return FALSE;
16 years, 5 months
1
0
0
0
[mkupfer] 34311: Maciej Bialas <bjauy AT tlen DOT pl> - Updated polish version of base/setup/reactos. - See issue #3456 for more details.
by mkupfer@svn.reactos.org
Author: mkupfer Date: Sat Jul 5 16:36:00 2008 New Revision: 34311 URL:
http://svn.reactos.org/svn/reactos?rev=34311&view=rev
Log: Maciej Bialas <bjauy AT tlen DOT pl> - Updated polish version of base/setup/reactos. - See issue #3456 for more details. Modified: trunk/reactos/base/setup/reactos/lang/pl-PL.rc trunk/reactos/base/setup/reactos/rsrc.rc Modified: trunk/reactos/base/setup/reactos/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/reactos/lang/pl…
============================================================================== --- trunk/reactos/base/setup/reactos/lang/pl-PL.rc [iso-8859-1] (original) +++ trunk/reactos/base/setup/reactos/lang/pl-PL.rc [iso-8859-1] Sat Jul 5 16:36:00 2008 @@ -3,15 +3,21 @@ * xxrogers(a)users.sourceforge.net *
https://sourceforge.net/projects/reactospl
*
http://rogers.cyberdusk.pl/
+ * update - niski (bjauy(a)o2.pl) */ -LANGUAGE LANG_POLISH, SUBLANG_DEFAULT - -/* String Tables */ -STRINGTABLE DISCARDABLE -BEGIN - IDS_CAPTION "Instalator ReactOS" - IDS_TEXT "Nie mo¿esz zainstalowaæ ReactOS bezporednio!\n\nProszê zrestartowaæ komputer i uruchomiæ z tego CD, aby zainstalowaæ ReactOS." + LANGUAGE LANG_POLISH, SUBLANG_DEFAULT + + IDD_STARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 + STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU + CAPTION "Instalator ReactOS" + FONT 8, "MS Shell Dlg" + BEGIN + LTEXT "Witaj w Kreatorze instalacji ReactOS.", IDC_STARTTITLE, 115, 8, 195, 24 + LTEXT "Nie mo¿esz zainstalowaæ ReactOS bezporednio! "\ + "Uruchom ponownie komputer z tej p³yty aby "\ + "zainstalowaæ ReactOS.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "Nacinij przycisk aby zakoñczyæ pracê Instalatora.", IDC_STATIC, 115, 169, 195, 17 END /* EOF */ Modified: trunk/reactos/base/setup/reactos/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/reactos/rsrc.rc…
============================================================================== --- trunk/reactos/base/setup/reactos/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/setup/reactos/rsrc.rc [iso-8859-1] Sat Jul 5 16:36:00 2008 @@ -16,9 +16,9 @@ #include "lang/ja-JP.rc" #include "lang/lt-LT.rc" #include "lang/nb-NO.rc" -#include "lang/nl-NL.rc" +#include "lang/nl-NL.rc"*/ #include "lang/pl-PL.rc" -#include "lang/pt-BR.rc" +/*#include "lang/pt-BR.rc" #include "lang/ru-RU.rc" #include "lang/sk-SK.rc" #include "lang/sv-SE.rc"
16 years, 5 months
1
0
0
0
[mkupfer] 34310: - title font for a syssetup alike look added
by mkupfer@svn.reactos.org
Author: mkupfer Date: Sat Jul 5 14:38:08 2008 New Revision: 34310 URL:
http://svn.reactos.org/svn/reactos?rev=34310&view=rev
Log: - title font for a syssetup alike look added Modified: trunk/reactos/base/setup/reactos/reactos.c Modified: trunk/reactos/base/setup/reactos/reactos.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/reactos/reactos…
============================================================================== --- trunk/reactos/base/setup/reactos/reactos.c [iso-8859-1] (original) +++ trunk/reactos/base/setup/reactos/reactos.c [iso-8859-1] Sat Jul 5 14:38:08 2008 @@ -26,9 +26,13 @@ #include <windows.h> #include <commctrl.h> +#include <tchar.h> #include "resource.h" +/* GLOBALS ******************************************************************/ + +HFONT hTitleFont; /* FUNCTIONS ****************************************************************/ @@ -53,6 +57,31 @@ 0, 0, SWP_NOSIZE); +} + +static HFONT +CreateTitleFont(VOID) +{ + NONCLIENTMETRICS ncm; + LOGFONT LogFont; + HDC hdc; + INT FontSize; + HFONT hFont; + + ncm.cbSize = sizeof(NONCLIENTMETRICS); + SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &ncm, 0); + + LogFont = ncm.lfMessageFont; + LogFont.lfWeight = FW_BOLD; + _tcscpy(LogFont.lfFaceName, _T("MS Shell Dlg")); + + hdc = GetDC(NULL); + FontSize = 12; + LogFont.lfHeight = 0 - GetDeviceCaps (hdc, LOGPIXELSY) * FontSize / 72; + hFont = CreateFontIndirect(&LogFont); + ReleaseDC(NULL, hdc); + + return hFont; } static INT_PTR CALLBACK @@ -83,7 +112,14 @@ hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL); ShowWindow (hwndControl, SW_HIDE); EnableWindow (hwndControl, FALSE); - } + + /* Set title font */ + SendDlgItemMessage(hwndDlg, + IDC_STARTTITLE, + WM_SETFONT, + (WPARAM)hTitleFont, + (LPARAM)TRUE); +} break; case WM_NOTIFY: { @@ -139,8 +175,13 @@ psh.pszbmWatermark = MAKEINTRESOURCE(IDB_WATERMARK); psh.pszbmHeader = MAKEINTRESOURCE(IDB_HEADER); + /* Create title font */ + hTitleFont = CreateTitleFont(); + /* Display the wizard */ PropertySheet(&psh); + + DeleteObject(hTitleFont); return 0;
16 years, 5 months
1
0
0
0
← Newer
1
...
65
66
67
68
69
70
71
...
77
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
Results per page:
10
25
50
100
200