Skip to content

Commit 0f3d0bf

Browse files
committed
Add highlighting for partially suspended processes
1 parent c020bb8 commit 0f3d0bf

File tree

5 files changed

+22
-2
lines changed

5 files changed

+22
-2
lines changed

ProcessHacker/include/phsettings.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ EXT ULONG PhCsUseColorPacked;
5757
EXT ULONG PhCsColorPacked;
5858
EXT ULONG PhCsUseColorLowImageCoherency;
5959
EXT ULONG PhCsColorLowImageCoherency;
60+
EXT ULONG PhCsUseColorPartiallySuspended;
61+
EXT ULONG PhCsColorPartiallySuspended;
6062
EXT ULONG PhCsUseColorGuiThreads;
6163
EXT ULONG PhCsColorGuiThreads;
6264
EXT ULONG PhCsUseColorRelocatedModules;

ProcessHacker/options.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3038,6 +3038,7 @@ static COLOR_ITEM ColorItems[] =
30383038
COLOR_ITEM(L"ColorPicoProcesses", L"Pico processes", L"Processes that belong to the Windows subsystem for Linux."),
30393039
COLOR_ITEM(L"ColorImmersiveProcesses", L"Immersive processes and DLLs", L"Processes and DLLs that belong to a Modern UI app."),
30403040
COLOR_ITEM(L"ColorSuspended", L"Suspended processes and threads", L"Processes and threads that are suspended from execution."),
3041+
COLOR_ITEM(L"ColorPartiallySuspended", L"Partially suspended processes and threads", L"Processes and threads that are partially suspended from execution."),
30413042
COLOR_ITEM(L"ColorDotNet", L".NET processes and DLLs", L".NET (i.e. managed) processes and DLLs."),
30423043
COLOR_ITEM(L"ColorPacked", L"Packed processes", L"Executables are sometimes \"packed\" to reduce their size."),
30433044
COLOR_ITEM(L"ColorLowImageCoherency", L"Low process image coherency", L"The image file backing the process has low coherency when compared to the mapped image."),

ProcessHacker/procprv.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2471,7 +2471,18 @@ VOID PhProcessProviderUpdate(
24712471
modified = TRUE;
24722472
}
24732473

2474-
processItem->IsPartiallySuspended = isPartiallySuspended;
2474+
if (PhCsUseColorPartiallySuspended) // HACK // Don't invalidate for partially suspended unless enabled (dmex)
2475+
{
2476+
if (processItem->IsPartiallySuspended != isPartiallySuspended)
2477+
{
2478+
processItem->IsPartiallySuspended = isPartiallySuspended;
2479+
modified = TRUE;
2480+
}
2481+
}
2482+
else
2483+
{
2484+
processItem->IsPartiallySuspended = isPartiallySuspended;
2485+
}
24752486

24762487
// .NET
24772488
if (processItem->UpdateIsDotNet)

ProcessHacker/proctree.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3344,6 +3344,8 @@ BOOLEAN NTAPI PhpProcessTreeNewCallback(
33443344
getNodeColor->BackColor = PhCsColorDebuggedProcesses;
33453345
else if (PhCsUseColorSuspended && processItem->IsSuspended)
33463346
getNodeColor->BackColor = PhCsColorSuspended;
3347+
else if (PhCsUseColorPartiallySuspended && processItem->ProcessId != SYSTEM_PROCESS_ID && processItem->IsPartiallySuspended)
3348+
getNodeColor->BackColor = PhCsColorPartiallySuspended;
33473349
else if (PhCsUseColorProtectedProcess && processItem->Protection.Level != 0 && processItem->Protection.Level != UCHAR_MAX)
33483350
getNodeColor->BackColor = PhCsColorProtectedProcess;
33493351
else if (PhCsUseColorHandleFiltered && processItem->IsProtectedHandle)

ProcessHacker/settings.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,9 @@ VOID PhAddDefaultSettings(
252252
PhpAddIntegerSetting(L"UseColorPacked", L"1");
253253
PhpAddIntegerSetting(L"ColorPacked", L"9314ff"); // Deep Pink
254254
PhpAddIntegerSetting(L"UseColorLowImageCoherency", L"1");
255-
PhpAddIntegerSetting(L"ColorLowImageCoherency", L"ff14b9"); // Deep Purple
255+
PhpAddIntegerSetting(L"ColorLowImageCoherency", L"ff14b9"); // Deep Purple
256+
PhpAddIntegerSetting(L"UseColorPartiallySuspended", L"0");
257+
PhpAddIntegerSetting(L"ColorPartiallySuspended", L"c0c0c0");
256258
PhpAddIntegerSetting(L"UseColorGuiThreads", L"1");
257259
PhpAddIntegerSetting(L"ColorGuiThreads", L"77ffff");
258260
PhpAddIntegerSetting(L"UseColorRelocatedModules", L"1");
@@ -333,6 +335,8 @@ VOID PhUpdateCachedSettings(
333335
PH_UPDATE_SETTING(ColorPacked);
334336
PH_UPDATE_SETTING(UseColorLowImageCoherency);
335337
PH_UPDATE_SETTING(ColorLowImageCoherency);
338+
PH_UPDATE_SETTING(UseColorPartiallySuspended);
339+
PH_UPDATE_SETTING(ColorPartiallySuspended);
336340
PH_UPDATE_SETTING(UseColorGuiThreads);
337341
PH_UPDATE_SETTING(ColorGuiThreads);
338342
PH_UPDATE_SETTING(UseColorRelocatedModules);

0 commit comments

Comments
 (0)