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
February 2018
----- 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
24 participants
240 discussions
Start a n
N
ew thread
04/04: [ACLAYERS] Add WIN8 and WIN81 VersionLie shims
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2ffc6846996748c7d81bd…
commit 2ffc6846996748c7d81bd569ba44ffd8bf858bc4 Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Sat Feb 10 15:31:55 2018 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sat Feb 24 19:33:56 2018 +0100 [ACLAYERS] Add WIN8 and WIN81 VersionLie shims --- dll/appcompat/shims/layer/versionlie.c | 11 +++++++++++ media/sdb/sysmain.xml | 28 ++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/dll/appcompat/shims/layer/versionlie.c b/dll/appcompat/shims/layer/versionlie.c index 704a8b8da1..38db1d0a19 100644 --- a/dll/appcompat/shims/layer/versionlie.c +++ b/dll/appcompat/shims/layer/versionlie.c @@ -48,6 +48,8 @@ VersionLieInfo g_WinVistaSP2 = { 0x17720006, 6, 0, 6002, VER_PLATFORM_WIN32_NT, VersionLieInfo g_Win7RTM = { 0x1db00106, 6, 1, 7600, VER_PLATFORM_WIN32_NT, 0, 0 }; +VersionLieInfo g_Win8RTM = { 0x23f00206, 6, 2, 9200, VER_PLATFORM_WIN32_NT, 0, 0 }; +VersionLieInfo g_Win81RTM = { 0x25800306, 6, 3, 9600, VER_PLATFORM_WIN32_NT, 0, 0 }; /* Fill the OSVERSIONINFO[EX][W|A] struct with the info from the generic VersionLieInfo */ @@ -229,3 +231,12 @@ BOOL WINAPI SHIM_OBJ_NAME(APIHook_GetVersionExW)(LPOSVERSIONINFOEXA lpOsVersionI #include "versionlie.inl" +#define SHIM_NS Win8RTMVersionLie +#define VERSION_INFO g_Win8RTM +#include "versionlie.inl" + +#define SHIM_NS Win81RTMVersionLie +#define VERSION_INFO g_Win81RTM +#include "versionlie.inl" + + diff --git a/media/sdb/sysmain.xml b/media/sdb/sysmain.xml index 07a32edce6..a27542e38e 100644 --- a/media/sdb/sysmain.xml +++ b/media/sdb/sysmain.xml @@ -173,6 +173,24 @@ <EXCLUDE MODULE="oleaut32.dll" /> <DLLFILE>aclayers.dll</DLLFILE> </SHIM> + <SHIM NAME="Win8RTMVersionLie"> + <INCLUDE MODULE="shell32.dll" /> + <INCLUDE MODULE="msi.dll" /> + <EXCLUDE MODULE="kernel32.dll" /> + <EXCLUDE MODULE="msvcrt.dll" /> + <EXCLUDE MODULE="ole32.dll" /> + <EXCLUDE MODULE="oleaut32.dll" /> + <DLLFILE>aclayers.dll</DLLFILE> + </SHIM> + <SHIM NAME="Win81RTMVersionLie"> + <INCLUDE MODULE="shell32.dll" /> + <INCLUDE MODULE="msi.dll" /> + <EXCLUDE MODULE="kernel32.dll" /> + <EXCLUDE MODULE="msvcrt.dll" /> + <EXCLUDE MODULE="ole32.dll" /> + <EXCLUDE MODULE="oleaut32.dll" /> + <DLLFILE>aclayers.dll</DLLFILE> + </SHIM> <!-- Display mode shims --> @@ -291,6 +309,16 @@ <SHIM_REF NAME="Win7RTMVersionLie" /> <!-- TODO: Add more fixes! --> </LAYER> + <LAYER NAME="WIN8RTM"> + <SHIM_REF NAME="Win8RTMVersionLie" /> + <!-- TODO: Add more fixes! --> + </LAYER> + <LAYER NAME="WIN81RTM"> + <SHIM_REF NAME="Win81RTMVersionLie" /> + <!-- TODO: Add more fixes! --> + </LAYER> + + <!-- Display mode layers -->
6 years, 10 months
1
0
0
0
03/04: [APPSHIM_APITEST] Add Win8 and Win81 versionlie tests
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8e1f3429905776f604162…
commit 8e1f3429905776f604162c93eb92f0b31ff4516f Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Sat Feb 10 15:31:06 2018 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sat Feb 24 19:33:50 2018 +0100 [APPSHIM_APITEST] Add Win8 and Win81 versionlie tests --- modules/rostests/apitests/appshim/versionlie.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/rostests/apitests/appshim/versionlie.c b/modules/rostests/apitests/appshim/versionlie.c index 5848f98aaf..43c9dc665c 100644 --- a/modules/rostests/apitests/appshim/versionlie.c +++ b/modules/rostests/apitests/appshim/versionlie.c @@ -196,7 +196,7 @@ static void verify_shim_imp(PHOOKAPI hook, const VersionLieInfo* info, PCSTR shi return; } ver = ((GETVERSIONPROC)hook->ReplacementFunction)(); - winetest_ok(info->FullVersion == ver, "Expected GetVersion to return %u, was: %u for %s\n", info->FullVersion, ver, shim); + winetest_ok(info->FullVersion == ver, "Expected GetVersion to return 0x%x, was: 0x%x for %s\n", info->FullVersion, ver, shim); } @@ -282,6 +282,10 @@ VersionLieInfo g_WinVistaSP2 = { 0x17720006, 6, 0, 6002, VER_PLATFORM_WIN32_NT, VersionLieInfo g_Win7RTM = { 0x1db00106, 6, 1, 7600, VER_PLATFORM_WIN32_NT, 0, 0 }; +VersionLieInfo g_Win8RTM = { 0x23f00206, 6, 2, 9200, VER_PLATFORM_WIN32_NT, 0, 0 }; +VersionLieInfo g_Win81RTM = { 0x25800306, 6, 3, 9600, VER_PLATFORM_WIN32_NT, 0, 0 }; + + DWORD get_host_winver(void) { RTL_OSVERSIONINFOEXW rtlinfo = {0}; @@ -396,4 +400,6 @@ START_TEST(versionlie) run_test("VistaSP1VersionLie", &g_WinVistaSP1); run_test("VistaSP2VersionLie", &g_WinVistaSP2); run_test("Win7RTMVersionLie", &g_Win7RTM); + run_test("Win8RTMVersionLie", &g_Win8RTM); + run_test("Win81RTMVersionLie", &g_Win81RTM); }
6 years, 10 months
1
0
0
0
02/04: [ACPPAGE] Enable version lies until Win7 + some cleanup
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9b55e647fae5c899f2269…
commit 9b55e647fae5c899f22699a6f432ae44e2c11146 Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Tue Feb 6 19:32:51 2018 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sat Feb 24 19:33:42 2018 +0100 [ACPPAGE] Enable version lies until Win7 + some cleanup --- dll/shellext/acppage/ACPPage.cpp | 57 +++++++++++++++++++++---------- dll/shellext/acppage/CLayerStringList.hpp | 2 +- dll/shellext/acppage/CLayerUIPropPage.cpp | 4 +-- dll/shellext/acppage/CLayerUIPropPage.hpp | 2 +- 4 files changed, 42 insertions(+), 23 deletions(-) diff --git a/dll/shellext/acppage/ACPPage.cpp b/dll/shellext/acppage/ACPPage.cpp index 446d98d429..18d035fb9c 100644 --- a/dll/shellext/acppage/ACPPage.cpp +++ b/dll/shellext/acppage/ACPPage.cpp @@ -2,7 +2,7 @@ * PROJECT: ReactOS Compatibility Layer Shell Extension * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) * PURPOSE: acppage entrypoint - * COPYRIGHT: Copyright 2015 Mark Jansen (mark.jansen(a)reactos.org) + * COPYRIGHT: Copyright 2015-2018 Mark Jansen (mark.jansen(a)reactos.org) */ #include "precomp.h" @@ -15,10 +15,6 @@ LONG g_ModuleRefCnt = 0; class CLayerUIPropPageModule : public CComModule { public: - void Term() - { - CComModule::Term(); - } }; BEGIN_OBJECT_MAP(ObjectMap) @@ -37,6 +33,9 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) g_hModule = hInstance; gModule.Init(ObjectMap, hInstance, NULL); break; + case DLL_PROCESS_DETACH: + gModule.Term(); + break; } return(TRUE); @@ -62,10 +61,6 @@ STDAPI DllRegisterServer() if (FAILED(hr)) return hr; - hr = gModule.UpdateRegistryFromResource(IDR_ACPPAGE, TRUE, NULL); - if (FAILED(hr)) - return hr; - return S_OK; } @@ -77,10 +72,6 @@ STDAPI DllUnregisterServer() if (FAILED(hr)) return hr; - hr = gModule.UpdateRegistryFromResource(IDR_ACPPAGE, FALSE, NULL); - if (FAILED(hr)) - return hr; - return S_OK; } @@ -91,23 +82,53 @@ struct CCoInit HRESULT hres; }; +EXTERN_C +inline ULONG +Win32DbgPrint(const char *filename, int line, const char *lpFormat, ...) +{ + char Buffer[512]; + char* Current = Buffer; + size_t Length = _countof(Buffer); + const char* fname = strrchr(filename, '\\'); + if (fname == NULL) + { + fname = strrchr(filename, '/'); + if (fname != NULL) + fname++; + } + else + fname++; + + if (fname == NULL) + fname = filename; + + StringCchPrintfExA(Current, Length, &Current, &Length, STRSAFE_NULL_ON_FAILURE, "%s:%d: ", fname, line); + va_list ArgList; + va_start(ArgList, lpFormat); + StringCchVPrintfExA(Current, Length, &Current, &Length, STRSAFE_NULL_ON_FAILURE, lpFormat, ArgList); + va_end(ArgList); + OutputDebugStringA(Buffer); + return 0; +} + + EXTERN_C BOOL WINAPI GetExeFromLnk(PCWSTR pszLnk, PWSTR pszExe, size_t cchSize) { CCoInit init; - if (FAILED(init.hres)) + if (FAILED_UNEXPECTEDLY(init.hres)) return FALSE; CComPtr<IShellLinkW> spShellLink; - if (FAILED(CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARG(IShellLinkW, &spShellLink)))) + if (FAILED_UNEXPECTEDLY(CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARG(IShellLinkW, &spShellLink)))) return FALSE; CComPtr<IPersistFile> spPersistFile; - if (FAILED(spShellLink->QueryInterface(IID_PPV_ARG(IPersistFile, &spPersistFile)))) + if (FAILED_UNEXPECTEDLY(spShellLink->QueryInterface(IID_PPV_ARG(IPersistFile, &spPersistFile)))) return FALSE; - if (FAILED(spPersistFile->Load(pszLnk, STGM_READ)) || FAILED(spShellLink->Resolve(NULL, SLR_NO_UI | SLR_NOUPDATE | SLR_NOSEARCH))) + if (FAILED_UNEXPECTEDLY(spPersistFile->Load(pszLnk, STGM_READ)) || FAILED_UNEXPECTEDLY(spShellLink->Resolve(NULL, SLR_NO_UI | SLR_NOUPDATE | SLR_NOSEARCH))) return FALSE; - return SUCCEEDED(spShellLink->GetPath(pszExe, cchSize, NULL, SLGP_RAWPATH)); + return !FAILED_UNEXPECTEDLY(spShellLink->GetPath(pszExe, cchSize, NULL, SLGP_RAWPATH)); } diff --git a/dll/shellext/acppage/CLayerStringList.hpp b/dll/shellext/acppage/CLayerStringList.hpp index af8c04fe95..2a0f5bfcf1 100644 --- a/dll/shellext/acppage/CLayerStringList.hpp +++ b/dll/shellext/acppage/CLayerStringList.hpp @@ -2,7 +2,7 @@ * PROJECT: ReactOS Compatibility Layer Shell Extension * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) * PURPOSE: CLayerStringList implementation - * COPYRIGHT: Copyright 2015-2017 Mark Jansen (mark.jansen(a)reactos.org) + * COPYRIGHT: Copyright 2015-2018 Mark Jansen (mark.jansen(a)reactos.org) */ #pragma once diff --git a/dll/shellext/acppage/CLayerUIPropPage.cpp b/dll/shellext/acppage/CLayerUIPropPage.cpp index 812854e7f5..a60f03ef2f 100644 --- a/dll/shellext/acppage/CLayerUIPropPage.cpp +++ b/dll/shellext/acppage/CLayerUIPropPage.cpp @@ -2,7 +2,7 @@ * PROJECT: ReactOS Compatibility Layer Shell Extension * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) * PURPOSE: CLayerUIPropPage implementation - * COPYRIGHT: Copyright 2015-2017 Mark Jansen (mark.jansen(a)reactos.org) + * COPYRIGHT: Copyright 2015-2018 Mark Jansen (mark.jansen(a)reactos.org) */ #include "precomp.h" @@ -33,13 +33,11 @@ static struct { { L"Windows XP (SP2)", L"WINXPSP2" }, { L"Windows XP (SP3)", L"WINXPSP3" }, { L"Windows Server 2003 (SP1)", L"WINSRV03SP1" }, -#if 0 { L"Windows Server 2008 (SP1)", L"WINSRV08SP1" }, { L"Windows Vista", L"VISTARTM" }, { L"Windows Vista (SP1)", L"VISTASP1" }, { L"Windows Vista (SP2)", L"VISTASP2" }, { L"Windows 7", L"WIN7RTM" }, -#endif { NULL, NULL } }; diff --git a/dll/shellext/acppage/CLayerUIPropPage.hpp b/dll/shellext/acppage/CLayerUIPropPage.hpp index c65a914d86..e86e8eb42a 100644 --- a/dll/shellext/acppage/CLayerUIPropPage.hpp +++ b/dll/shellext/acppage/CLayerUIPropPage.hpp @@ -2,7 +2,7 @@ * PROJECT: ReactOS Compatibility Layer Shell Extension * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) * PURPOSE: CLayerUIPropPage definition - * COPYRIGHT: Copyright 2015-2017 Mark Jansen (mark.jansen(a)reactos.org) + * COPYRIGHT: Copyright 2015-2018 Mark Jansen (mark.jansen(a)reactos.org) */ #pragma once
6 years, 10 months
1
0
0
0
01/04: [APPHELP] Set debug level in case of parse failure
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0dd71438a4fdc7a0b076f…
commit 0dd71438a4fdc7a0b076fa7415112175c1158e34 Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Tue Feb 6 19:32:26 2018 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sat Feb 24 19:33:02 2018 +0100 [APPHELP] Set debug level in case of parse failure --- dll/appcompat/apphelp/apphelp.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/dll/appcompat/apphelp/apphelp.c b/dll/appcompat/apphelp/apphelp.c index 3ea0945a51..4c04e5d80e 100644 --- a/dll/appcompat/apphelp/apphelp.c +++ b/dll/appcompat/apphelp/apphelp.c @@ -4,7 +4,7 @@ * PURPOSE: apphelp entrypoint / generic interface functions * COPYRIGHT: Copyright 2011 André Hentschel * Copyright 2013 Mislav Blaževic - * Copyright 2015-2017 Mark Jansen (mark.jansen(a)reactos.org) + * Copyright 2015-2018 Mark Jansen (mark.jansen(a)reactos.org) */ #define WIN32_NO_STATUS @@ -42,7 +42,7 @@ void ApphelppInitDebugLevel(void) if (NT_SUCCESS(Status)) { if (!NT_SUCCESS(RtlUnicodeStringToInteger(&DebugValue, 10, &NewLevel))) - NewLevel = 0; + NewLevel = SHIM_ERR; } g_ShimDebugLevel = NewLevel; } @@ -52,10 +52,6 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) { switch (reason) { -#ifndef __REACTOS__ - case DLL_WINE_PREATTACH: - return FALSE; /* prefer native version */ -#endif case DLL_PROCESS_ATTACH: g_hInstance = hinst; DisableThreadLibraryCalls( hinst ); @@ -244,4 +240,3 @@ ApphelpCheckRunAppEx( return TRUE; } -
6 years, 10 months
1
0
0
0
01/01: [SERVMAN] Add an accelerator for the F5 (refresh) key
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4b8f53c9e9c08d0b52671…
commit 4b8f53c9e9c08d0b52671989190027ddac752089 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Sat Feb 24 18:38:08 2018 +0100 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Sat Feb 24 18:38:08 2018 +0100 [SERVMAN] Add an accelerator for the F5 (refresh) key CORE-14389 --- base/applications/mscutils/servman/lang/bg-BG.rc | 7 ++++++- base/applications/mscutils/servman/lang/cs-CZ.rc | 7 ++++++- base/applications/mscutils/servman/lang/de-DE.rc | 9 +++++++-- base/applications/mscutils/servman/lang/el-GR.rc | 7 ++++++- base/applications/mscutils/servman/lang/en-US.rc | 7 ++++++- base/applications/mscutils/servman/lang/es-ES.rc | 7 ++++++- base/applications/mscutils/servman/lang/fr-FR.rc | 7 ++++++- base/applications/mscutils/servman/lang/he-IL.rc | 7 ++++++- base/applications/mscutils/servman/lang/id-ID.rc | 7 ++++++- base/applications/mscutils/servman/lang/it-IT.rc | 7 ++++++- base/applications/mscutils/servman/lang/ja-JP.rc | 7 ++++++- base/applications/mscutils/servman/lang/ko-KR.rc | 7 ++++++- base/applications/mscutils/servman/lang/no-NO.rc | 7 ++++++- base/applications/mscutils/servman/lang/pl-PL.rc | 7 ++++++- base/applications/mscutils/servman/lang/ro-RO.rc | 7 ++++++- base/applications/mscutils/servman/lang/ru-RU.rc | 7 ++++++- base/applications/mscutils/servman/lang/sk-SK.rc | 7 ++++++- base/applications/mscutils/servman/lang/sq-AL.rc | 7 ++++++- base/applications/mscutils/servman/lang/sv-SE.rc | 7 ++++++- base/applications/mscutils/servman/lang/th-TH.rc | 7 ++++++- base/applications/mscutils/servman/lang/tr-TR.rc | 7 ++++++- base/applications/mscutils/servman/lang/uk-UA.rc | 7 ++++++- base/applications/mscutils/servman/lang/zh-CN.rc | 7 ++++++- base/applications/mscutils/servman/lang/zh-TW.rc | 7 ++++++- base/applications/mscutils/servman/resource.h | 2 ++ base/applications/mscutils/servman/servman.c | 5 +++++ 26 files changed, 152 insertions(+), 25 deletions(-) diff --git a/base/applications/mscutils/servman/lang/bg-BG.rc b/base/applications/mscutils/servman/lang/bg-BG.rc index 112f0930b8..d0f7186ab9 100644 --- a/base/applications/mscutils/servman/lang/bg-BG.rc +++ b/base/applications/mscutils/servman/lang/bg-BG.rc @@ -18,7 +18,7 @@ BEGIN MENUITEM "Продължаване", ID_RESUME, GRAYED MENUITEM "Презапуск", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "Опресняване", ID_REFRESH + MENUITEM "Опресняване\tF5", ID_REFRESH MENUITEM SEPARATOR MENUITEM "Обработка...", ID_EDIT, GRAYED MENUITEM "Създаване...", ID_CREATE, GRAYED @@ -63,6 +63,11 @@ BEGIN END END +IDA_SERVMAN ACCELERATORS +BEGIN + VK_F5, ID_REFRESH, VIRTKEY +END + IDD_ABOUTBOX DIALOGEX 22, 16, 190, 182 CAPTION "За управителя на устройствата" FONT 8, "MS Shell Dlg", 0, 0 diff --git a/base/applications/mscutils/servman/lang/cs-CZ.rc b/base/applications/mscutils/servman/lang/cs-CZ.rc index d9ef503852..2dcc41b969 100644 --- a/base/applications/mscutils/servman/lang/cs-CZ.rc +++ b/base/applications/mscutils/servman/lang/cs-CZ.rc @@ -18,7 +18,7 @@ BEGIN MENUITEM "Pokračovat", ID_RESUME, GRAYED MENUITEM "Restartovat", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "Obnovit", ID_REFRESH + MENUITEM "Obnovit\tF5", ID_REFRESH MENUITEM SEPARATOR MENUITEM "Upravit...", ID_EDIT, GRAYED MENUITEM "Vytvořit...", ID_CREATE, GRAYED @@ -63,6 +63,11 @@ BEGIN END END +IDA_SERVMAN ACCELERATORS +BEGIN + VK_F5, ID_REFRESH, VIRTKEY +END + IDD_ABOUTBOX DIALOGEX 22, 16, 190, 182 CAPTION "O správci služeb" FONT 8, "MS Shell Dlg", 0, 0 diff --git a/base/applications/mscutils/servman/lang/de-DE.rc b/base/applications/mscutils/servman/lang/de-DE.rc index 3aa7303aaa..cd6a85fc6a 100644 --- a/base/applications/mscutils/servman/lang/de-DE.rc +++ b/base/applications/mscutils/servman/lang/de-DE.rc @@ -1,4 +1,4 @@ -LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL +LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL IDR_MAINMENU MENU BEGIN @@ -18,7 +18,7 @@ BEGIN MENUITEM "Fortsetzen", ID_RESUME, GRAYED MENUITEM "Neu starten", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "Aktualisieren", ID_REFRESH + MENUITEM "Aktualisieren\tF5", ID_REFRESH MENUITEM SEPARATOR MENUITEM "Bearbeiten...", ID_EDIT, GRAYED MENUITEM "Erstellen...", ID_CREATE, GRAYED @@ -63,6 +63,11 @@ BEGIN END END +IDA_SERVMAN ACCELERATORS +BEGIN + VK_F5, ID_REFRESH, VIRTKEY +END + IDD_ABOUTBOX DIALOGEX 22, 16, 190, 182 CAPTION "Info über Dienst-Manager" FONT 8, "MS Shell Dlg", 0, 0 diff --git a/base/applications/mscutils/servman/lang/el-GR.rc b/base/applications/mscutils/servman/lang/el-GR.rc index 4e700e9cb2..2a1b0848c6 100644 --- a/base/applications/mscutils/servman/lang/el-GR.rc +++ b/base/applications/mscutils/servman/lang/el-GR.rc @@ -18,7 +18,7 @@ BEGIN MENUITEM "Συνέχιση", ID_RESUME, GRAYED MENUITEM "Επανεκκίνηση", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "Ανανέωση", ID_REFRESH + MENUITEM "Ανανέωση\tF5", ID_REFRESH MENUITEM SEPARATOR MENUITEM "Επεξεργασία...", ID_EDIT, GRAYED MENUITEM "Δημιουργία...", ID_CREATE, GRAYED @@ -63,6 +63,11 @@ BEGIN END END +IDA_SERVMAN ACCELERATORS +BEGIN + VK_F5, ID_REFRESH, VIRTKEY +END + IDD_ABOUTBOX DIALOGEX 22, 16, 190, 182 CAPTION "Σχετικά με το Διαχειριστή Υπηρεσιών" FONT 8, "MS Shell Dlg", 0, 0 diff --git a/base/applications/mscutils/servman/lang/en-US.rc b/base/applications/mscutils/servman/lang/en-US.rc index 0adf899b3f..ba30644939 100644 --- a/base/applications/mscutils/servman/lang/en-US.rc +++ b/base/applications/mscutils/servman/lang/en-US.rc @@ -18,7 +18,7 @@ BEGIN MENUITEM "Resu&me", ID_RESUME, GRAYED MENUITEM "Rest&art", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "Re&fresh", ID_REFRESH + MENUITEM "Re&fresh\tF5", ID_REFRESH MENUITEM SEPARATOR MENUITEM "&Edit...", ID_EDIT, GRAYED MENUITEM "Crea&te...", ID_CREATE, GRAYED @@ -63,6 +63,11 @@ BEGIN END END +IDA_SERVMAN ACCELERATORS +BEGIN + VK_F5, ID_REFRESH, VIRTKEY +END + IDD_ABOUTBOX DIALOGEX 22, 16, 190, 182 CAPTION "About Service Manager" FONT 8, "MS Shell Dlg", 0, 0 diff --git a/base/applications/mscutils/servman/lang/es-ES.rc b/base/applications/mscutils/servman/lang/es-ES.rc index 5a964aabe1..cb36859fae 100644 --- a/base/applications/mscutils/servman/lang/es-ES.rc +++ b/base/applications/mscutils/servman/lang/es-ES.rc @@ -21,7 +21,7 @@ BEGIN MENUITEM "Reanudar", ID_RESUME, GRAYED MENUITEM "Reiniciar", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "Actualizar", ID_REFRESH + MENUITEM "Actualizar\tF5", ID_REFRESH MENUITEM SEPARATOR MENUITEM "Editar...", ID_EDIT, GRAYED MENUITEM "Crear...", ID_CREATE, GRAYED @@ -66,6 +66,11 @@ BEGIN END END +IDA_SERVMAN ACCELERATORS +BEGIN + VK_F5, ID_REFRESH, VIRTKEY +END + IDD_ABOUTBOX DIALOGEX 22, 16, 190, 182 CAPTION "Acerca del Administrador de servicios" FONT 8, "MS Shell Dlg", 0, 0 diff --git a/base/applications/mscutils/servman/lang/fr-FR.rc b/base/applications/mscutils/servman/lang/fr-FR.rc index ad22a6cd50..4640f9df83 100644 --- a/base/applications/mscutils/servman/lang/fr-FR.rc +++ b/base/applications/mscutils/servman/lang/fr-FR.rc @@ -18,7 +18,7 @@ BEGIN MENUITEM "Reprendre", ID_RESUME, GRAYED MENUITEM "Redémarrer", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "Rafraîchir", ID_REFRESH + MENUITEM "Rafraîchir\tF5", ID_REFRESH MENUITEM SEPARATOR MENUITEM "Éditer...", ID_EDIT, GRAYED MENUITEM "Créer...", ID_CREATE, GRAYED @@ -63,6 +63,11 @@ BEGIN END END +IDA_SERVMAN ACCELERATORS +BEGIN + VK_F5, ID_REFRESH, VIRTKEY +END + IDD_ABOUTBOX DIALOGEX 22, 16, 190, 182 CAPTION "À Propos du gestionnaire de services" FONT 8, "MS Shell Dlg", 0, 0 diff --git a/base/applications/mscutils/servman/lang/he-IL.rc b/base/applications/mscutils/servman/lang/he-IL.rc index 2d6f4218ac..15c42e7cfa 100644 --- a/base/applications/mscutils/servman/lang/he-IL.rc +++ b/base/applications/mscutils/servman/lang/he-IL.rc @@ -18,7 +18,7 @@ BEGIN MENUITEM "חדש", ID_RESUME, GRAYED MENUITEM "הפעל מחדש", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "רענן", ID_REFRESH + MENUITEM "רענן\tF5", ID_REFRESH MENUITEM SEPARATOR MENUITEM "עריכה...", ID_EDIT, GRAYED MENUITEM "יצירה...", ID_CREATE, GRAYED @@ -63,6 +63,11 @@ BEGIN END END +IDA_SERVMAN ACCELERATORS +BEGIN + VK_F5, ID_REFRESH, VIRTKEY +END + IDD_ABOUTBOX DIALOGEX 22, 16, 190, 182 CAPTION "אודות מנהל השירותים" FONT 8, "MS Shell Dlg", 0, 0 diff --git a/base/applications/mscutils/servman/lang/id-ID.rc b/base/applications/mscutils/servman/lang/id-ID.rc index 0407f5beb3..f83c0bf98e 100644 --- a/base/applications/mscutils/servman/lang/id-ID.rc +++ b/base/applications/mscutils/servman/lang/id-ID.rc @@ -18,7 +18,7 @@ BEGIN MENUITEM "Lanjutkan", ID_RESUME, GRAYED MENUITEM "Mulai lagi", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "Segarkan", ID_REFRESH + MENUITEM "Segarkan\tF5", ID_REFRESH MENUITEM SEPARATOR MENUITEM "Edit...", ID_EDIT, GRAYED MENUITEM "Buat...", ID_CREATE, GRAYED @@ -63,6 +63,11 @@ BEGIN END END +IDA_SERVMAN ACCELERATORS +BEGIN + VK_F5, ID_REFRESH, VIRTKEY +END + IDD_ABOUTBOX DIALOGEX 22, 16, 190, 182 CAPTION "Tentang Manajer Layanan" FONT 8, "MS Shell Dlg", 0, 0 diff --git a/base/applications/mscutils/servman/lang/it-IT.rc b/base/applications/mscutils/servman/lang/it-IT.rc index 31485e6be2..bd87ad6bcf 100644 --- a/base/applications/mscutils/servman/lang/it-IT.rc +++ b/base/applications/mscutils/servman/lang/it-IT.rc @@ -18,7 +18,7 @@ BEGIN MENUITEM "Ripristina", ID_RESUME, GRAYED MENUITEM "Riavvia", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "Aggiorna", ID_REFRESH + MENUITEM "Aggiorna\tF5", ID_REFRESH MENUITEM SEPARATOR MENUITEM "Modifica...", ID_EDIT, GRAYED MENUITEM "Crea...", ID_CREATE, GRAYED @@ -63,6 +63,11 @@ BEGIN END END +IDA_SERVMAN ACCELERATORS +BEGIN + VK_F5, ID_REFRESH, VIRTKEY +END + IDD_ABOUTBOX DIALOGEX 22, 16, 190, 182 CAPTION "Informazioni su Gestione Servizi" FONT 8, "MS Shell Dlg", 0, 0 diff --git a/base/applications/mscutils/servman/lang/ja-JP.rc b/base/applications/mscutils/servman/lang/ja-JP.rc index 36affab1d3..6d65aa7df4 100644 --- a/base/applications/mscutils/servman/lang/ja-JP.rc +++ b/base/applications/mscutils/servman/lang/ja-JP.rc @@ -18,7 +18,7 @@ BEGIN MENUITEM "再開", ID_RESUME, GRAYED MENUITEM "再起動", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "更新", ID_REFRESH + MENUITEM "更新\tF5", ID_REFRESH MENUITEM SEPARATOR MENUITEM "編集...", ID_EDIT, GRAYED MENUITEM "作成...", ID_CREATE, GRAYED @@ -63,6 +63,11 @@ BEGIN END END +IDA_SERVMAN ACCELERATORS +BEGIN + VK_F5, ID_REFRESH, VIRTKEY +END + IDD_ABOUTBOX DIALOGEX 22, 16, 190, 182 CAPTION "サービス マネージャについて" FONT 9, "MS UI Gothic", 0, 0 diff --git a/base/applications/mscutils/servman/lang/ko-KR.rc b/base/applications/mscutils/servman/lang/ko-KR.rc index 927e846c7f..8e6d426e80 100644 --- a/base/applications/mscutils/servman/lang/ko-KR.rc +++ b/base/applications/mscutils/servman/lang/ko-KR.rc @@ -20,7 +20,7 @@ BEGIN MENUITEM "계속", ID_RESUME, GRAYED MENUITEM "다시 시작", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "새로 고침", ID_REFRESH + MENUITEM "새로 고침\tF5", ID_REFRESH MENUITEM SEPARATOR MENUITEM "편집...", ID_EDIT, GRAYED MENUITEM "추가...", ID_CREATE, GRAYED @@ -65,6 +65,11 @@ BEGIN END END +IDA_SERVMAN ACCELERATORS +BEGIN + VK_F5, ID_REFRESH, VIRTKEY +END + IDD_ABOUTBOX DIALOGEX 22, 16, 190, 182 CAPTION "서비스 매니저에 대하여" FONT 9, "굴림", 0, 0 diff --git a/base/applications/mscutils/servman/lang/no-NO.rc b/base/applications/mscutils/servman/lang/no-NO.rc index 707c21516a..ad317a6fac 100644 --- a/base/applications/mscutils/servman/lang/no-NO.rc +++ b/base/applications/mscutils/servman/lang/no-NO.rc @@ -18,7 +18,7 @@ BEGIN MENUITEM "Fortsett", ID_RESUME, GRAYED MENUITEM "Restart", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "Oppdater", ID_REFRESH + MENUITEM "Oppdater\tF5", ID_REFRESH MENUITEM SEPARATOR MENUITEM "Rediger...", ID_EDIT, GRAYED MENUITEM "Opprett...", ID_CREATE, GRAYED @@ -63,6 +63,11 @@ BEGIN END END +IDA_SERVMAN ACCELERATORS +BEGIN + VK_F5, ID_REFRESH, VIRTKEY +END + IDD_ABOUTBOX DIALOGEX 22, 16, 190, 182 CAPTION "Om Tjenestebehandler" FONT 8, "MS Shell Dlg", 0, 0 diff --git a/base/applications/mscutils/servman/lang/pl-PL.rc b/base/applications/mscutils/servman/lang/pl-PL.rc index 30a564436c..0d01e9793f 100644 --- a/base/applications/mscutils/servman/lang/pl-PL.rc +++ b/base/applications/mscutils/servman/lang/pl-PL.rc @@ -28,7 +28,7 @@ BEGIN MENUITEM "Wznów", ID_RESUME, GRAYED MENUITEM "Uruchom ponownie", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "Odśwież", ID_REFRESH + MENUITEM "Odśwież\tF5", ID_REFRESH MENUITEM SEPARATOR MENUITEM "Edycja...", ID_EDIT, GRAYED MENUITEM "Utwórz...", ID_CREATE, GRAYED @@ -73,6 +73,11 @@ BEGIN END END +IDA_SERVMAN ACCELERATORS +BEGIN + VK_F5, ID_REFRESH, VIRTKEY +END + IDD_ABOUTBOX DIALOGEX 22, 16, 190, 182 CAPTION "Menedżer usług - informacje" FONT 8, "MS Shell Dlg", 0, 0 diff --git a/base/applications/mscutils/servman/lang/ro-RO.rc b/base/applications/mscutils/servman/lang/ro-RO.rc index bae0603296..7458a81684 100644 --- a/base/applications/mscutils/servman/lang/ro-RO.rc +++ b/base/applications/mscutils/servman/lang/ro-RO.rc @@ -23,7 +23,7 @@ BEGIN MENUITEM "R&eia", ID_RESUME, GRAYED MENUITEM "&Repornește", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "Împrospătea&ză", ID_REFRESH + MENUITEM "Împrospătea&ză\tF5", ID_REFRESH MENUITEM SEPARATOR MENUITEM "Mo&dificare…", ID_EDIT, GRAYED MENUITEM "&Creare…", ID_CREATE, GRAYED @@ -68,6 +68,11 @@ BEGIN END END +IDA_SERVMAN ACCELERATORS +BEGIN + VK_F5, ID_REFRESH, VIRTKEY +END + IDD_ABOUTBOX DIALOGEX 22, 16, 190, 182 CAPTION "Despre Gestionar de servicii" FONT 8, "MS Shell Dlg", 0, 0 diff --git a/base/applications/mscutils/servman/lang/ru-RU.rc b/base/applications/mscutils/servman/lang/ru-RU.rc index a8a4d4aa41..30bcba0e9d 100644 --- a/base/applications/mscutils/servman/lang/ru-RU.rc +++ b/base/applications/mscutils/servman/lang/ru-RU.rc @@ -18,7 +18,7 @@ BEGIN MENUITEM "Продол&жить", ID_RESUME, GRAYED MENUITEM "Пере&запустить", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "О&бновить", ID_REFRESH + MENUITEM "О&бновить\tF5", ID_REFRESH MENUITEM SEPARATOR MENUITEM "&Изменить...", ID_EDIT, GRAYED MENUITEM "С&оздать...", ID_CREATE, GRAYED @@ -63,6 +63,11 @@ BEGIN END END +IDA_SERVMAN ACCELERATORS +BEGIN + VK_F5, ID_REFRESH, VIRTKEY +END + IDD_ABOUTBOX DIALOGEX 22, 16, 190, 182 CAPTION "О Диспетчере служб" FONT 8, "MS Shell Dlg", 0, 0 diff --git a/base/applications/mscutils/servman/lang/sk-SK.rc b/base/applications/mscutils/servman/lang/sk-SK.rc index cbdfa10f32..42dc5676f8 100644 --- a/base/applications/mscutils/servman/lang/sk-SK.rc +++ b/base/applications/mscutils/servman/lang/sk-SK.rc @@ -23,7 +23,7 @@ BEGIN MENUITEM "Pokračovať", ID_RESUME, GRAYED MENUITEM "Reštartovať", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "Obnoviť", ID_REFRESH + MENUITEM "Obnoviť\tF5", ID_REFRESH MENUITEM SEPARATOR MENUITEM "Upraviť...", ID_EDIT, GRAYED MENUITEM "Vytvoriť...", ID_CREATE, GRAYED @@ -68,6 +68,11 @@ BEGIN END END +IDA_SERVMAN ACCELERATORS +BEGIN + VK_F5, ID_REFRESH, VIRTKEY +END + IDD_ABOUTBOX DIALOGEX 22, 16, 190, 182 CAPTION "Čo je Manažér služieb" FONT 8, "MS Shell Dlg", 0, 0 diff --git a/base/applications/mscutils/servman/lang/sq-AL.rc b/base/applications/mscutils/servman/lang/sq-AL.rc index 261f292d45..7cd17ef0ee 100644 --- a/base/applications/mscutils/servman/lang/sq-AL.rc +++ b/base/applications/mscutils/servman/lang/sq-AL.rc @@ -23,7 +23,7 @@ BEGIN MENUITEM "Rifillo", ID_RESUME, GRAYED MENUITEM "Rifillo", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "Rifesko", ID_REFRESH + MENUITEM "Rifesko\tF5", ID_REFRESH MENUITEM SEPARATOR MENUITEM "Modifiko...", ID_EDIT, GRAYED MENUITEM "Krijo...", ID_CREATE, GRAYED @@ -68,6 +68,11 @@ BEGIN END END +IDA_SERVMAN ACCELERATORS +BEGIN + VK_F5, ID_REFRESH, VIRTKEY +END + IDD_ABOUTBOX DIALOGEX 22, 16, 190, 182 CAPTION "Rreth Menaxherit të Shërbimeve" FONT 8, "MS Shell Dlg", 0, 0 diff --git a/base/applications/mscutils/servman/lang/sv-SE.rc b/base/applications/mscutils/servman/lang/sv-SE.rc index c0de6d638c..e7b4a8de3b 100644 --- a/base/applications/mscutils/servman/lang/sv-SE.rc +++ b/base/applications/mscutils/servman/lang/sv-SE.rc @@ -25,7 +25,7 @@ BEGIN MENUITEM "Fortsätta", ID_RESUME, GRAYED MENUITEM "Starta om", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "Uppdatera", ID_REFRESH + MENUITEM "Uppdatera\tF5", ID_REFRESH MENUITEM SEPARATOR MENUITEM "Redigera...", ID_EDIT, GRAYED MENUITEM "Skapa...", ID_CREATE, GRAYED @@ -70,6 +70,11 @@ BEGIN END END +IDA_SERVMAN ACCELERATORS +BEGIN + VK_F5, ID_REFRESH, VIRTKEY +END + IDD_ABOUTBOX DIALOGEX 22, 16, 190, 182 CAPTION "Om Tjänster" FONT 8, "MS Shell Dlg", 0, 0 diff --git a/base/applications/mscutils/servman/lang/th-TH.rc b/base/applications/mscutils/servman/lang/th-TH.rc index 9547045aab..c86154ed45 100644 --- a/base/applications/mscutils/servman/lang/th-TH.rc +++ b/base/applications/mscutils/servman/lang/th-TH.rc @@ -26,7 +26,7 @@ BEGIN MENUITEM "เริ่มทำต่อ", ID_RESUME, GRAYED MENUITEM "เริ่มใหม่", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "ฟื้นฟู", ID_REFRESH + MENUITEM "ฟื้นฟู\tF5", ID_REFRESH MENUITEM SEPARATOR MENUITEM "แก้ไข...", ID_EDIT, GRAYED MENUITEM "สร้าง...", ID_CREATE, GRAYED @@ -71,6 +71,11 @@ BEGIN END END +IDA_SERVMAN ACCELERATORS +BEGIN + VK_F5, ID_REFRESH, VIRTKEY +END + IDD_ABOUTBOX DIALOGEX 22, 16, 190, 182 CAPTION "เกี่ยวกับการบริการจัดการ" FONT 8, "MS Shell Dlg", 0, 0 diff --git a/base/applications/mscutils/servman/lang/tr-TR.rc b/base/applications/mscutils/servman/lang/tr-TR.rc index 33c7591b7b..3fb0eae4c9 100644 --- a/base/applications/mscutils/servman/lang/tr-TR.rc +++ b/base/applications/mscutils/servman/lang/tr-TR.rc @@ -20,7 +20,7 @@ BEGIN MENUITEM "&Sürdür", ID_RESUME, GRAYED MENUITEM "&Yeniden Başlat", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "Y&enile", ID_REFRESH + MENUITEM "Y&enile\tF5", ID_REFRESH MENUITEM SEPARATOR MENUITEM "De&ğiştir...", ID_EDIT, GRAYED MENUITEM "&Oluştur...", ID_CREATE, GRAYED @@ -65,6 +65,11 @@ BEGIN END END +IDA_SERVMAN ACCELERATORS +BEGIN + VK_F5, ID_REFRESH, VIRTKEY +END + IDD_ABOUTBOX DIALOGEX 22, 16, 190, 182 CAPTION "Himet Yöneticisi Üzerine" FONT 8, "MS Shell Dlg", 0, 0 diff --git a/base/applications/mscutils/servman/lang/uk-UA.rc b/base/applications/mscutils/servman/lang/uk-UA.rc index 30bc170a60..93ac6bdee6 100644 --- a/base/applications/mscutils/servman/lang/uk-UA.rc +++ b/base/applications/mscutils/servman/lang/uk-UA.rc @@ -26,7 +26,7 @@ BEGIN MENUITEM "Продовжити", ID_RESUME, GRAYED MENUITEM "Перезапуск", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "Оновити", ID_REFRESH + MENUITEM "Оновити\tF5", ID_REFRESH MENUITEM SEPARATOR MENUITEM "Правка...", ID_EDIT, GRAYED MENUITEM "Створити...", ID_CREATE, GRAYED @@ -71,6 +71,11 @@ BEGIN END END +IDA_SERVMAN ACCELERATORS +BEGIN + VK_F5, ID_REFRESH, VIRTKEY +END + IDD_ABOUTBOX DIALOGEX 22, 16, 190, 182 CAPTION "Про програму ""Диспетчер керування службами""" FONT 8, "MS Shell Dlg", 0, 0 diff --git a/base/applications/mscutils/servman/lang/zh-CN.rc b/base/applications/mscutils/servman/lang/zh-CN.rc index f1db1cf321..3f956b9857 100644 --- a/base/applications/mscutils/servman/lang/zh-CN.rc +++ b/base/applications/mscutils/servman/lang/zh-CN.rc @@ -20,7 +20,7 @@ BEGIN MENUITEM "恢复", ID_RESUME, GRAYED MENUITEM "重新启动", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "刷新", ID_REFRESH + MENUITEM "刷新\tF5", ID_REFRESH MENUITEM SEPARATOR MENUITEM "编辑...", ID_EDIT, GRAYED MENUITEM "创建...", ID_CREATE, GRAYED @@ -65,6 +65,11 @@ BEGIN END END +IDA_SERVMAN ACCELERATORS +BEGIN + VK_F5, ID_REFRESH, VIRTKEY +END + IDD_ABOUTBOX DIALOGEX 22, 16, 190, 182 CAPTION "关于服务管理器" FONT 9, "宋体", 0, 0 diff --git a/base/applications/mscutils/servman/lang/zh-TW.rc b/base/applications/mscutils/servman/lang/zh-TW.rc index a13edc7d80..c1b782a6f3 100644 --- a/base/applications/mscutils/servman/lang/zh-TW.rc +++ b/base/applications/mscutils/servman/lang/zh-TW.rc @@ -20,7 +20,7 @@ BEGIN MENUITEM "恢復", ID_RESUME, GRAYED MENUITEM "重新開機", ID_RESTART, GRAYED MENUITEM SEPARATOR - MENUITEM "刷新", ID_REFRESH + MENUITEM "刷新\tF5", ID_REFRESH MENUITEM SEPARATOR MENUITEM "編輯...", ID_EDIT, GRAYED MENUITEM "創建...", ID_CREATE, GRAYED @@ -65,6 +65,11 @@ BEGIN END END +IDA_SERVMAN ACCELERATORS +BEGIN + VK_F5, ID_REFRESH, VIRTKEY +END + IDD_ABOUTBOX DIALOGEX 22, 16, 190, 182 CAPTION "關於服務管理員" FONT 9, "新細明體", 0, 0 diff --git a/base/applications/mscutils/servman/resource.h b/base/applications/mscutils/servman/resource.h index 35e9406ffd..76f0e1e0e7 100644 --- a/base/applications/mscutils/servman/resource.h +++ b/base/applications/mscutils/servman/resource.h @@ -2,6 +2,8 @@ #define IDC_STATIC -1 +#define IDA_SERVMAN 20 + /* about box info */ #define IDD_ABOUTBOX 200 #define IDC_LICENSE_EDIT 201 diff --git a/base/applications/mscutils/servman/servman.c b/base/applications/mscutils/servman/servman.c index d1a2dddebd..1c893798b2 100644 --- a/base/applications/mscutils/servman/servman.c +++ b/base/applications/mscutils/servman/servman.c @@ -23,6 +23,7 @@ wWinMain(HINSTANCE hThisInstance, { LPWSTR lpAppName; HWND hMainWnd; + HACCEL hAccelTable; MSG Msg; int Ret = 1; INITCOMMONCONTROLSEX icex; @@ -51,6 +52,9 @@ wWinMain(HINSTANCE hThisInstance, return 1; } + hAccelTable = LoadAcceleratorsW(hInstance, + MAKEINTRESOURCEW(IDA_SERVMAN)); + if (InitMainWindowImpl()) { hMainWnd = CreateMainWindow(lpAppName, @@ -62,6 +66,7 @@ wWinMain(HINSTANCE hThisInstance, { //if ( !hProgDlg || !IsWindow(hProgDlg) || !IsDialogMessage(hProgDlg, &Msg) ) //if (!IsDialogMessage(g_hProgDlg, &Msg)) + if (!TranslateAcceleratorW(hMainWnd, hAccelTable, &Msg)) { TranslateMessage(&Msg); DispatchMessageW(&Msg);
6 years, 10 months
1
0
0
0
02/02: [WIN32K] Get rid of some instances of the ugly RETURN() macro
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6771bf55a015f0ae164b1…
commit 6771bf55a015f0ae164b144886b2740503079a42 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Sat Sep 9 14:42:53 2017 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Sat Feb 24 17:17:25 2018 +0100 [WIN32K] Get rid of some instances of the ugly RETURN() macro --- win32ss/user/ntuser/simplecall.c | 266 +++++++++++++++++++++++---------------- 1 file changed, 161 insertions(+), 105 deletions(-) diff --git a/win32ss/user/ntuser/simplecall.c b/win32ss/user/ntuser/simplecall.c index 01bae11c1b..8296b8d2cd 100644 --- a/win32ss/user/ntuser/simplecall.c +++ b/win32ss/user/ntuser/simplecall.c @@ -58,7 +58,6 @@ APIENTRY NtUserCallNoParam(DWORD Routine) { DWORD_PTR Result = 0; - DECLARE_RETURN(DWORD_PTR); TRACE("Enter NtUserCallNoParam\n"); UserEnterExclusive(); @@ -86,19 +85,23 @@ NtUserCallNoParam(DWORD Routine) break; case NOPARAM_ROUTINE_MSQCLEARWAKEMASK: - RETURN((DWORD_PTR)IntMsqClearWakeMask()); + Result = (DWORD_PTR)IntMsqClearWakeMask(); + break; case NOPARAM_ROUTINE_GETMSESSAGEPOS: { PTHREADINFO pti = PsGetCurrentThreadWin32Thread(); - RETURN((DWORD_PTR)MAKELONG(pti->ptLast.x, pti->ptLast.y)); + Result = (DWORD_PTR)MAKELONG(pti->ptLast.x, pti->ptLast.y); + break; } case NOPARAM_ROUTINE_RELEASECAPTURE: - RETURN((DWORD_PTR)IntReleaseCapture()); + Result = (DWORD_PTR)IntReleaseCapture(); + break; case NOPARAM_ROUTINE_LOADUSERAPIHOOK: - RETURN(UserLoadApiHook()); + Result = UserLoadApiHook(); + break; case NOPARAM_ROUTINE_ZAPACTIVEANDFOUS: { @@ -106,28 +109,30 @@ NtUserCallNoParam(DWORD Routine) TRACE("Zapping the Active and Focus window out of the Queue!\n"); pti->MessageQueue->spwndFocus = NULL; pti->MessageQueue->spwndActive = NULL; - RETURN(0); + Result = 0; + break; } /* this is a ReactOS only case and is needed for gui-on-demand */ case NOPARAM_ROUTINE_ISCONSOLEMODE: - RETURN(ScreenDeviceContext == NULL); + Result = (ScreenDeviceContext == NULL); + break; case NOPARAM_ROUTINE_UPDATEPERUSERIMMENABLING: gpsi->dwSRVIFlags |= SRVINFO_IMM32; // Always set. - RETURN(1); // Always return TRUE. + Result = TRUE; // Always return TRUE. + break; default: ERR("Calling invalid routine number 0x%x in NtUserCallNoParam\n", Routine); EngSetLastError(ERROR_INVALID_PARAMETER); break; } - RETURN(Result); -CLEANUP: - TRACE("Leave NtUserCallNoParam, ret=%p\n", (PVOID)_ret_); + TRACE("Leave NtUserCallNoParam, ret=%p\n",(PVOID)Result); UserLeave(); - END_CLEANUP; + + return Result; } @@ -140,7 +145,7 @@ NtUserCallOneParam( DWORD_PTR Param, DWORD Routine) { - DECLARE_RETURN(DWORD_PTR); + DWORD_PTR Result; TRACE("Enter NtUserCallOneParam\n"); @@ -153,7 +158,8 @@ NtUserCallOneParam( PTHREADINFO pti; pti = PsGetCurrentThreadWin32Thread(); MsqPostQuitMessage(pti, Param); - RETURN(TRUE); + Result = TRUE; + break; } case ONEPARAM_ROUTINE_BEGINDEFERWNDPOS: @@ -165,7 +171,8 @@ NtUserCallOneParam( if (count < 0) { EngSetLastError(ERROR_INVALID_PARAMETER); - RETURN(0); + Result = 0; + break; } /* Windows allows zero count, in which case it allocates context for 8 moves */ @@ -177,24 +184,31 @@ NtUserCallOneParam( (PHANDLE)&hDwp, TYPE_SETWINDOWPOS, sizeof(SMWP)); - if (!psmwp) RETURN(0); + if (!psmwp) + { + Result = 0; + break; + } psmwp->acvr = ExAllocatePoolWithTag(PagedPool, count * sizeof(CVR), USERTAG_SWP); if (!psmwp->acvr) { UserDeleteObject(hDwp, TYPE_SETWINDOWPOS); - RETURN(0); + Result = 0; + break; } RtlZeroMemory(psmwp->acvr, count * sizeof(CVR)); psmwp->bHandle = TRUE; psmwp->ccvr = 0; // actualCount psmwp->ccvrAlloc = count; // suggestedCount - RETURN((DWORD_PTR)hDwp); + Result = (DWORD_PTR)hDwp; + break; } case ONEPARAM_ROUTINE_SHOWCURSOR: - RETURN((DWORD_PTR)UserShowCursor((BOOL)Param)); + Result = (DWORD_PTR)UserShowCursor((BOOL)Param); + break; case ONEPARAM_ROUTINE_GETDESKTOPMAPPING: { @@ -204,43 +218,43 @@ NtUserCallOneParam( { /* Try convert the pointer to a user mode pointer if the desktop is mapped into the process */ - RETURN((DWORD_PTR)DesktopHeapAddressToUser((PVOID)Param)); + Result = (DWORD_PTR)DesktopHeapAddressToUser((PVOID)Param); } else { - RETURN(0); + Result = 0; } + break; } case ONEPARAM_ROUTINE_WINDOWFROMDC: - RETURN((DWORD_PTR)IntWindowFromDC((HDC)Param)); + Result = (DWORD_PTR)IntWindowFromDC((HDC)Param); + break; case ONEPARAM_ROUTINE_SWAPMOUSEBUTTON: { - DWORD_PTR Result; - Result = gspv.bMouseBtnSwap; gspv.bMouseBtnSwap = Param ? TRUE : FALSE; gpsi->aiSysMet[SM_SWAPBUTTON] = gspv.bMouseBtnSwap; - RETURN(Result); + break; } case ONEPARAM_ROUTINE_SETCARETBLINKTIME: - RETURN((DWORD_PTR)IntSetCaretBlinkTime((UINT)Param)); + Result = (DWORD_PTR)IntSetCaretBlinkTime((UINT)Param); + break; case ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO: - RETURN((DWORD_PTR)MsqSetMessageExtraInfo((LPARAM)Param)); + Result = (DWORD_PTR)MsqSetMessageExtraInfo((LPARAM)Param); + break; case ONEPARAM_ROUTINE_CREATEEMPTYCUROBJECT: { - DWORD_PTR Result; - if (!(Result = (DWORD_PTR)IntCreateCurIconHandle((DWORD)Param))) { EngSetLastError(ERROR_NOT_ENOUGH_MEMORY); - RETURN(0); + Result = 0; } - RETURN(Result); + break; } case ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING: @@ -261,54 +275,67 @@ NtUserCallOneParam( Process->W32PF_flags |= W32PF_NOWINDOWGHOSTING; } - RETURN(TRUE); + Result = TRUE; + break; } - RETURN(FALSE); + Result = FALSE; + break; } case ONEPARAM_ROUTINE_GETINPUTEVENT: - RETURN((DWORD_PTR)IntMsqSetWakeMask(Param)); + Result = (DWORD_PTR)IntMsqSetWakeMask(Param); + break; case ONEPARAM_ROUTINE_GETKEYBOARDTYPE: - RETURN(UserGetKeyboardType(Param)); + Result = UserGetKeyboardType(Param); + break; case ONEPARAM_ROUTINE_GETKEYBOARDLAYOUT: - RETURN((DWORD_PTR)UserGetKeyboardLayout(Param)); + Result = (DWORD_PTR)UserGetKeyboardLayout(Param); + break; case ONEPARAM_ROUTINE_RELEASEDC: - RETURN(UserReleaseDC(NULL, (HDC)Param, FALSE)); + Result = UserReleaseDC(NULL, (HDC) Param, FALSE); + break; case ONEPARAM_ROUTINE_REALIZEPALETTE: - RETURN(UserRealizePalette((HDC)Param)); + Result = UserRealizePalette((HDC) Param); + break; case ONEPARAM_ROUTINE_GETQUEUESTATUS: { - RETURN(IntGetQueueStatus((DWORD)Param)); + Result = IntGetQueueStatus((DWORD)Param); + break; } case ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS: /* FIXME: Should use UserEnterShared */ - RETURN(UserEnumClipboardFormats(Param)); + Result = UserEnumClipboardFormats(Param); + break; case ONEPARAM_ROUTINE_GETCURSORPOS: { - BOOL Ret = TRUE; PPOINTL pptl; PTHREADINFO pti = PsGetCurrentThreadWin32Thread(); - if (pti->rpdesk != IntGetActiveDesktop()) RETURN(FALSE); + Result = TRUE; + if (pti->rpdesk != IntGetActiveDesktop()) + { + Result = FALSE; + break; + } _SEH2_TRY { ProbeForWrite((POINT*)Param,sizeof(POINT),1); pptl = (PPOINTL)Param; *pptl = gpsi->ptCursor; } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { - Ret = FALSE; + Result = FALSE; } _SEH2_END; - RETURN(Ret); + break; } case ONEPARAM_ROUTINE_SETPROCDEFLAYOUT: @@ -318,64 +345,75 @@ NtUserCallOneParam( { ppi = PsGetCurrentProcessWin32Process(); ppi->dwLayout = Param; - RETURN(TRUE); + Result = TRUE; + break; } EngSetLastError(ERROR_INVALID_PARAMETER); - RETURN(FALSE); + Result = FALSE; + break; } case ONEPARAM_ROUTINE_GETPROCDEFLAYOUT: { - BOOL Ret = TRUE; PPROCESSINFO ppi; PDWORD pdwLayout; + Result = TRUE; + if (PsGetCurrentProcess() == gpepCSRSS) { EngSetLastError(ERROR_INVALID_ACCESS); - RETURN(FALSE); + Result = FALSE; + break; } + ppi = PsGetCurrentProcessWin32Process(); _SEH2_TRY { pdwLayout = (PDWORD)Param; *pdwLayout = ppi->dwLayout; } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { SetLastNtError(_SEH2_GetExceptionCode()); - Ret = FALSE; + Result = FALSE; } _SEH2_END; - RETURN(Ret); + break; } case ONEPARAM_ROUTINE_REPLYMESSAGE: - RETURN(co_MsqReplyMessage((LRESULT)Param)); + Result = co_MsqReplyMessage((LRESULT)Param); + break; case ONEPARAM_ROUTINE_MESSAGEBEEP: /* TODO: Implement sound sentry */ - RETURN(UserPostMessage(hwndSAS, WM_LOGONNOTIFY, LN_MESSAGE_BEEP, Param)); + Result = UserPostMessage(hwndSAS, WM_LOGONNOTIFY, LN_MESSAGE_BEEP, Param); + break; case ONEPARAM_ROUTINE_CREATESYSTEMTHREADS: - RETURN(CreateSystemThreads(Param)); + Result = CreateSystemThreads(Param); + break; case ONEPARAM_ROUTINE_LOCKFOREGNDWINDOW: - RETURN((DWORD_PTR)IntLockSetForegroundWindow(Param)); + Result = (DWORD_PTR)IntLockSetForegroundWindow(Param); + break; case ONEPARAM_ROUTINE_ALLOWSETFOREGND: + Result = (DWORD_PTR)IntAllowSetForegroundWindow(Param); + break; - RETURN((DWORD_PTR)IntAllowSetForegroundWindow(Param)); + default: + ERR("Calling invalid routine number 0x%x in NtUserCallOneParam(), Param=0x%x\n", + Routine, Param); + EngSetLastError(ERROR_INVALID_PARAMETER); + Result = 0; + break; } - ERR("Calling invalid routine number 0x%x in NtUserCallOneParam(), Param=0x%x\n", - Routine, Param); - EngSetLastError(ERROR_INVALID_PARAMETER); - RETURN(0); + TRACE("Leave NtUserCallOneParam, ret=%p\n", (PVOID)Result); + UserLeave(); -CLEANUP: - TRACE("Leave NtUserCallOneParam, ret=%p\n", (PVOID)_ret_); - UserLeave(); - END_CLEANUP; + return Result; } @@ -390,8 +428,7 @@ NtUserCallTwoParam( DWORD Routine) { PWND Window; - DECLARE_RETURN(DWORD_PTR); - + DWORD_PTR Ret; TRACE("Enter NtUserCallTwoParam\n"); UserEnterExclusive(); @@ -399,18 +436,19 @@ NtUserCallTwoParam( { case TWOPARAM_ROUTINE_REDRAWTITLE: { - DWORD_PTR Ret; Window = UserGetWindowObject((HWND)Param1); Ret = (DWORD_PTR)UserPaintCaption(Window, (INT)Param2); - RETURN(Ret); + break; } case TWOPARAM_ROUTINE_SETMENUBARHEIGHT: { - DWORD_PTR Ret; PMENU MenuObject = IntGetMenuObject((HMENU)Param1); if (!MenuObject) - RETURN(0); + { + Ret = 0; + break; + } if (Param2 > 0) { @@ -420,66 +458,85 @@ NtUserCallTwoParam( else Ret = (DWORD_PTR)MenuObject->cyMenu; IntReleaseMenuObject(MenuObject); - RETURN(Ret); + break; } case TWOPARAM_ROUTINE_SETGUITHRDHANDLE: { PTHREADINFO pti = (PTHREADINFO)PsGetCurrentThreadWin32Thread(); ASSERT(pti->MessageQueue); - RETURN((DWORD_PTR)MsqSetStateWindow(pti, (ULONG)Param1, (HWND)Param2)); + Ret = (DWORD_PTR)MsqSetStateWindow(pti, (ULONG)Param1, (HWND)Param2); + break; } case TWOPARAM_ROUTINE_ENABLEWINDOW: - RETURN(IntEnableWindow((HWND)Param1, (BOOL)Param2)); + Ret = IntEnableWindow((HWND)Param1, (BOOL)Param2); + break; case TWOPARAM_ROUTINE_SHOWOWNEDPOPUPS: { Window = UserGetWindowObject((HWND)Param1); - if (!Window) RETURN(0); + if (!Window) + { + Ret = 0; + break; + } - RETURN((DWORD_PTR)IntShowOwnedPopups(Window, (BOOL)Param2)); + Ret = (DWORD_PTR)IntShowOwnedPopups(Window, (BOOL)Param2); + break; } case TWOPARAM_ROUTINE_ROS_UPDATEUISTATE: { WPARAM wParam; Window = UserGetWindowObject((HWND)Param1); - if (!Window) RETURN(0); + if (!Window) + { + Ret = 0; + break; + } /* Unpack wParam */ wParam = MAKEWPARAM((Param2 >> 3) & 0x3, Param2 & (UISF_HIDEFOCUS | UISF_HIDEACCEL | UISF_ACTIVE)); - RETURN(UserUpdateUiState(Window, wParam)); + Ret = UserUpdateUiState(Window, wParam); + break; } case TWOPARAM_ROUTINE_SWITCHTOTHISWINDOW: STUB - RETURN(0); + Ret = 0; + break; case TWOPARAM_ROUTINE_SETCARETPOS: - RETURN((DWORD_PTR)co_IntSetCaretPos((int)Param1, (int)Param2)); + Ret = (DWORD_PTR)co_IntSetCaretPos((int)Param1, (int)Param2); + break; case TWOPARAM_ROUTINE_REGISTERLOGONPROCESS: - RETURN((DWORD_PTR)co_IntRegisterLogonProcess((HANDLE)Param1, (BOOL)Param2)); + Ret = (DWORD_PTR)co_IntRegisterLogonProcess((HANDLE)Param1, (BOOL)Param2); + break; case TWOPARAM_ROUTINE_SETCURSORPOS: - RETURN((DWORD_PTR)UserSetCursorPos((int)Param1, (int)Param2, 0, 0, FALSE)); + Ret = (DWORD_PTR)UserSetCursorPos((int)Param1, (int)Param2, 0, 0, FALSE); + break; case TWOPARAM_ROUTINE_UNHOOKWINDOWSHOOK: - RETURN(IntUnhookWindowsHook((int)Param1, (HOOKPROC)Param2)); + Ret = IntUnhookWindowsHook((int)Param1, (HOOKPROC)Param2); + break; + + default: + ERR("Calling invalid routine number 0x%x in NtUserCallTwoParam(), Param1=0x%x Parm2=0x%x\n", + Routine, Param1, Param2); + EngSetLastError(ERROR_INVALID_PARAMETER); + Ret = 0; } - ERR("Calling invalid routine number 0x%x in NtUserCallTwoParam(), Param1=0x%x Parm2=0x%x\n", - Routine, Param1, Param2); - EngSetLastError(ERROR_INVALID_PARAMETER); - RETURN(0); -CLEANUP: - TRACE("Leave NtUserCallTwoParam, ret=%p\n", (PVOID)_ret_); + TRACE("Leave NtUserCallTwoParam, ret=%p\n", (PVOID)Ret); UserLeave(); - END_CLEANUP; + + return Ret; } @@ -492,17 +549,17 @@ NtUserCallHwndLock( HWND hWnd, DWORD Routine) { - BOOL Ret = 0; + BOOL Ret = FALSE; PWND Window; USER_REFERENCE_ENTRY Ref; - DECLARE_RETURN(BOOLEAN); TRACE("Enter NtUserCallHwndLock\n"); UserEnterExclusive(); if (!(Window = UserGetWindowObject(hWnd))) { - RETURN(FALSE); + Ret = FALSE; + goto Exit; } UserRefObjectCo(Window, &Ref); @@ -578,12 +635,11 @@ NtUserCallHwndLock( UserDerefObjectCo(Window); - RETURN(Ret); - -CLEANUP: - TRACE("Leave NtUserCallHwndLock, ret=%u\n", _ret_); +Exit: + TRACE("Leave NtUserCallHwndLock, ret=%u\n", Ret); UserLeave(); - END_CLEANUP; + + return Ret; } /* @@ -781,18 +837,19 @@ NtUserCallHwndParamLock( DWORD Param, DWORD Routine) { - DWORD Ret = 0; + DWORD Ret = FALSE; PWND Window; USER_REFERENCE_ENTRY Ref; - DECLARE_RETURN(DWORD); TRACE("Enter NtUserCallHwndParamLock\n"); UserEnterExclusive(); if (!(Window = UserGetWindowObject(hWnd))) { - RETURN(FALSE); + Ret = FALSE; + goto Exit; } + UserRefObjectCo(Window, &Ref); switch (Routine) @@ -808,13 +865,12 @@ NtUserCallHwndParamLock( UserDerefObjectCo(Window); - RETURN(Ret); +Exit: -CLEANUP: - TRACE("Leave NtUserCallHwndParamLock, ret=%lu\n", _ret_); + TRACE("Leave NtUserCallHwndParamLock, ret=%lu\n", Ret); UserLeave(); - END_CLEANUP; + return Ret; } /* EOF */
6 years, 10 months
1
0
0
0
01/02: [FORMATTING] Fix indentation, no functional changes.
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e688aab6b38c9a06d6ad6…
commit e688aab6b38c9a06d6ad6c6f7e072bc04b8235be Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Mon Feb 19 15:04:38 2018 +0100 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Sat Feb 24 17:17:25 2018 +0100 [FORMATTING] Fix indentation, no functional changes. --- win32ss/user/ntuser/simplecall.c | 1268 +++++++++++++++++++------------------- 1 file changed, 645 insertions(+), 623 deletions(-) diff --git a/win32ss/user/ntuser/simplecall.c b/win32ss/user/ntuser/simplecall.c index 4be533a8fb..01bae11c1b 100644 --- a/win32ss/user/ntuser/simplecall.c +++ b/win32ss/user/ntuser/simplecall.c @@ -16,38 +16,38 @@ HANDLE gpidLogon = 0; BOOL FASTCALL co_IntRegisterLogonProcess(HANDLE ProcessId, BOOL Register) { - NTSTATUS Status; - PEPROCESS Process; - - Status = PsLookupProcessByProcessId(ProcessId, &Process); - if (!NT_SUCCESS(Status)) - { - EngSetLastError(RtlNtStatusToDosError(Status)); - return FALSE; - } - - ProcessId = Process->UniqueProcessId; - - ObDereferenceObject(Process); - - if (Register) - { - /* Register the logon process */ - if (gpidLogon != 0) - return FALSE; - - gpidLogon = ProcessId; - } - else - { - /* Deregister the logon process */ - if (gpidLogon != ProcessId) - return FALSE; - - gpidLogon = 0; - } - - return TRUE; + NTSTATUS Status; + PEPROCESS Process; + + Status = PsLookupProcessByProcessId(ProcessId, &Process); + if (!NT_SUCCESS(Status)) + { + EngSetLastError(RtlNtStatusToDosError(Status)); + return FALSE; + } + + ProcessId = Process->UniqueProcessId; + + ObDereferenceObject(Process); + + if (Register) + { + /* Register the logon process */ + if (gpidLogon != 0) + return FALSE; + + gpidLogon = ProcessId; + } + else + { + /* Deregister the logon process */ + if (gpidLogon != ProcessId) + return FALSE; + + gpidLogon = 0; + } + + return TRUE; } /* @@ -57,77 +57,77 @@ DWORD_PTR APIENTRY NtUserCallNoParam(DWORD Routine) { - DWORD_PTR Result = 0; - DECLARE_RETURN(DWORD_PTR); - - TRACE("Enter NtUserCallNoParam\n"); - UserEnterExclusive(); - - switch(Routine) - { - case NOPARAM_ROUTINE_CREATEMENU: - Result = (DWORD_PTR)UserCreateMenu(GetW32ThreadInfo()->rpdesk, FALSE); - break; - - case NOPARAM_ROUTINE_CREATEMENUPOPUP: - Result = (DWORD_PTR)UserCreateMenu(GetW32ThreadInfo()->rpdesk, TRUE); - break; - - case NOPARAM_ROUTINE_DESTROY_CARET: - Result = (DWORD_PTR)co_IntDestroyCaret(PsGetCurrentThread()->Tcb.Win32Thread); - break; - - case NOPARAM_ROUTINE_INIT_MESSAGE_PUMP: - Result = (DWORD_PTR)IntInitMessagePumpHook(); - break; - - case NOPARAM_ROUTINE_UNINIT_MESSAGE_PUMP: - Result = (DWORD_PTR)IntUninitMessagePumpHook(); - break; - - case NOPARAM_ROUTINE_MSQCLEARWAKEMASK: - RETURN( (DWORD_PTR)IntMsqClearWakeMask()); - - case NOPARAM_ROUTINE_GETMSESSAGEPOS: - { - PTHREADINFO pti = PsGetCurrentThreadWin32Thread(); - RETURN( (DWORD_PTR)MAKELONG(pti->ptLast.x, pti->ptLast.y)); - } - - case NOPARAM_ROUTINE_RELEASECAPTURE: - RETURN( (DWORD_PTR)IntReleaseCapture()); - - case NOPARAM_ROUTINE_LOADUSERAPIHOOK: - RETURN(UserLoadApiHook()); - - case NOPARAM_ROUTINE_ZAPACTIVEANDFOUS: - { - PTHREADINFO pti = PsGetCurrentThreadWin32Thread(); - TRACE("Zapping the Active and Focus window out of the Queue!\n"); - pti->MessageQueue->spwndFocus = NULL; - pti->MessageQueue->spwndActive = NULL; - RETURN(0); - } - - /* this is a ReactOS only case and is needed for gui-on-demand */ - case NOPARAM_ROUTINE_ISCONSOLEMODE: - RETURN( ScreenDeviceContext == NULL ); - - case NOPARAM_ROUTINE_UPDATEPERUSERIMMENABLING: - gpsi->dwSRVIFlags |= SRVINFO_IMM32; // Always set. - RETURN(1); // Always return TRUE. - - default: - ERR("Calling invalid routine number 0x%x in NtUserCallNoParam\n", Routine); - EngSetLastError(ERROR_INVALID_PARAMETER); - break; - } - RETURN(Result); + DWORD_PTR Result = 0; + DECLARE_RETURN(DWORD_PTR); + + TRACE("Enter NtUserCallNoParam\n"); + UserEnterExclusive(); + + switch (Routine) + { + case NOPARAM_ROUTINE_CREATEMENU: + Result = (DWORD_PTR)UserCreateMenu(GetW32ThreadInfo()->rpdesk, FALSE); + break; + + case NOPARAM_ROUTINE_CREATEMENUPOPUP: + Result = (DWORD_PTR)UserCreateMenu(GetW32ThreadInfo()->rpdesk, TRUE); + break; + + case NOPARAM_ROUTINE_DESTROY_CARET: + Result = (DWORD_PTR)co_IntDestroyCaret(PsGetCurrentThread()->Tcb.Win32Thread); + break; + + case NOPARAM_ROUTINE_INIT_MESSAGE_PUMP: + Result = (DWORD_PTR)IntInitMessagePumpHook(); + break; + + case NOPARAM_ROUTINE_UNINIT_MESSAGE_PUMP: + Result = (DWORD_PTR)IntUninitMessagePumpHook(); + break; + + case NOPARAM_ROUTINE_MSQCLEARWAKEMASK: + RETURN((DWORD_PTR)IntMsqClearWakeMask()); + + case NOPARAM_ROUTINE_GETMSESSAGEPOS: + { + PTHREADINFO pti = PsGetCurrentThreadWin32Thread(); + RETURN((DWORD_PTR)MAKELONG(pti->ptLast.x, pti->ptLast.y)); + } + + case NOPARAM_ROUTINE_RELEASECAPTURE: + RETURN((DWORD_PTR)IntReleaseCapture()); + + case NOPARAM_ROUTINE_LOADUSERAPIHOOK: + RETURN(UserLoadApiHook()); + + case NOPARAM_ROUTINE_ZAPACTIVEANDFOUS: + { + PTHREADINFO pti = PsGetCurrentThreadWin32Thread(); + TRACE("Zapping the Active and Focus window out of the Queue!\n"); + pti->MessageQueue->spwndFocus = NULL; + pti->MessageQueue->spwndActive = NULL; + RETURN(0); + } + + /* this is a ReactOS only case and is needed for gui-on-demand */ + case NOPARAM_ROUTINE_ISCONSOLEMODE: + RETURN(ScreenDeviceContext == NULL); + + case NOPARAM_ROUTINE_UPDATEPERUSERIMMENABLING: + gpsi->dwSRVIFlags |= SRVINFO_IMM32; // Always set. + RETURN(1); // Always return TRUE. + + default: + ERR("Calling invalid routine number 0x%x in NtUserCallNoParam\n", Routine); + EngSetLastError(ERROR_INVALID_PARAMETER); + break; + } + RETURN(Result); CLEANUP: - TRACE("Leave NtUserCallNoParam, ret=%p\n",(PVOID)_ret_); - UserLeave(); - END_CLEANUP; + TRACE("Leave NtUserCallNoParam, ret=%p\n", (PVOID)_ret_); + UserLeave(); + END_CLEANUP; } @@ -137,232 +137,245 @@ CLEANUP: DWORD_PTR APIENTRY NtUserCallOneParam( - DWORD_PTR Param, - DWORD Routine) + DWORD_PTR Param, + DWORD Routine) { - DECLARE_RETURN(DWORD_PTR); + DECLARE_RETURN(DWORD_PTR); - TRACE("Enter NtUserCallOneParam\n"); + TRACE("Enter NtUserCallOneParam\n"); - UserEnterExclusive(); + UserEnterExclusive(); - switch(Routine) - { - case ONEPARAM_ROUTINE_POSTQUITMESSAGE: - { - PTHREADINFO pti; - pti = PsGetCurrentThreadWin32Thread(); - MsqPostQuitMessage(pti, Param); - RETURN(TRUE); - } + switch (Routine) + { + case ONEPARAM_ROUTINE_POSTQUITMESSAGE: + { + PTHREADINFO pti; + pti = PsGetCurrentThreadWin32Thread(); + MsqPostQuitMessage(pti, Param); + RETURN(TRUE); + } - case ONEPARAM_ROUTINE_BEGINDEFERWNDPOS: - { - PSMWP psmwp; - HDWP hDwp = NULL; - INT count = (INT)Param; + case ONEPARAM_ROUTINE_BEGINDEFERWNDPOS: + { + PSMWP psmwp; + HDWP hDwp = NULL; + INT count = (INT)Param; - if (count < 0) - { + if (count < 0) + { EngSetLastError(ERROR_INVALID_PARAMETER); RETURN(0); - } - /* Windows allows zero count, in which case it allocates context for 8 moves */ - if (count == 0) count = 8; - - psmwp = (PSMWP) UserCreateObject( gHandleTable, - NULL, - NULL, - (PHANDLE)&hDwp, - TYPE_SETWINDOWPOS, - sizeof(SMWP)); - if (!psmwp) RETURN(0); - psmwp->acvr = ExAllocatePoolWithTag(PagedPool, count * sizeof(CVR), USERTAG_SWP); - if (!psmwp->acvr) - { + } + + /* Windows allows zero count, in which case it allocates context for 8 moves */ + if (count == 0) count = 8; + + psmwp = (PSMWP)UserCreateObject(gHandleTable, + NULL, + NULL, + (PHANDLE)&hDwp, + TYPE_SETWINDOWPOS, + sizeof(SMWP)); + if (!psmwp) RETURN(0); + + psmwp->acvr = ExAllocatePoolWithTag(PagedPool, count * sizeof(CVR), USERTAG_SWP); + if (!psmwp->acvr) + { UserDeleteObject(hDwp, TYPE_SETWINDOWPOS); RETURN(0); - } - RtlZeroMemory(psmwp->acvr, count * sizeof(CVR)); - psmwp->bHandle = TRUE; - psmwp->ccvr = 0; // actualCount - psmwp->ccvrAlloc = count; // suggestedCount - RETURN((DWORD_PTR)hDwp); - } - - case ONEPARAM_ROUTINE_SHOWCURSOR: - RETURN( (DWORD_PTR)UserShowCursor((BOOL)Param) ); - - case ONEPARAM_ROUTINE_GETDESKTOPMAPPING: - { - PTHREADINFO ti; - ti = GetW32ThreadInfo(); - if (ti != NULL) - { + } + + RtlZeroMemory(psmwp->acvr, count * sizeof(CVR)); + psmwp->bHandle = TRUE; + psmwp->ccvr = 0; // actualCount + psmwp->ccvrAlloc = count; // suggestedCount + RETURN((DWORD_PTR)hDwp); + } + + case ONEPARAM_ROUTINE_SHOWCURSOR: + RETURN((DWORD_PTR)UserShowCursor((BOOL)Param)); + + case ONEPARAM_ROUTINE_GETDESKTOPMAPPING: + { + PTHREADINFO ti; + ti = GetW32ThreadInfo(); + if (ti != NULL) + { /* Try convert the pointer to a user mode pointer if the desktop is mapped into the process */ RETURN((DWORD_PTR)DesktopHeapAddressToUser((PVOID)Param)); - } - else - { + } + else + { RETURN(0); - } - } + } + } - case ONEPARAM_ROUTINE_WINDOWFROMDC: - RETURN( (DWORD_PTR)IntWindowFromDC((HDC)Param)); + case ONEPARAM_ROUTINE_WINDOWFROMDC: + RETURN((DWORD_PTR)IntWindowFromDC((HDC)Param)); - case ONEPARAM_ROUTINE_SWAPMOUSEBUTTON: - { + case ONEPARAM_ROUTINE_SWAPMOUSEBUTTON: + { DWORD_PTR Result; Result = gspv.bMouseBtnSwap; gspv.bMouseBtnSwap = Param ? TRUE : FALSE; gpsi->aiSysMet[SM_SWAPBUTTON] = gspv.bMouseBtnSwap; RETURN(Result); - } + } - case ONEPARAM_ROUTINE_SETCARETBLINKTIME: - RETURN( (DWORD_PTR)IntSetCaretBlinkTime((UINT)Param)); + case ONEPARAM_ROUTINE_SETCARETBLINKTIME: + RETURN((DWORD_PTR)IntSetCaretBlinkTime((UINT)Param)); - case ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO: - RETURN( (DWORD_PTR)MsqSetMessageExtraInfo((LPARAM)Param)); + case ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO: + RETURN((DWORD_PTR)MsqSetMessageExtraInfo((LPARAM)Param)); - case ONEPARAM_ROUTINE_CREATEEMPTYCUROBJECT: - { - DWORD_PTR Result ; + case ONEPARAM_ROUTINE_CREATEEMPTYCUROBJECT: + { + DWORD_PTR Result; if (!(Result = (DWORD_PTR)IntCreateCurIconHandle((DWORD)Param))) { - EngSetLastError(ERROR_NOT_ENOUGH_MEMORY); - RETURN(0); + EngSetLastError(ERROR_NOT_ENOUGH_MEMORY); + RETURN(0); } - RETURN(Result); - } + RETURN(Result); + } - case ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING: - { + case ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING: + { BOOL Enable; PPROCESSINFO Process = PsGetCurrentProcessWin32Process(); - if(Process != NULL) + if (Process != NULL) { - Enable = (BOOL)(Param != 0); - - if(Enable) - { - Process->W32PF_flags &= ~W32PF_NOWINDOWGHOSTING; - } - else - { - Process->W32PF_flags |= W32PF_NOWINDOWGHOSTING; - } - - RETURN( TRUE); + Enable = (BOOL)(Param != 0); + + if (Enable) + { + Process->W32PF_flags &= ~W32PF_NOWINDOWGHOSTING; + } + else + { + Process->W32PF_flags |= W32PF_NOWINDOWGHOSTING; + } + + RETURN(TRUE); } - RETURN( FALSE); - } - - case ONEPARAM_ROUTINE_GETINPUTEVENT: - RETURN( (DWORD_PTR)IntMsqSetWakeMask(Param)); - - case ONEPARAM_ROUTINE_GETKEYBOARDTYPE: - RETURN( UserGetKeyboardType(Param)); - - case ONEPARAM_ROUTINE_GETKEYBOARDLAYOUT: - RETURN( (DWORD_PTR)UserGetKeyboardLayout(Param)); - - case ONEPARAM_ROUTINE_RELEASEDC: - RETURN (UserReleaseDC(NULL, (HDC) Param, FALSE)); - - case ONEPARAM_ROUTINE_REALIZEPALETTE: - RETURN (UserRealizePalette((HDC) Param)); - - case ONEPARAM_ROUTINE_GETQUEUESTATUS: - { - RETURN (IntGetQueueStatus((DWORD)Param)); - } - case ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS: - /* FIXME: Should use UserEnterShared */ - RETURN(UserEnumClipboardFormats(Param)); - - case ONEPARAM_ROUTINE_GETCURSORPOS: - { - BOOL Ret = TRUE; - PPOINTL pptl; - PTHREADINFO pti = PsGetCurrentThreadWin32Thread(); - if (pti->rpdesk != IntGetActiveDesktop()) RETURN(FALSE); - _SEH2_TRY - { - ProbeForWrite((POINT*)Param,sizeof(POINT),1); - pptl = (PPOINTL)Param; - *pptl = gpsi->ptCursor; - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - Ret = FALSE; - } - _SEH2_END; - RETURN(Ret); - } - case ONEPARAM_ROUTINE_SETPROCDEFLAYOUT: - { - PPROCESSINFO ppi; - if (Param & LAYOUT_ORIENTATIONMASK) - { - ppi = PsGetCurrentProcessWin32Process(); - ppi->dwLayout = Param; - RETURN(TRUE); - } - EngSetLastError(ERROR_INVALID_PARAMETER); - RETURN(FALSE); - } - case ONEPARAM_ROUTINE_GETPROCDEFLAYOUT: - { - BOOL Ret = TRUE; - PPROCESSINFO ppi; - PDWORD pdwLayout; - if ( PsGetCurrentProcess() == gpepCSRSS) - { - EngSetLastError(ERROR_INVALID_ACCESS); - RETURN(FALSE); - } - ppi = PsGetCurrentProcessWin32Process(); - _SEH2_TRY - { - pdwLayout = (PDWORD)Param; - *pdwLayout = ppi->dwLayout; - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - SetLastNtError(_SEH2_GetExceptionCode()); - Ret = FALSE; - } - _SEH2_END; - RETURN(Ret); - } - case ONEPARAM_ROUTINE_REPLYMESSAGE: - RETURN (co_MsqReplyMessage((LRESULT) Param)); - case ONEPARAM_ROUTINE_MESSAGEBEEP: - /* TODO: Implement sound sentry */ - RETURN ( UserPostMessage(hwndSAS, WM_LOGONNOTIFY, LN_MESSAGE_BEEP, Param) ); - case ONEPARAM_ROUTINE_CREATESYSTEMTHREADS: - RETURN(CreateSystemThreads(Param)); - case ONEPARAM_ROUTINE_LOCKFOREGNDWINDOW: - RETURN( (DWORD_PTR)IntLockSetForegroundWindow(Param)); - case ONEPARAM_ROUTINE_ALLOWSETFOREGND: - RETURN( (DWORD_PTR)IntAllowSetForegroundWindow(Param)); - } - ERR("Calling invalid routine number 0x%x in NtUserCallOneParam(), Param=0x%x\n", - Routine, Param); - EngSetLastError(ERROR_INVALID_PARAMETER); - RETURN( 0); + RETURN(FALSE); + } + + case ONEPARAM_ROUTINE_GETINPUTEVENT: + RETURN((DWORD_PTR)IntMsqSetWakeMask(Param)); + + case ONEPARAM_ROUTINE_GETKEYBOARDTYPE: + RETURN(UserGetKeyboardType(Param)); + + case ONEPARAM_ROUTINE_GETKEYBOARDLAYOUT: + RETURN((DWORD_PTR)UserGetKeyboardLayout(Param)); + + case ONEPARAM_ROUTINE_RELEASEDC: + RETURN(UserReleaseDC(NULL, (HDC)Param, FALSE)); + + case ONEPARAM_ROUTINE_REALIZEPALETTE: + RETURN(UserRealizePalette((HDC)Param)); + + case ONEPARAM_ROUTINE_GETQUEUESTATUS: + { + RETURN(IntGetQueueStatus((DWORD)Param)); + } + + case ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS: + /* FIXME: Should use UserEnterShared */ + RETURN(UserEnumClipboardFormats(Param)); + + case ONEPARAM_ROUTINE_GETCURSORPOS: + { + BOOL Ret = TRUE; + PPOINTL pptl; + PTHREADINFO pti = PsGetCurrentThreadWin32Thread(); + if (pti->rpdesk != IntGetActiveDesktop()) RETURN(FALSE); + _SEH2_TRY + { + ProbeForWrite((POINT*)Param,sizeof(POINT),1); + pptl = (PPOINTL)Param; + *pptl = gpsi->ptCursor; + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + Ret = FALSE; + } + _SEH2_END; + RETURN(Ret); + } + + case ONEPARAM_ROUTINE_SETPROCDEFLAYOUT: + { + PPROCESSINFO ppi; + if (Param & LAYOUT_ORIENTATIONMASK) + { + ppi = PsGetCurrentProcessWin32Process(); + ppi->dwLayout = Param; + RETURN(TRUE); + } + EngSetLastError(ERROR_INVALID_PARAMETER); + RETURN(FALSE); + } + + case ONEPARAM_ROUTINE_GETPROCDEFLAYOUT: + { + BOOL Ret = TRUE; + PPROCESSINFO ppi; + PDWORD pdwLayout; + if (PsGetCurrentProcess() == gpepCSRSS) + { + EngSetLastError(ERROR_INVALID_ACCESS); + RETURN(FALSE); + } + ppi = PsGetCurrentProcessWin32Process(); + _SEH2_TRY + { + pdwLayout = (PDWORD)Param; + *pdwLayout = ppi->dwLayout; + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + SetLastNtError(_SEH2_GetExceptionCode()); + Ret = FALSE; + } + _SEH2_END; + RETURN(Ret); + } + + case ONEPARAM_ROUTINE_REPLYMESSAGE: + RETURN(co_MsqReplyMessage((LRESULT)Param)); + + case ONEPARAM_ROUTINE_MESSAGEBEEP: + /* TODO: Implement sound sentry */ + RETURN(UserPostMessage(hwndSAS, WM_LOGONNOTIFY, LN_MESSAGE_BEEP, Param)); + + case ONEPARAM_ROUTINE_CREATESYSTEMTHREADS: + RETURN(CreateSystemThreads(Param)); + + case ONEPARAM_ROUTINE_LOCKFOREGNDWINDOW: + RETURN((DWORD_PTR)IntLockSetForegroundWindow(Param)); + + case ONEPARAM_ROUTINE_ALLOWSETFOREGND: + + RETURN((DWORD_PTR)IntAllowSetForegroundWindow(Param)); + } + + ERR("Calling invalid routine number 0x%x in NtUserCallOneParam(), Param=0x%x\n", + Routine, Param); + EngSetLastError(ERROR_INVALID_PARAMETER); + RETURN(0); CLEANUP: - TRACE("Leave NtUserCallOneParam, ret=%p\n", (PVOID)_ret_); - UserLeave(); - END_CLEANUP; + TRACE("Leave NtUserCallOneParam, ret=%p\n", (PVOID)_ret_); + UserLeave(); + END_CLEANUP; } @@ -372,99 +385,101 @@ CLEANUP: DWORD_PTR APIENTRY NtUserCallTwoParam( - DWORD_PTR Param1, - DWORD_PTR Param2, - DWORD Routine) + DWORD_PTR Param1, + DWORD_PTR Param2, + DWORD Routine) { - PWND Window; - DECLARE_RETURN(DWORD_PTR); - - TRACE("Enter NtUserCallTwoParam\n"); - UserEnterExclusive(); - - switch(Routine) - { - case TWOPARAM_ROUTINE_REDRAWTITLE: - { - DWORD_PTR Ret; - Window = UserGetWindowObject((HWND)Param1); - Ret = (DWORD_PTR)UserPaintCaption(Window, (INT)Param2); - RETURN(Ret); - } - case TWOPARAM_ROUTINE_SETMENUBARHEIGHT: - { + PWND Window; + DECLARE_RETURN(DWORD_PTR); + + TRACE("Enter NtUserCallTwoParam\n"); + UserEnterExclusive(); + + switch (Routine) + { + case TWOPARAM_ROUTINE_REDRAWTITLE: + { + DWORD_PTR Ret; + Window = UserGetWindowObject((HWND)Param1); + Ret = (DWORD_PTR)UserPaintCaption(Window, (INT)Param2); + RETURN(Ret); + } + + case TWOPARAM_ROUTINE_SETMENUBARHEIGHT: + { DWORD_PTR Ret; PMENU MenuObject = IntGetMenuObject((HMENU)Param1); - if(!MenuObject) - RETURN( 0); + if (!MenuObject) + RETURN(0); - if(Param2 > 0) + if (Param2 > 0) { - Ret = (MenuObject->cyMenu == (int)Param2); - MenuObject->cyMenu = (int)Param2; + Ret = (MenuObject->cyMenu == (int)Param2); + MenuObject->cyMenu = (int)Param2; } else - Ret = (DWORD_PTR)MenuObject->cyMenu; + Ret = (DWORD_PTR)MenuObject->cyMenu; IntReleaseMenuObject(MenuObject); - RETURN( Ret); - } + RETURN(Ret); + } - case TWOPARAM_ROUTINE_SETGUITHRDHANDLE: - { + case TWOPARAM_ROUTINE_SETGUITHRDHANDLE: + { PTHREADINFO pti = (PTHREADINFO)PsGetCurrentThreadWin32Thread(); ASSERT(pti->MessageQueue); - RETURN( (DWORD_PTR)MsqSetStateWindow(pti, (ULONG)Param1, (HWND)Param2)); - } + RETURN((DWORD_PTR)MsqSetStateWindow(pti, (ULONG)Param1, (HWND)Param2)); + } + + case TWOPARAM_ROUTINE_ENABLEWINDOW: + RETURN(IntEnableWindow((HWND)Param1, (BOOL)Param2)); - case TWOPARAM_ROUTINE_ENABLEWINDOW: - RETURN( IntEnableWindow((HWND)Param1, (BOOL)Param2)); + case TWOPARAM_ROUTINE_SHOWOWNEDPOPUPS: + { + Window = UserGetWindowObject((HWND)Param1); + if (!Window) RETURN(0); - case TWOPARAM_ROUTINE_SHOWOWNEDPOPUPS: - { - Window = UserGetWindowObject((HWND)Param1); - if (!Window) RETURN(0); + RETURN((DWORD_PTR)IntShowOwnedPopups(Window, (BOOL)Param2)); + } - RETURN( (DWORD_PTR)IntShowOwnedPopups(Window, (BOOL) Param2)); - } + case TWOPARAM_ROUTINE_ROS_UPDATEUISTATE: + { + WPARAM wParam; + Window = UserGetWindowObject((HWND)Param1); + if (!Window) RETURN(0); - case TWOPARAM_ROUTINE_ROS_UPDATEUISTATE: - { - WPARAM wParam; - Window = UserGetWindowObject((HWND)Param1); - if (!Window) RETURN(0); + /* Unpack wParam */ + wParam = MAKEWPARAM((Param2 >> 3) & 0x3, + Param2 & (UISF_HIDEFOCUS | UISF_HIDEACCEL | UISF_ACTIVE)); - /* Unpack wParam */ - wParam = MAKEWPARAM((Param2 >> 3) & 0x3, - Param2 & (UISF_HIDEFOCUS | UISF_HIDEACCEL | UISF_ACTIVE)); + RETURN(UserUpdateUiState(Window, wParam)); + } - RETURN( UserUpdateUiState(Window, wParam) ); - } + case TWOPARAM_ROUTINE_SWITCHTOTHISWINDOW: + STUB + RETURN(0); - case TWOPARAM_ROUTINE_SWITCHTOTHISWINDOW: - STUB - RETURN( 0); + case TWOPARAM_ROUTINE_SETCARETPOS: + RETURN((DWORD_PTR)co_IntSetCaretPos((int)Param1, (int)Param2)); - case TWOPARAM_ROUTINE_SETCARETPOS: - RETURN( (DWORD_PTR)co_IntSetCaretPos((int)Param1, (int)Param2)); + case TWOPARAM_ROUTINE_REGISTERLOGONPROCESS: + RETURN((DWORD_PTR)co_IntRegisterLogonProcess((HANDLE)Param1, (BOOL)Param2)); - case TWOPARAM_ROUTINE_REGISTERLOGONPROCESS: - RETURN( (DWORD_PTR)co_IntRegisterLogonProcess((HANDLE)Param1, (BOOL)Param2)); + case TWOPARAM_ROUTINE_SETCURSORPOS: + RETURN((DWORD_PTR)UserSetCursorPos((int)Param1, (int)Param2, 0, 0, FALSE)); - case TWOPARAM_ROUTINE_SETCURSORPOS: - RETURN( (DWORD_PTR)UserSetCursorPos((int)Param1, (int)Param2, 0, 0, FALSE)); + case TWOPARAM_ROUTINE_UNHOOKWINDOWSHOOK: + RETURN(IntUnhookWindowsHook((int)Param1, (HOOKPROC)Param2)); + } - case TWOPARAM_ROUTINE_UNHOOKWINDOWSHOOK: - RETURN( IntUnhookWindowsHook((int)Param1, (HOOKPROC)Param2)); - } - ERR("Calling invalid routine number 0x%x in NtUserCallTwoParam(), Param1=0x%x Parm2=0x%x\n", - Routine, Param1, Param2); - EngSetLastError(ERROR_INVALID_PARAMETER); - RETURN( 0); + ERR("Calling invalid routine number 0x%x in NtUserCallTwoParam(), Param1=0x%x Parm2=0x%x\n", + Routine, Param1, Param2); + EngSetLastError(ERROR_INVALID_PARAMETER); + RETURN(0); CLEANUP: - TRACE("Leave NtUserCallTwoParam, ret=%p\n", (PVOID)_ret_); - UserLeave(); - END_CLEANUP; + TRACE("Leave NtUserCallTwoParam, ret=%p\n", (PVOID)_ret_); + UserLeave(); + END_CLEANUP; } @@ -474,100 +489,101 @@ CLEANUP: BOOL APIENTRY NtUserCallHwndLock( - HWND hWnd, - DWORD Routine) + HWND hWnd, + DWORD Routine) { - BOOL Ret = 0; - PWND Window; - USER_REFERENCE_ENTRY Ref; - DECLARE_RETURN(BOOLEAN); - - TRACE("Enter NtUserCallHwndLock\n"); - UserEnterExclusive(); - - if (!(Window = UserGetWindowObject(hWnd))) - { - RETURN( FALSE); - } - UserRefObjectCo(Window, &Ref); - - /* FIXME: Routine can be 0x53 - 0x5E */ - switch (Routine) - { - case HWNDLOCK_ROUTINE_ARRANGEICONICWINDOWS: - co_WinPosArrangeIconicWindows(Window); - break; - - case HWNDLOCK_ROUTINE_DRAWMENUBAR: - { + BOOL Ret = 0; + PWND Window; + USER_REFERENCE_ENTRY Ref; + DECLARE_RETURN(BOOLEAN); + + TRACE("Enter NtUserCallHwndLock\n"); + UserEnterExclusive(); + + if (!(Window = UserGetWindowObject(hWnd))) + { + RETURN(FALSE); + } + + UserRefObjectCo(Window, &Ref); + + /* FIXME: Routine can be 0x53 - 0x5E */ + switch (Routine) + { + case HWNDLOCK_ROUTINE_ARRANGEICONICWINDOWS: + co_WinPosArrangeIconicWindows(Window); + break; + + case HWNDLOCK_ROUTINE_DRAWMENUBAR: + { TRACE("HWNDLOCK_ROUTINE_DRAWMENUBAR\n"); Ret = TRUE; if ((Window->style & (WS_CHILD | WS_POPUP)) != WS_CHILD) - co_WinPosSetWindowPos( Window, + co_WinPosSetWindowPos(Window, HWND_DESKTOP, - 0,0,0,0, - SWP_NOSIZE| - SWP_NOMOVE| - SWP_NOZORDER| - SWP_NOACTIVATE| - SWP_FRAMECHANGED ); + 0, 0, 0, 0, + SWP_NOSIZE | + SWP_NOMOVE | + SWP_NOZORDER | + SWP_NOACTIVATE | + SWP_FRAMECHANGED); + break; + } + + case HWNDLOCK_ROUTINE_REDRAWFRAME: + co_WinPosSetWindowPos(Window, + HWND_DESKTOP, + 0, 0, 0, 0, + SWP_NOSIZE | + SWP_NOMOVE | + SWP_NOZORDER | + SWP_NOACTIVATE | + SWP_FRAMECHANGED); + Ret = TRUE; + break; + + case HWNDLOCK_ROUTINE_REDRAWFRAMEANDHOOK: + co_WinPosSetWindowPos(Window, + HWND_DESKTOP, + 0, 0, 0, 0, + SWP_NOSIZE | + SWP_NOMOVE | + SWP_NOZORDER | + SWP_NOACTIVATE | + SWP_FRAMECHANGED); + if (!Window->spwndOwner && !IntGetParent(Window)) + { + co_IntShellHookNotify(HSHELL_REDRAW, (WPARAM)hWnd, FALSE); // FIXME Flashing? + } + Ret = TRUE; + break; + + case HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOW: + TRACE("co_IntSetForegroundWindow 1 0x%p\n", hWnd); + Ret = co_IntSetForegroundWindow(Window); + TRACE("co_IntSetForegroundWindow 2 0x%p\n", hWnd); + break; + + case HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOWMOUSE: + TRACE("co_IntSetForegroundWindow M 1 0x%p\n", hWnd); + Ret = co_IntSetForegroundWindowMouse(Window); + TRACE("co_IntSetForegroundWindow M 2 0x%p\n", hWnd); + break; + + case HWNDLOCK_ROUTINE_UPDATEWINDOW: + co_IntUpdateWindows(Window, RDW_ALLCHILDREN, FALSE); + Ret = TRUE; break; - } - - case HWNDLOCK_ROUTINE_REDRAWFRAME: - co_WinPosSetWindowPos( Window, - HWND_DESKTOP, - 0,0,0,0, - SWP_NOSIZE| - SWP_NOMOVE| - SWP_NOZORDER| - SWP_NOACTIVATE| - SWP_FRAMECHANGED ); - Ret = TRUE; - break; - - case HWNDLOCK_ROUTINE_REDRAWFRAMEANDHOOK: - co_WinPosSetWindowPos( Window, - HWND_DESKTOP, - 0,0,0,0, - SWP_NOSIZE| - SWP_NOMOVE| - SWP_NOZORDER| - SWP_NOACTIVATE| - SWP_FRAMECHANGED ); - if (!Window->spwndOwner && !IntGetParent(Window)) - { - co_IntShellHookNotify(HSHELL_REDRAW, (WPARAM) hWnd, FALSE); // FIXME Flashing? - } - Ret = TRUE; - break; - - case HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOW: - TRACE("co_IntSetForegroundWindow 1 0x%p\n",hWnd); - Ret = co_IntSetForegroundWindow(Window); - TRACE("co_IntSetForegroundWindow 2 0x%p\n",hWnd); - break; - - case HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOWMOUSE: - TRACE("co_IntSetForegroundWindow M 1 0x%p\n",hWnd); - Ret = co_IntSetForegroundWindowMouse(Window); - TRACE("co_IntSetForegroundWindow M 2 0x%p\n",hWnd); - break; - - case HWNDLOCK_ROUTINE_UPDATEWINDOW: - co_IntUpdateWindows(Window, RDW_ALLCHILDREN, FALSE); - Ret = TRUE; - break; - } - - UserDerefObjectCo(Window); - - RETURN( Ret); + } + + UserDerefObjectCo(Window); + + RETURN(Ret); CLEANUP: - TRACE("Leave NtUserCallHwndLock, ret=%u\n",_ret_); - UserLeave(); - END_CLEANUP; + TRACE("Leave NtUserCallHwndLock, ret=%u\n", _ret_); + UserLeave(); + END_CLEANUP; } /* @@ -576,222 +592,228 @@ CLEANUP: HWND APIENTRY NtUserCallHwndOpt( - HWND hWnd, - DWORD Routine) + HWND hWnd, + DWORD Routine) { - switch (Routine) - { - case HWNDOPT_ROUTINE_SETPROGMANWINDOW: - GetW32ThreadInfo()->pDeskInfo->hProgmanWindow = hWnd; - break; - - case HWNDOPT_ROUTINE_SETTASKMANWINDOW: - GetW32ThreadInfo()->pDeskInfo->hTaskManWindow = hWnd; - break; - } - - return hWnd; + switch (Routine) + { + case HWNDOPT_ROUTINE_SETPROGMANWINDOW: + GetW32ThreadInfo()->pDeskInfo->hProgmanWindow = hWnd; + break; + + case HWNDOPT_ROUTINE_SETTASKMANWINDOW: + GetW32ThreadInfo()->pDeskInfo->hTaskManWindow = hWnd; + break; + } + + return hWnd; } DWORD APIENTRY NtUserCallHwnd( - HWND hWnd, - DWORD Routine) + HWND hWnd, + DWORD Routine) { - switch (Routine) - { - case HWND_ROUTINE_GETWNDCONTEXTHLPID: - { - PWND Window; - DWORD HelpId; + switch (Routine) + { + case HWND_ROUTINE_GETWNDCONTEXTHLPID: + { + PWND Window; + DWORD HelpId; + + UserEnterShared(); + + if (!(Window = UserGetWindowObject(hWnd))) + { + UserLeave(); + return 0; + } - UserEnterShared(); + HelpId = (DWORD)(DWORD_PTR)UserGetProp(Window, gpsi->atomContextHelpIdProp, TRUE); - if (!(Window = UserGetWindowObject(hWnd))) - { UserLeave(); - return 0; - } - - HelpId = (DWORD)(DWORD_PTR)UserGetProp(Window, gpsi->atomContextHelpIdProp, TRUE); - - UserLeave(); - return HelpId; - } - case HWND_ROUTINE_REGISTERSHELLHOOKWINDOW: - if (IntIsWindow(hWnd)) - return IntRegisterShellHookWindow(hWnd); - return FALSE; - break; - case HWND_ROUTINE_DEREGISTERSHELLHOOKWINDOW: - if (IntIsWindow(hWnd)) - return IntDeRegisterShellHookWindow(hWnd); - return FALSE; - case HWND_ROUTINE_SETMSGBOX: - { - PWND Window; - UserEnterExclusive(); - if ((Window = UserGetWindowObject(hWnd))) - { - Window->state |= WNDS_MSGBOX; - } - UserLeave(); - return FALSE; - } - } - STUB; - - return 0; + return HelpId; + } + + case HWND_ROUTINE_REGISTERSHELLHOOKWINDOW: + if (IntIsWindow(hWnd)) + return IntRegisterShellHookWindow(hWnd); + return FALSE; + break; + + case HWND_ROUTINE_DEREGISTERSHELLHOOKWINDOW: + if (IntIsWindow(hWnd)) + return IntDeRegisterShellHookWindow(hWnd); + return FALSE; + + case HWND_ROUTINE_SETMSGBOX: + { + PWND Window; + UserEnterExclusive(); + if ((Window = UserGetWindowObject(hWnd))) + { + Window->state |= WNDS_MSGBOX; + } + UserLeave(); + return FALSE; + } + } + + STUB; + + return 0; } DWORD APIENTRY NtUserCallHwndParam( - HWND hWnd, - DWORD Param, - DWORD Routine) + HWND hWnd, + DWORD Param, + DWORD Routine) { - switch (Routine) - { - case HWNDPARAM_ROUTINE_KILLSYSTEMTIMER: - return IntKillTimer(UserGetWindowObject(hWnd), (UINT_PTR)Param, TRUE); + switch (Routine) + { + case HWNDPARAM_ROUTINE_KILLSYSTEMTIMER: + return IntKillTimer(UserGetWindowObject(hWnd), (UINT_PTR)Param, TRUE); - case HWNDPARAM_ROUTINE_SETWNDCONTEXTHLPID: - { - PWND Window; + case HWNDPARAM_ROUTINE_SETWNDCONTEXTHLPID: + { + PWND Window; - UserEnterExclusive(); - if(!(Window = UserGetWindowObject(hWnd))) - { - UserLeave(); - return FALSE; - } - - if ( Param ) - UserSetProp(Window, gpsi->atomContextHelpIdProp, (HANDLE)Param, TRUE); - else - UserRemoveProp(Window, gpsi->atomContextHelpIdProp, TRUE); + UserEnterExclusive(); + if (!(Window = UserGetWindowObject(hWnd))) + { + UserLeave(); + return FALSE; + } - UserLeave(); - return TRUE; - } + if (Param) + UserSetProp(Window, gpsi->atomContextHelpIdProp, (HANDLE)Param, TRUE); + else + UserRemoveProp(Window, gpsi->atomContextHelpIdProp, TRUE); - case HWNDPARAM_ROUTINE_SETDIALOGPOINTER: - { - PWND pWnd; - USER_REFERENCE_ENTRY Ref; + UserLeave(); + return TRUE; + } - UserEnterExclusive(); + case HWNDPARAM_ROUTINE_SETDIALOGPOINTER: + { + PWND pWnd; + USER_REFERENCE_ENTRY Ref; - if (!(pWnd = UserGetWindowObject(hWnd))) - { - UserLeave(); - return 0; - } - UserRefObjectCo(pWnd, &Ref); + UserEnterExclusive(); - if (pWnd->head.pti->ppi == PsGetCurrentProcessWin32Process() && - pWnd->cbwndExtra == DLGWINDOWEXTRA && - !(pWnd->state & WNDS_SERVERSIDEWINDOWPROC)) - { - if (Param) + if (!(pWnd = UserGetWindowObject(hWnd))) { - if (!pWnd->fnid) pWnd->fnid = FNID_DIALOG; - pWnd->state |= WNDS_DIALOGWINDOW; + UserLeave(); + return 0; } - else + UserRefObjectCo(pWnd, &Ref); + + if (pWnd->head.pti->ppi == PsGetCurrentProcessWin32Process() && + pWnd->cbwndExtra == DLGWINDOWEXTRA && + !(pWnd->state & WNDS_SERVERSIDEWINDOWPROC)) { - pWnd->fnid |= FNID_DESTROY; - pWnd->state &= ~WNDS_DIALOGWINDOW; + if (Param) + { + if (!pWnd->fnid) pWnd->fnid = FNID_DIALOG; + pWnd->state |= WNDS_DIALOGWINDOW; + } + else + { + pWnd->fnid |= FNID_DESTROY; + pWnd->state &= ~WNDS_DIALOGWINDOW; + } } - } - - UserDerefObjectCo(pWnd); - UserLeave(); - return 0; - } - - case HWNDPARAM_ROUTINE_ROS_NOTIFYWINEVENT: - { - PWND pWnd; - PNOTIFYEVENT pne; - UserEnterExclusive(); - pne = (PNOTIFYEVENT)Param; - if (hWnd) + + UserDerefObjectCo(pWnd); + UserLeave(); + return 0; + } + + case HWNDPARAM_ROUTINE_ROS_NOTIFYWINEVENT: + { + PWND pWnd; + PNOTIFYEVENT pne; + UserEnterExclusive(); + pne = (PNOTIFYEVENT)Param; + if (hWnd) + pWnd = UserGetWindowObject(hWnd); + else + pWnd = NULL; + IntNotifyWinEvent(pne->event, pWnd, pne->idObject, pne->idChild, pne->flags); + UserLeave(); + return 0; + } + + case HWNDPARAM_ROUTINE_CLEARWINDOWSTATE: + { + PWND pWnd; + UserEnterExclusive(); + pWnd = UserGetWindowObject(hWnd); + if (pWnd) IntClearWindowState(pWnd, (UINT)Param); + UserLeave(); + return 0; + } + + case HWNDPARAM_ROUTINE_SETWINDOWSTATE: + { + PWND pWnd; + UserEnterExclusive(); pWnd = UserGetWindowObject(hWnd); - else - pWnd = NULL; - IntNotifyWinEvent(pne->event, pWnd, pne->idObject, pne->idChild, pne->flags); - UserLeave(); - return 0; - } - case HWNDPARAM_ROUTINE_CLEARWINDOWSTATE: - { - PWND pWnd; - UserEnterExclusive(); - pWnd = UserGetWindowObject(hWnd); - if (pWnd) IntClearWindowState(pWnd, (UINT)Param); - UserLeave(); - return 0; - } - case HWNDPARAM_ROUTINE_SETWINDOWSTATE: - { - PWND pWnd; - UserEnterExclusive(); - pWnd = UserGetWindowObject(hWnd); - if (pWnd) IntSetWindowState(pWnd, (UINT)Param); - UserLeave(); - return 0; - } - } - - STUB; - - return 0; + if (pWnd) IntSetWindowState(pWnd, (UINT)Param); + UserLeave(); + return 0; + } + } + + STUB; + + return 0; } DWORD APIENTRY NtUserCallHwndParamLock( - HWND hWnd, - DWORD Param, - DWORD Routine) + HWND hWnd, + DWORD Param, + DWORD Routine) { - DWORD Ret = 0; - PWND Window; - USER_REFERENCE_ENTRY Ref; - DECLARE_RETURN(DWORD); - - TRACE("Enter NtUserCallHwndParamLock\n"); - UserEnterExclusive(); - - if (!(Window = UserGetWindowObject(hWnd))) - { - RETURN( FALSE); - } - UserRefObjectCo(Window, &Ref); - - switch (Routine) - { - case TWOPARAM_ROUTINE_VALIDATERGN: - { - PREGION Rgn = REGION_LockRgn((HRGN)Param); - Ret = (DWORD)co_UserRedrawWindow( Window, NULL, Rgn, RDW_VALIDATE); - if (Rgn) REGION_UnlockRgn(Rgn); - break; - } - } - - UserDerefObjectCo(Window); - - RETURN( Ret); + DWORD Ret = 0; + PWND Window; + USER_REFERENCE_ENTRY Ref; + DECLARE_RETURN(DWORD); + + TRACE("Enter NtUserCallHwndParamLock\n"); + UserEnterExclusive(); + + if (!(Window = UserGetWindowObject(hWnd))) + { + RETURN(FALSE); + } + UserRefObjectCo(Window, &Ref); + + switch (Routine) + { + case TWOPARAM_ROUTINE_VALIDATERGN: + { + PREGION Rgn = REGION_LockRgn((HRGN)Param); + Ret = (DWORD)co_UserRedrawWindow(Window, NULL, Rgn, RDW_VALIDATE); + if (Rgn) REGION_UnlockRgn(Rgn); + break; + } + } + + UserDerefObjectCo(Window); + + RETURN(Ret); CLEANUP: - TRACE("Leave NtUserCallHwndParamLock, ret=%lu\n",_ret_); - UserLeave(); - END_CLEANUP; + TRACE("Leave NtUserCallHwndParamLock, ret=%lu\n", _ret_); + UserLeave(); + END_CLEANUP; }
6 years, 10 months
1
0
0
0
03/03: [NTOSKRNL] Implement the support for reserve IRP in IO
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a3c58ca76f21f896df855…
commit a3c58ca76f21f896df8551df8b6175dccb3e4813 Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Sat Feb 24 14:50:23 2018 +0100 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Sat Feb 24 14:52:04 2018 +0100 [NTOSKRNL] Implement the support for reserve IRP in IO The reserve IRP is an IRP which is allocated on system boot and kept during the whole system life. Its purpose is to allow page reads in case of low-memory situations where the system doesn't have enough memory left to allocate an IRP to read from the page file (would be catastrophic situation). --- ntoskrnl/include/internal/io.h | 25 +++++++++++++ ntoskrnl/io/iomgr/iofunc.c | 28 ++++++++++++++- ntoskrnl/io/iomgr/iomgr.c | 7 ++++ ntoskrnl/io/iomgr/irp.c | 79 +++++++++++++++++++++++++++++++++++++++++- 4 files changed, 137 insertions(+), 2 deletions(-) diff --git a/ntoskrnl/include/internal/io.h b/ntoskrnl/include/internal/io.h index 2a4c62f42d..86ddbda17a 100644 --- a/ntoskrnl/include/internal/io.h +++ b/ntoskrnl/include/internal/io.h @@ -513,6 +513,18 @@ typedef struct _DEVICETREE_TRAVERSE_CONTEXT PVOID Context; } DEVICETREE_TRAVERSE_CONTEXT, *PDEVICETREE_TRAVERSE_CONTEXT; +// +// Reserve IRP allocator +// Used for read paging IOs in low-memory situations +// +typedef struct _RESERVE_IRP_ALLOCATOR +{ + PIRP ReserveIrp; + volatile LONG ReserveIrpInUse; + KEVENT WaitEvent; + CCHAR StackSize; +} RESERVE_IRP_ALLOCATOR, *PRESERVE_IRP_ALLOCATOR; + // // Resource code // @@ -920,6 +932,18 @@ IopAllocateIrpMustSucceed( IN CCHAR StackSize ); +BOOLEAN +NTAPI +IopInitializeReserveIrp( + IN PRESERVE_IRP_ALLOCATOR ReserveIrpAllocator +); + +PIRP +NTAPI +IopAllocateReserveIrp( + IN CCHAR StackSize +); + // // Shutdown routines // @@ -1317,6 +1341,7 @@ extern PIO_BUS_TYPE_GUID_LIST PnpBusTypeGuidList; extern PDRIVER_OBJECT IopRootDriverObject; extern KSPIN_LOCK IopDeviceRelationsSpinLock; extern LIST_ENTRY IopDeviceRelationsRequestList; +extern RESERVE_IRP_ALLOCATOR IopReserveIrpAllocator; // // Inlined Functions diff --git a/ntoskrnl/io/iomgr/iofunc.c b/ntoskrnl/io/iomgr/iofunc.c index aa08bf7232..fa4886976d 100644 --- a/ntoskrnl/io/iomgr/iofunc.c +++ b/ntoskrnl/io/iomgr/iofunc.c @@ -17,6 +17,9 @@ #include <debug.h> #include "internal/io_i.h" +volatile LONG IoPageReadIrpAllocationFailure = 0; +volatile LONG IoPageReadNonPagefileIrpAllocationFailure = 0; + /* PRIVATE FUNCTIONS *********************************************************/ VOID @@ -1099,7 +1102,30 @@ IoPageRead(IN PFILE_OBJECT FileObject, /* Allocate IRP */ Irp = IoAllocateIrp(DeviceObject->StackSize, FALSE); - if (!Irp) return STATUS_INSUFFICIENT_RESOURCES; + /* If allocation failed, try to see whether we can use + * the reserve IRP + */ + if (Irp == NULL) + { + /* We will use it only for paging file */ + if (MmIsFileObjectAPagingFile(FileObject)) + { + InterlockedExchangeAdd(&IoPageReadIrpAllocationFailure, 1); + Irp = IopAllocateReserveIrp(DeviceObject->StackSize); + } + else + { + InterlockedExchangeAdd(&IoPageReadNonPagefileIrpAllocationFailure, 1); + } + + /* If allocation failed (not a paging file or too big stack size) + * Fail for real + */ + if (Irp == NULL) + { + return STATUS_INSUFFICIENT_RESOURCES; + } + } /* Get the Stack */ StackPtr = IoGetNextIrpStackLocation(Irp); diff --git a/ntoskrnl/io/iomgr/iomgr.c b/ntoskrnl/io/iomgr/iomgr.c index 0676e97464..47defcab70 100644 --- a/ntoskrnl/io/iomgr/iomgr.c +++ b/ntoskrnl/io/iomgr/iomgr.c @@ -502,6 +502,13 @@ IoInitSystem(IN PLOADER_PARAMETER_BLOCK LoaderBlock) KeInitializeSpinLock(&ShutdownListLock); KeInitializeSpinLock(&IopLogListLock); + /* Initialize the reserve IRP */ + if (!IopInitializeReserveIrp(&IopReserveIrpAllocator)) + { + DPRINT1("IopInitializeReserveIrp failed!\n"); + return FALSE; + } + /* Initialize Timer List Lock */ KeInitializeSpinLock(&IopTimerLock); diff --git a/ntoskrnl/io/iomgr/irp.c b/ntoskrnl/io/iomgr/irp.c index 856aae2c2b..b1de62da03 100644 --- a/ntoskrnl/io/iomgr/irp.c +++ b/ntoskrnl/io/iomgr/irp.c @@ -6,6 +6,7 @@ * PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org) * Gunnar Dalsnes * Filip Navara (navaraf(a)reactos.org) + * Pierre Schweitzer (pierre(a)reactos.org) */ /* INCLUDES ****************************************************************/ @@ -15,6 +16,7 @@ #include <debug.h> PIRP IopDeadIrp; +RESERVE_IRP_ALLOCATOR IopReserveIrpAllocator; /* PRIVATE FUNCTIONS ********************************************************/ @@ -542,6 +544,67 @@ IopCompleteRequest(IN PKAPC Apc, } } +BOOLEAN +NTAPI +IopInitializeReserveIrp(IN PRESERVE_IRP_ALLOCATOR ReserveIrpAllocator) +{ + /* Our allocated stack size */ + ReserveIrpAllocator->StackSize = 20; + + /* Allocate the IRP now */ + ReserveIrpAllocator->ReserveIrp = IoAllocateIrp(ReserveIrpAllocator->StackSize, FALSE); + /* If we cannot, abort system boot */ + if (ReserveIrpAllocator->ReserveIrp == NULL) + { + return FALSE; + } + + /* It's not in use */ + ReserveIrpAllocator->ReserveIrpInUse = 0; + /* And init the event */ + KeInitializeEvent(&ReserveIrpAllocator->WaitEvent, SynchronizationEvent, FALSE); + + /* All good, keep booting */ + return TRUE; +} + +PIRP +NTAPI +IopAllocateReserveIrp(IN CCHAR StackSize) +{ + /* If we need a stack size higher than what was allocated, then fail */ + if (StackSize > IopReserveIrpAllocator.StackSize) + { + return NULL; + } + + /* Now, wait until the IRP becomes available and reserve it immediately */ + while (InterlockedExchange(&IopReserveIrpAllocator.ReserveIrpInUse, 1) == 1) + { + KeWaitForSingleObject(&IopReserveIrpAllocator.WaitEvent, + Executive, + KernelMode, + FALSE, + NULL); + } + + /* It's ours! Initialize it */ + IoInitializeIrp(IopReserveIrpAllocator.ReserveIrp, IoSizeOfIrp(StackSize), StackSize); + + /* And return it to the caller */ + return IopReserveIrpAllocator.ReserveIrp; +} + +VOID +IopFreeReserveIrp(IN CCHAR PriorityBoost) +{ + /* Mark we don't use the IRP anymore */ + InterlockedExchange(&IopReserveIrpAllocator.ReserveIrpInUse, 0); + + /* And set the event if someone is waiting on the IRP */ + KeSetEvent(&IopReserveIrpAllocator.WaitEvent, PriorityBoost, FALSE); +} + /* FUNCTIONS *****************************************************************/ /* @@ -1423,7 +1486,21 @@ IofCompleteRequest(IN PIRP Irp, KeSetEvent(Irp->UserEvent, PriorityBoost, FALSE); /* Free the IRP for a Paging I/O Only, Close is handled by us */ - if (Flags) IoFreeIrp(Irp); + if (Flags) + { + /* If we were using the reserve IRP, then call the appropriate + * free function (to make the IRP available again) + */ + if (Irp == IopReserveIrpAllocator.ReserveIrp) + { + IopFreeReserveIrp(PriorityBoost); + } + /* Otherwise, free for real! */ + else + { + IoFreeIrp(Irp); + } + } } else {
6 years, 10 months
1
0
0
0
02/03: [NTOSKRNL] Add the CcDataFlushes and CcDataPages counters
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9ac2e9855af67e4442aaf…
commit 9ac2e9855af67e4442aaf198654f701dbb377591 Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Sat Feb 24 14:02:33 2018 +0100 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Sat Feb 24 14:52:04 2018 +0100 [NTOSKRNL] Add the CcDataFlushes and CcDataPages counters --- ntoskrnl/cc/copy.c | 7 +++++++ ntoskrnl/ex/sysinfo.c | 4 ++-- ntoskrnl/include/internal/cc.h | 2 ++ ntoskrnl/io/iomgr/iofunc.c | 8 ++++++++ 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/ntoskrnl/cc/copy.c b/ntoskrnl/cc/copy.c index 496cef6d4d..8525d9f549 100644 --- a/ntoskrnl/cc/copy.c +++ b/ntoskrnl/cc/copy.c @@ -43,6 +43,13 @@ ULONG CcFastReadWait; ULONG CcFastReadNoWait; ULONG CcFastReadResourceMiss; +/* Counters: + * - Amount of pages flushed to the disk + * - Number of flush operations + */ +ULONG CcDataPages = 0; +ULONG CcDataFlushes = 0; + /* FUNCTIONS *****************************************************************/ VOID diff --git a/ntoskrnl/ex/sysinfo.c b/ntoskrnl/ex/sysinfo.c index 4db50e5b0b..ceb1d22842 100644 --- a/ntoskrnl/ex/sysinfo.c +++ b/ntoskrnl/ex/sysinfo.c @@ -709,8 +709,8 @@ QSI_DEF(SystemPerformanceInformation) Spi->CcReadAheadIos = 0; /* FIXME */ Spi->CcLazyWriteIos = CcLazyWriteIos; Spi->CcLazyWritePages = CcLazyWritePages; - Spi->CcDataFlushes = 0; /* FIXME */ - Spi->CcDataPages = 0; /* FIXME */ + Spi->CcDataFlushes = CcDataFlushes; + Spi->CcDataPages = CcDataPages; Spi->ContextSwitches = 0; /* FIXME */ Spi->FirstLevelTbFills = 0; /* FIXME */ Spi->SecondLevelTbFills = 0; /* FIXME */ diff --git a/ntoskrnl/include/internal/cc.h b/ntoskrnl/include/internal/cc.h index 32caa551b2..e91f1b4993 100644 --- a/ntoskrnl/include/internal/cc.h +++ b/ntoskrnl/include/internal/cc.h @@ -62,6 +62,8 @@ extern ULONG CcMapDataWait; extern ULONG CcMapDataNoWait; extern ULONG CcPinReadWait; extern ULONG CcPinReadNoWait; +extern ULONG CcDataPages; +extern ULONG CcDataFlushes; typedef struct _PF_SCENARIO_ID { diff --git a/ntoskrnl/io/iomgr/iofunc.c b/ntoskrnl/io/iomgr/iofunc.c index 19f54e070d..aa08bf7232 100644 --- a/ntoskrnl/io/iomgr/iofunc.c +++ b/ntoskrnl/io/iomgr/iofunc.c @@ -1039,6 +1039,14 @@ IoSynchronousPageWrite(IN PFILE_OBJECT FileObject, IOTRACE(IO_API_DEBUG, "FileObject: %p. Mdl: %p. Offset: %p \n", FileObject, Mdl, Offset); + /* Is the write originating from Cc? */ + if (FileObject->SectionObjectPointer != NULL && + FileObject->SectionObjectPointer->SharedCacheMap != NULL) + { + ++CcDataFlushes; + CcDataPages += BYTES_TO_PAGES(MmGetMdlByteCount(Mdl)); + } + /* Get the Device Object */ DeviceObject = IoGetRelatedDeviceObject(FileObject);
6 years, 10 months
1
0
0
0
01/03: [NTOSKRNL] Add the CcPinReadWait and CcPinReadNoWait counters
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0fbdf317092603d594baf…
commit 0fbdf317092603d594bafacfd6da71fffe2bd219 Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Sat Feb 24 13:47:15 2018 +0100 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Sat Feb 24 14:52:04 2018 +0100 [NTOSKRNL] Add the CcPinReadWait and CcPinReadNoWait counters --- ntoskrnl/cc/pin.c | 13 +++++++++++++ ntoskrnl/ex/sysinfo.c | 4 ++-- ntoskrnl/include/internal/cc.h | 2 ++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ntoskrnl/cc/pin.c b/ntoskrnl/cc/pin.c index 07afd1847f..20b409662f 100644 --- a/ntoskrnl/cc/pin.c +++ b/ntoskrnl/cc/pin.c @@ -21,9 +21,13 @@ extern NPAGED_LOOKASIDE_LIST iBcbLookasideList; /* Counters: * - Number of calls to CcMapData that could wait * - Number of calls to CcMapData that couldn't wait + * - Number of calls to CcPinRead that could wait + * - Number of calls to CcPinRead that couldn't wait */ ULONG CcMapDataWait = 0; ULONG CcMapDataNoWait = 0; +ULONG CcPinReadWait = 0; +ULONG CcPinReadNoWait = 0; /* FUNCTIONS *****************************************************************/ @@ -192,6 +196,15 @@ CcPinRead ( CCTRACE(CC_API_DEBUG, "FileOffset=%p FileOffset=%p Length=%lu Flags=0x%lx\n", FileObject, FileOffset, Length, Flags); + if (Flags & PIN_WAIT) + { + ++CcPinReadWait; + } + else + { + ++CcPinReadNoWait; + } + if (CcMapData(FileObject, FileOffset, Length, Flags, Bcb, Buffer)) { if (CcPinMappedData(FileObject, FileOffset, Length, Flags, Bcb)) diff --git a/ntoskrnl/ex/sysinfo.c b/ntoskrnl/ex/sysinfo.c index 59c6d263c2..4db50e5b0b 100644 --- a/ntoskrnl/ex/sysinfo.c +++ b/ntoskrnl/ex/sysinfo.c @@ -693,8 +693,8 @@ QSI_DEF(SystemPerformanceInformation) Spi->CcMapDataWaitMiss = 0; /* FIXME */ Spi->CcPinMappedDataCount = 0; /* FIXME */ - Spi->CcPinReadNoWait = 0; /* FIXME */ - Spi->CcPinReadWait = 0; /* FIXME */ + Spi->CcPinReadNoWait = CcPinReadNoWait; + Spi->CcPinReadWait = CcPinReadWait; Spi->CcPinReadNoWaitMiss = 0; /* FIXME */ Spi->CcPinReadWaitMiss = 0; /* FIXME */ Spi->CcCopyReadNoWait = 0; /* FIXME */ diff --git a/ntoskrnl/include/internal/cc.h b/ntoskrnl/include/internal/cc.h index c404cd9179..32caa551b2 100644 --- a/ntoskrnl/include/internal/cc.h +++ b/ntoskrnl/include/internal/cc.h @@ -60,6 +60,8 @@ extern ULONG CcLazyWritePages; extern ULONG CcLazyWriteIos; extern ULONG CcMapDataWait; extern ULONG CcMapDataNoWait; +extern ULONG CcPinReadWait; +extern ULONG CcPinReadNoWait; typedef struct _PF_SCENARIO_ID {
6 years, 10 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
24
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
Results per page:
10
25
50
100
200