https://git.reactos.org/?p=reactos.git;a=commitdiff;h=59dcec1fafcb27ad18b24…
commit 59dcec1fafcb27ad18b246d34531e3373c8c1012
Author: Thamatip Chitpong <weedgamer131(a)gmail.com>
AuthorDate: Mon Apr 11 23:28:28 2022 +0700
Commit: GitHub <noreply(a)github.com>
CommitDate: Mon Apr 11 19:28:28 2022 +0300
[TASKMGR] Processes page: Add "Properties" and "Open File
Location" context menu items (#4323)
Signed-off-by: Thamatip Chitpong <tangaming123456(a)outlook.com>
Reviewed-by: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
Reviewed-by: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
Reviewed-by: Joachim Henze <joachim.henze(a)reactos.org>
Reviewed-by: Mark Jansen <mark.jansen(a)reactos.org>
---
base/applications/taskmgr/lang/bg-BG.rc | 3 +
base/applications/taskmgr/lang/cs-CZ.rc | 3 +
base/applications/taskmgr/lang/da-DK.rc | 3 +
base/applications/taskmgr/lang/de-DE.rc | 3 +
base/applications/taskmgr/lang/el-GR.rc | 3 +
base/applications/taskmgr/lang/en-US.rc | 3 +
base/applications/taskmgr/lang/es-ES.rc | 3 +
base/applications/taskmgr/lang/et-EE.rc | 3 +
base/applications/taskmgr/lang/fr-FR.rc | 3 +
base/applications/taskmgr/lang/he-IL.rc | 3 +
base/applications/taskmgr/lang/hu-HU.rc | 3 +
base/applications/taskmgr/lang/id-ID.rc | 3 +
base/applications/taskmgr/lang/it-IT.rc | 3 +
base/applications/taskmgr/lang/ja-JP.rc | 3 +
base/applications/taskmgr/lang/ko-KR.rc | 3 +
base/applications/taskmgr/lang/nl-NL.rc | 3 +
base/applications/taskmgr/lang/no-NO.rc | 3 +
base/applications/taskmgr/lang/pl-PL.rc | 3 +
base/applications/taskmgr/lang/pt-BR.rc | 3 +
base/applications/taskmgr/lang/pt-PT.rc | 3 +
base/applications/taskmgr/lang/ro-RO.rc | 3 +
base/applications/taskmgr/lang/ru-RU.rc | 3 +
base/applications/taskmgr/lang/sk-SK.rc | 3 +
base/applications/taskmgr/lang/sq-AL.rc | 3 +
base/applications/taskmgr/lang/sv-SE.rc | 3 +
base/applications/taskmgr/lang/tr-TR.rc | 3 +
base/applications/taskmgr/lang/uk-UA.rc | 3 +
base/applications/taskmgr/lang/zh-CN.rc | 3 +
base/applications/taskmgr/lang/zh-HK.rc | 3 +
base/applications/taskmgr/lang/zh-TW.rc | 3 +
base/applications/taskmgr/procpage.c | 285 ++++++++++++++++++++++++++++++++
base/applications/taskmgr/procpage.h | 2 +
base/applications/taskmgr/resource.h | 2 +
base/applications/taskmgr/taskmgr.c | 6 +
34 files changed, 385 insertions(+)
diff --git a/base/applications/taskmgr/lang/bg-BG.rc
b/base/applications/taskmgr/lang/bg-BG.rc
index aae724a2114..9fda1404e35 100644
--- a/base/applications/taskmgr/lang/bg-BG.rc
+++ b/base/applications/taskmgr/lang/bg-BG.rc
@@ -135,6 +135,9 @@ BEGIN
MENUITEM "&Ниско", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "Установяване на с&родство...",
ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/lang/cs-CZ.rc
b/base/applications/taskmgr/lang/cs-CZ.rc
index 38a7817ee1e..31f352519d8 100644
--- a/base/applications/taskmgr/lang/cs-CZ.rc
+++ b/base/applications/taskmgr/lang/cs-CZ.rc
@@ -135,6 +135,9 @@ BEGIN
MENUITEM "Ní&zká", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "Nastavit &afinitu...", ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/lang/da-DK.rc
b/base/applications/taskmgr/lang/da-DK.rc
index 47bab6303eb..3f4738d3c12 100644
--- a/base/applications/taskmgr/lang/da-DK.rc
+++ b/base/applications/taskmgr/lang/da-DK.rc
@@ -135,6 +135,9 @@ BEGIN
MENUITEM "&Lav", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "Sæt &Affinitet...", ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/lang/de-DE.rc
b/base/applications/taskmgr/lang/de-DE.rc
index d226c017031..00fbd51bf18 100644
--- a/base/applications/taskmgr/lang/de-DE.rc
+++ b/base/applications/taskmgr/lang/de-DE.rc
@@ -137,6 +137,9 @@ BEGIN
MENUITEM "N&iedrig", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "&Zugehörigkeit festlegen...",
ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Eigenschaften", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "Übergeordneten Ordner ö&ffnen",
ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/lang/el-GR.rc
b/base/applications/taskmgr/lang/el-GR.rc
index 4a40eadc75f..2144c926d86 100644
--- a/base/applications/taskmgr/lang/el-GR.rc
+++ b/base/applications/taskmgr/lang/el-GR.rc
@@ -137,6 +137,9 @@ BEGIN
MENUITEM "&Low", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "Set &Affinity...", ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/lang/en-US.rc
b/base/applications/taskmgr/lang/en-US.rc
index 83239935a66..869c1a46453 100644
--- a/base/applications/taskmgr/lang/en-US.rc
+++ b/base/applications/taskmgr/lang/en-US.rc
@@ -135,6 +135,9 @@ BEGIN
MENUITEM "&Low", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "Set &Affinity...", ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/lang/es-ES.rc
b/base/applications/taskmgr/lang/es-ES.rc
index 20a8225ebac..b60493e3516 100644
--- a/base/applications/taskmgr/lang/es-ES.rc
+++ b/base/applications/taskmgr/lang/es-ES.rc
@@ -137,6 +137,9 @@ BEGIN
MENUITEM "&Baja", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "Establecer &afinidad...", ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/lang/et-EE.rc
b/base/applications/taskmgr/lang/et-EE.rc
index 4f35b67be91..c3579b81222 100644
--- a/base/applications/taskmgr/lang/et-EE.rc
+++ b/base/applications/taskmgr/lang/et-EE.rc
@@ -142,6 +142,9 @@ BEGIN
MENUITEM "&Madal", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "Määra &ühtivus...", ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/lang/fr-FR.rc
b/base/applications/taskmgr/lang/fr-FR.rc
index fb738d84cd4..1963ca42aab 100644
--- a/base/applications/taskmgr/lang/fr-FR.rc
+++ b/base/applications/taskmgr/lang/fr-FR.rc
@@ -137,6 +137,9 @@ BEGIN
MENUITEM "&Basse", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "Définir l'&affinité...", ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/lang/he-IL.rc
b/base/applications/taskmgr/lang/he-IL.rc
index 7d1f2ec00fa..de908030407 100644
--- a/base/applications/taskmgr/lang/he-IL.rc
+++ b/base/applications/taskmgr/lang/he-IL.rc
@@ -137,6 +137,9 @@ BEGIN
MENUITEM "&נמוכה", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "הגדרת &קירבה", ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/lang/hu-HU.rc
b/base/applications/taskmgr/lang/hu-HU.rc
index 998691c1ac3..ecebcf4da12 100644
--- a/base/applications/taskmgr/lang/hu-HU.rc
+++ b/base/applications/taskmgr/lang/hu-HU.rc
@@ -137,6 +137,9 @@ BEGIN
MENUITEM "A&lacsony", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "&Processzorok használata...",
ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/lang/id-ID.rc
b/base/applications/taskmgr/lang/id-ID.rc
index a5df46cc455..6bf41b18b5b 100644
--- a/base/applications/taskmgr/lang/id-ID.rc
+++ b/base/applications/taskmgr/lang/id-ID.rc
@@ -137,6 +137,9 @@ BEGIN
MENUITEM "&Rendah", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "Setel &Afinitas...", ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/lang/it-IT.rc
b/base/applications/taskmgr/lang/it-IT.rc
index 982d29fa643..2c1dccf04c7 100644
--- a/base/applications/taskmgr/lang/it-IT.rc
+++ b/base/applications/taskmgr/lang/it-IT.rc
@@ -135,6 +135,9 @@ BEGIN
MENUITEM "&Bassa", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "Definisci &Affinità...", ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/lang/ja-JP.rc
b/base/applications/taskmgr/lang/ja-JP.rc
index 4976fc37e83..e11322e632d 100644
--- a/base/applications/taskmgr/lang/ja-JP.rc
+++ b/base/applications/taskmgr/lang/ja-JP.rc
@@ -135,6 +135,9 @@ BEGIN
MENUITEM "低(&L)", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "関係の設定(&A)...", ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/lang/ko-KR.rc
b/base/applications/taskmgr/lang/ko-KR.rc
index 1398e58f38f..8186cfea508 100644
--- a/base/applications/taskmgr/lang/ko-KR.rc
+++ b/base/applications/taskmgr/lang/ko-KR.rc
@@ -137,6 +137,9 @@ BEGIN
MENUITEM "낮음(&L)", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "선호도 설정(&A)", ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/lang/nl-NL.rc
b/base/applications/taskmgr/lang/nl-NL.rc
index 1c57984f1c6..cbca523ec00 100644
--- a/base/applications/taskmgr/lang/nl-NL.rc
+++ b/base/applications/taskmgr/lang/nl-NL.rc
@@ -135,6 +135,9 @@ BEGIN
MENUITEM "&Laag", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "&Affiniteit instellen...", ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/lang/no-NO.rc
b/base/applications/taskmgr/lang/no-NO.rc
index bb177f22cec..2b5eacbeff4 100644
--- a/base/applications/taskmgr/lang/no-NO.rc
+++ b/base/applications/taskmgr/lang/no-NO.rc
@@ -135,6 +135,9 @@ BEGIN
MENUITEM "&Lav", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "Sett &tiltrekning ...", ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/lang/pl-PL.rc
b/base/applications/taskmgr/lang/pl-PL.rc
index f9cae39cc95..a39b0aa01a0 100644
--- a/base/applications/taskmgr/lang/pl-PL.rc
+++ b/base/applications/taskmgr/lang/pl-PL.rc
@@ -143,6 +143,9 @@ BEGIN
MENUITEM "N&iski", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "Ustaw &koligację...", ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/lang/pt-BR.rc
b/base/applications/taskmgr/lang/pt-BR.rc
index 86419328a99..a6585c587c3 100644
--- a/base/applications/taskmgr/lang/pt-BR.rc
+++ b/base/applications/taskmgr/lang/pt-BR.rc
@@ -135,6 +135,9 @@ BEGIN
MENUITEM "&Baixa", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "Definir &afinidade...", ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/lang/pt-PT.rc
b/base/applications/taskmgr/lang/pt-PT.rc
index 251214bd5aa..6e009f07280 100644
--- a/base/applications/taskmgr/lang/pt-PT.rc
+++ b/base/applications/taskmgr/lang/pt-PT.rc
@@ -137,6 +137,9 @@ BEGIN
MENUITEM "&Baixa", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "Definir &afinidade...", ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/lang/ro-RO.rc
b/base/applications/taskmgr/lang/ro-RO.rc
index c1431a57ea8..987cd264e45 100644
--- a/base/applications/taskmgr/lang/ro-RO.rc
+++ b/base/applications/taskmgr/lang/ro-RO.rc
@@ -141,6 +141,9 @@ BEGIN
MENUITEM "Prioritate &minimă", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "A&finitate…", ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/lang/ru-RU.rc
b/base/applications/taskmgr/lang/ru-RU.rc
index a357c524d34..7450c46138f 100644
--- a/base/applications/taskmgr/lang/ru-RU.rc
+++ b/base/applications/taskmgr/lang/ru-RU.rc
@@ -137,6 +137,9 @@ BEGIN
MENUITEM "&Низкий", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "Задать &соответствие...", ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/lang/sk-SK.rc
b/base/applications/taskmgr/lang/sk-SK.rc
index 9f5b5c524fd..8598132e3cb 100644
--- a/base/applications/taskmgr/lang/sk-SK.rc
+++ b/base/applications/taskmgr/lang/sk-SK.rc
@@ -137,6 +137,9 @@ BEGIN
MENUITEM "Níz&ka", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "Nastaviť &afinitu...", ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/lang/sq-AL.rc
b/base/applications/taskmgr/lang/sq-AL.rc
index 6d1fbb53eeb..2edbc0d78aa 100644
--- a/base/applications/taskmgr/lang/sq-AL.rc
+++ b/base/applications/taskmgr/lang/sq-AL.rc
@@ -139,6 +139,9 @@ BEGIN
MENUITEM "Poshte", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "Vendos prirje...", ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/lang/sv-SE.rc
b/base/applications/taskmgr/lang/sv-SE.rc
index 4f16a45e804..99989a398d8 100644
--- a/base/applications/taskmgr/lang/sv-SE.rc
+++ b/base/applications/taskmgr/lang/sv-SE.rc
@@ -137,6 +137,9 @@ BEGIN
MENUITEM "&Låg", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "Välj &källa (FIXME)...", ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/lang/tr-TR.rc
b/base/applications/taskmgr/lang/tr-TR.rc
index 094f42b76f2..2874175e5a6 100644
--- a/base/applications/taskmgr/lang/tr-TR.rc
+++ b/base/applications/taskmgr/lang/tr-TR.rc
@@ -137,6 +137,9 @@ BEGIN
MENUITEM "&Düşük", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "İ&lişkiyi Ayarla...", ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/lang/uk-UA.rc
b/base/applications/taskmgr/lang/uk-UA.rc
index 6fb16a776d9..e92c321baf7 100644
--- a/base/applications/taskmgr/lang/uk-UA.rc
+++ b/base/applications/taskmgr/lang/uk-UA.rc
@@ -135,6 +135,9 @@ BEGIN
MENUITEM "&Низький", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "У&становити відповідність...",
ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/lang/zh-CN.rc
b/base/applications/taskmgr/lang/zh-CN.rc
index e07daf6b781..cfb5e61f04c 100644
--- a/base/applications/taskmgr/lang/zh-CN.rc
+++ b/base/applications/taskmgr/lang/zh-CN.rc
@@ -142,6 +142,9 @@ BEGIN
MENUITEM "低(&L)", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "关系设置(&A)...", ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/lang/zh-HK.rc
b/base/applications/taskmgr/lang/zh-HK.rc
index e8d587a6f36..11ce3bdb867 100644
--- a/base/applications/taskmgr/lang/zh-HK.rc
+++ b/base/applications/taskmgr/lang/zh-HK.rc
@@ -143,6 +143,9 @@ BEGIN
MENUITEM "低(&L)", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "親和性設定(&A)...", ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/lang/zh-TW.rc
b/base/applications/taskmgr/lang/zh-TW.rc
index f5e7e0ea3b7..40ab78b3465 100644
--- a/base/applications/taskmgr/lang/zh-TW.rc
+++ b/base/applications/taskmgr/lang/zh-TW.rc
@@ -143,6 +143,9 @@ BEGIN
MENUITEM "低(&L)", ID_PROCESS_PAGE_SETPRIORITY_LOW
END
MENUITEM "親和性設定(&A)...", ID_PROCESS_PAGE_SETAFFINITY
+ MENUITEM SEPARATOR
+ MENUITEM "&Properties", ID_PROCESS_PAGE_PROPERTIES
+ MENUITEM "&Open File Location", ID_PROCESS_PAGE_OPENFILELOCATION
END
END
diff --git a/base/applications/taskmgr/procpage.c b/base/applications/taskmgr/procpage.c
index 692c1bd66e5..caa344860a6 100644
--- a/base/applications/taskmgr/procpage.c
+++ b/base/applications/taskmgr/procpage.c
@@ -5,6 +5,7 @@
*
* Copyright (C) 1999 - 2001 Brian Palmer <brianp(a)reactos.org>
* Copyright (C) 2009 Maxime Vernier <maxime.vernier(a)gmail.com>
+ * Copyright (C) 2022 Thamatip Chitpong <tangaming123456(a)outlook.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -25,6 +26,10 @@
#include "proclist.h"
+#include <strsafe.h>
+
+#include <ndk/psfuncs.h>
+
#define CMP(x1, x2)\
(x1 < x2 ? -1 : (x1 > x2 ? 1 : 0))
@@ -931,3 +936,283 @@ int CALLBACK ProcessPageCompareFunc(LPARAM lParam1, LPARAM lParam2,
LPARAM lPara
}
return ret;
}
+
+static BOOL DevicePathToDosPath(LPWSTR lpPath, DWORD dwSize)
+{
+ WCHAR cDrive;
+
+ /* Check if lpPath is a device path */
+ if (_wcsnicmp(lpPath, L"\\Device\\", 8) != 0)
+ {
+ return FALSE;
+ }
+
+ for (cDrive = L'A'; cDrive <= L'Z'; cDrive++)
+ {
+ WCHAR szDrive[3];
+ WCHAR szDevPath[MAX_PATH];
+
+ szDrive[0] = cDrive;
+ szDrive[1] = L':';
+ szDrive[2] = UNICODE_NULL;
+
+ if (QueryDosDeviceW(szDrive, szDevPath, _countof(szDevPath)) != 0)
+ {
+ size_t len = wcslen(szDevPath);
+
+ if (_wcsnicmp(lpPath, szDevPath, len) == 0)
+ {
+ StringCbPrintfW(lpPath, dwSize, L"%s%s", szDrive, lpPath +
len);
+
+ return TRUE;
+ }
+ }
+ }
+
+ return FALSE;
+}
+
+static DWORD GetProcessExecutablePath(HANDLE hProcess, LPWSTR lpExePath, DWORD dwLength)
+{
+ BYTE StaticBuffer[sizeof(UNICODE_STRING) + (MAX_PATH * sizeof(WCHAR))];
+ PVOID DynamicBuffer = NULL;
+ PUNICODE_STRING ImagePath = NULL;
+ LPWSTR pszExePath = NULL;
+ ULONG SizeNeeded;
+ NTSTATUS Status;
+ DWORD dwRet = 0;
+
+ Status = NtQueryInformationProcess(hProcess,
+ ProcessImageFileName,
+ StaticBuffer,
+ sizeof(StaticBuffer) - sizeof(WCHAR),
+ &SizeNeeded);
+
+ if (Status == STATUS_INFO_LENGTH_MISMATCH)
+ {
+ DynamicBuffer = HeapAlloc(GetProcessHeap(), 0, SizeNeeded + sizeof(WCHAR));
+
+ if (!DynamicBuffer)
+ {
+ return 0;
+ }
+
+ Status = NtQueryInformationProcess(hProcess,
+ ProcessImageFileName,
+ DynamicBuffer,
+ SizeNeeded,
+ &SizeNeeded);
+
+ ImagePath = (PUNICODE_STRING)DynamicBuffer;
+ }
+ else
+ {
+ ImagePath = (PUNICODE_STRING)StaticBuffer;
+ }
+
+ if (!NT_SUCCESS(Status))
+ {
+ goto Cleanup;
+ }
+
+ pszExePath = HeapAlloc(GetProcessHeap(), 0, ImagePath->Length + sizeof(WCHAR));
+
+ if (!pszExePath)
+ {
+ goto Cleanup;
+ }
+
+ StringCbCopyNW(pszExePath, ImagePath->Length + sizeof(WCHAR),
ImagePath->Buffer, ImagePath->Length);
+
+ if (!DevicePathToDosPath(pszExePath, ImagePath->Length + sizeof(WCHAR)))
+ {
+ goto Cleanup;
+ }
+
+ dwRet = wcslen(pszExePath) + 1;
+
+ if (dwLength >= dwRet)
+ {
+ StringCchCopyW(lpExePath, dwLength, pszExePath);
+
+ dwRet -= 1;
+ }
+
+Cleanup:
+
+ if (pszExePath)
+ {
+ HeapFree(GetProcessHeap(), 0, pszExePath);
+ }
+
+ if (DynamicBuffer)
+ {
+ HeapFree(GetProcessHeap(), 0, DynamicBuffer);
+ }
+
+ return dwRet;
+}
+
+static DWORD GetProcessExecutablePathById(DWORD dwProcessId, LPWSTR lpExePath, DWORD
dwLength)
+{
+ DWORD dwRet = 0;
+
+ if (dwProcessId == 0)
+ {
+ return 0;
+ }
+
+ /* PID = 4 or "System" */
+ if (dwProcessId == 4)
+ {
+ static const WCHAR szKernelExe[] = L"\\ntoskrnl.exe";
+ WCHAR szSystemDir[MAX_PATH];
+ UINT uLength;
+
+ uLength = GetSystemDirectoryW(szSystemDir, _countof(szSystemDir));
+
+ if (uLength != 0)
+ {
+ dwRet = uLength + _countof(szKernelExe);
+
+ if (dwLength >= dwRet)
+ {
+ StringCchPrintfW(lpExePath, dwLength, L"%s%s", szSystemDir,
szKernelExe);
+
+ dwRet -= 1;
+ }
+ }
+ }
+ else
+ {
+ HANDLE hProcess;
+
+ hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, dwProcessId);
+
+ if (hProcess)
+ {
+ dwRet = GetProcessExecutablePath(hProcess, lpExePath, dwLength);
+
+ CloseHandle(hProcess);
+ }
+ }
+
+ return dwRet;
+}
+
+void ProcessPage_OnProperties(void)
+{
+ DWORD dwProcessId;
+ WCHAR szPath[MAX_PATH];
+ LPWSTR pszPath = NULL;
+ LPWSTR pszExePath = NULL;
+ DWORD dwLength;
+ SHELLEXECUTEINFOW info = { 0 };
+
+ dwProcessId = GetSelectedProcessId();
+ dwLength = GetProcessExecutablePathById(dwProcessId, szPath, _countof(szPath));
+
+ if (dwLength == 0)
+ {
+ return;
+ }
+ else if (dwLength > _countof(szPath))
+ {
+ pszPath = HeapAlloc(GetProcessHeap(), 0, dwLength * sizeof(WCHAR));
+
+ if (!pszPath)
+ {
+ return;
+ }
+
+ if (GetProcessExecutablePathById(dwProcessId, pszPath, dwLength) == 0)
+ {
+ goto Cleanup;
+ }
+
+ pszExePath = pszPath;
+ }
+ else
+ {
+ pszExePath = szPath;
+ }
+
+ info.cbSize = sizeof(SHELLEXECUTEINFOW);
+ info.fMask = SEE_MASK_INVOKEIDLIST;
+ info.hwnd = NULL;
+ info.lpVerb = L"properties";
+ info.lpFile = pszExePath;
+ info.lpParameters = L"";
+ info.lpDirectory = NULL;
+ info.nShow = SW_SHOW;
+ info.hInstApp = NULL;
+
+ ShellExecuteExW(&info);
+
+Cleanup:
+
+ if (pszPath)
+ {
+ HeapFree(GetProcessHeap(), 0, pszPath);
+ }
+}
+
+void ProcessPage_OnOpenFileLocation(void)
+{
+ DWORD dwProcessId;
+ WCHAR szPath[MAX_PATH];
+ LPWSTR pszPath = NULL;
+ LPWSTR pszExePath = NULL;
+ LPWSTR pszCmdLine = NULL;
+ DWORD dwLength;
+
+ dwProcessId = GetSelectedProcessId();
+ dwLength = GetProcessExecutablePathById(dwProcessId, szPath, _countof(szPath));
+
+ if (dwLength == 0)
+ {
+ return;
+ }
+ else if (dwLength > _countof(szPath))
+ {
+ pszPath = HeapAlloc(GetProcessHeap(), 0, dwLength * sizeof(WCHAR));
+
+ if (!pszPath)
+ {
+ return;
+ }
+
+ if (GetProcessExecutablePathById(dwProcessId, pszPath, dwLength) == 0)
+ {
+ goto Cleanup;
+ }
+
+ pszExePath = pszPath;
+ }
+ else
+ {
+ pszExePath = szPath;
+ dwLength += 1;
+ }
+
+ pszCmdLine = HeapAlloc(GetProcessHeap(), 0, (dwLength + 10) * sizeof(WCHAR));
+
+ if (!pszCmdLine)
+ {
+ goto Cleanup;
+ }
+
+ StringCchPrintfW(pszCmdLine, dwLength + 10, L"/select,\"%s\"",
pszExePath);
+
+ /* Open file explorer and select the exe file */
+ ShellExecuteW(NULL, L"open", L"explorer.exe", pszCmdLine, NULL,
SW_SHOWNORMAL);
+
+ HeapFree(GetProcessHeap(), 0, pszCmdLine);
+
+Cleanup:
+
+ if (pszPath)
+ {
+ HeapFree(GetProcessHeap(), 0, pszPath);
+ }
+}
diff --git a/base/applications/taskmgr/procpage.h b/base/applications/taskmgr/procpage.h
index ff244a9ab6a..2a22951bce8 100644
--- a/base/applications/taskmgr/procpage.h
+++ b/base/applications/taskmgr/procpage.h
@@ -31,3 +31,5 @@ extern HWND hProcessPageShowAllProcessesButton; /* Process Show All
Processes c
INT_PTR CALLBACK ProcessPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
lParam);
void RefreshProcessPage(void);
DWORD GetSelectedProcessId(void);
+void ProcessPage_OnProperties(void);
+void ProcessPage_OnOpenFileLocation(void);
diff --git a/base/applications/taskmgr/resource.h b/base/applications/taskmgr/resource.h
index b7b7e7e9d31..c5b9e84ebcf 100644
--- a/base/applications/taskmgr/resource.h
+++ b/base/applications/taskmgr/resource.h
@@ -179,6 +179,8 @@
#define ID_PROCESS_PAGE_SETPRIORITY_NORMAL 32812
#define ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL 32813
#define ID_PROCESS_PAGE_SETPRIORITY_LOW 32814
+#define ID_PROCESS_PAGE_PROPERTIES 32825
+#define ID_PROCESS_PAGE_OPENFILELOCATION 32826
#define ID_SHUTDOWN_STANDBY 32816
#define ID_SHUTDOWN_HIBERNATE 32817
diff --git a/base/applications/taskmgr/taskmgr.c b/base/applications/taskmgr/taskmgr.c
index 12cec3bcb52..1c754858efa 100644
--- a/base/applications/taskmgr/taskmgr.c
+++ b/base/applications/taskmgr/taskmgr.c
@@ -324,6 +324,12 @@ TaskManagerWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
lParam)
case ID_PROCESS_PAGE_SETPRIORITY_LOW:
DoSetPriority(IDLE_PRIORITY_CLASS);
break;
+ case ID_PROCESS_PAGE_PROPERTIES:
+ ProcessPage_OnProperties();
+ break;
+ case ID_PROCESS_PAGE_OPENFILELOCATION:
+ ProcessPage_OnOpenFileLocation();
+ break;
/* ShutDown items */
case ID_SHUTDOWN_STANDBY: