Files
dmex 05bd251440 Theme, service grouping, and misc UI fixes
- Themed status bar/header: hot-part tracking with partial invalidation, owner-draw/icon/RTL support, sizegrip drawn last, header images/alignment, buffered header paint, DPI change handling, and capture-change hover reset.
- Fill erase background in dialog/static hooks and sysinfo container to avoid flicker; add menu popup border frame.
- Explorer theme mode follows the Windows dark preference.
- Service list: add 'Group services by' (type, load order group, svchost group, start type) with synthetic group nodes.
- Session properties: query nltest account info on a background thread and decode its security descriptor with a read-only permissions viewer.
- Add PhIsLaunchedByTaskScheduler and PhGetWindowsBuildString.
- phlib buffered paint uses UxTheme unless PHLIB_PAINT_BUFFER is defined.
- Add I/O total bytes process column; set initial focus on several process property pages.
- Plugins: only walk WOW64 stacks for WOW64 processes, add WindowExplorer pause/resume, remove disk cache events page, refresh frame on netoptions border changes, and fix Updater SymCrypt hash size init.
2026-10-14 05:53:44 +11:00

190 lines
3.9 KiB
C

/*
* Copyright (c) 2022 Winsider Seminars & Solutions, Inc. All rights reserved.
*
* This file is part of System Informer.
*
* Authors:
*
* wj32 2008-2016
* dmex 2017-2026
*
*/
#ifndef PH_PROCPRP_H
#define PH_PROCPRP_H
#define PH_PROPSHEET_NEW 1
typedef struct _PH_PROCESS_WAITPROPCONTEXT
{
SLIST_ENTRY ListEntry;
HWND PropSheetWindowHandle;
HANDLE ProcessWaitHandle;
HANDLE ProcessHandle;
PPH_PROCESS_ITEM ProcessItem;
} PH_PROCESS_WAITPROPCONTEXT, *PPH_PROCESS_WAITPROPCONTEXT;
#define PH_PROCESS_PROPCONTEXT_MAXPAGES 32
typedef struct _PH_PROCESS_PROPCONTEXT
{
PPH_PROCESS_ITEM ProcessItem;
PPH_STRING Title;
#ifdef PH_PROPSHEET_NEW
HWND ParentWindowHandle;
#else
PROPSHEETHEADER PropSheetHeader;
HPROPSHEETPAGE* PropSheetPages;
#endif
HANDLE SelectThreadId;
PPH_PROCESS_WAITPROPCONTEXT ProcessWaitContext;
BOOLEAN WaitInitialized;
#ifdef PH_PROPSHEET_NEW
// Parallel page arrays for the PhPropSheetNew host. PropSheetNewPages is
// a PH_PROPSHEETNEW_PAGE[PH_PROCESS_PROPCONTEXT_MAXPAGES], typed as PVOID
// here so graphprp.h doesn't have to be pulled into this header.
// PropSheetNewPageContexts holds the matching PPH_PROCESS_PROPPAGECONTEXT
// refs so they can be released when the context is freed.
PVOID PropSheetNewPages;
PVOID PropSheetNewPageContexts;
PVOID PropSheetNewPageTitles; // PPH_STRING[MAXPAGES], owns Name strings
ULONG PropSheetNewPageCount;
#endif
} PH_PROCESS_PROPCONTEXT, *PPH_PROCESS_PROPCONTEXT;
// begin_phapppub
PHAPPAPI
PPH_PROCESS_PROPCONTEXT
NTAPI
PhCreateProcessPropContext(
_In_opt_ HWND ParentWindowHandle,
_In_ PPH_PROCESS_ITEM ProcessItem
);
// end_phapppub
VOID PhRefreshProcessPropContext(
_Inout_ PPH_PROCESS_PROPCONTEXT PropContext
);
// begin_phapppub
PHAPPAPI
VOID
NTAPI
PhSetSelectThreadIdProcessPropContext(
_Inout_ PPH_PROCESS_PROPCONTEXT PropContext,
_In_ HANDLE ThreadId
);
PHAPPAPI
BOOLEAN
NTAPI
PhAddProcessPropPage(
_Inout_ PPH_PROCESS_PROPCONTEXT PropContext,
_In_ _Assume_refs_(1) PPH_PROCESS_PROPPAGECONTEXT PropPageContext
);
PHAPPAPI
BOOLEAN
NTAPI
PhAddProcessPropPage2(
_Inout_ PPH_PROCESS_PROPCONTEXT PropContext,
_In_ HPROPSHEETPAGE PropSheetPageHandle
);
PHAPPAPI
PPH_PROCESS_PROPPAGECONTEXT
NTAPI
PhCreateProcessPropPageContext(
_In_ LPCWSTR Template,
_In_ DLGPROC DlgProc,
_In_opt_ PVOID Context
);
PHAPPAPI
PPH_PROCESS_PROPPAGECONTEXT
NTAPI
PhCreateProcessPropPageContextEx(
_In_opt_ PVOID InstanceHandle,
_In_ LPCWSTR Template,
_In_ DLGPROC DlgProc,
_In_opt_ PVOID Context
);
_Success_(return)
PHAPPAPI
BOOLEAN
NTAPI
PhPropPageDlgProcHeader(
_In_ HWND hwndDlg,
_In_ UINT uMsg,
_In_ LPARAM lParam,
_Out_opt_ LPPROPSHEETPAGE *PropSheetPage,
_Out_opt_ PPH_PROCESS_PROPPAGECONTEXT *PropPageContext,
_Out_opt_ PPH_PROCESS_ITEM *ProcessItem
);
#define PH_PROP_PAGE_TAB_CONTROL_PARENT ((PPH_LAYOUT_ITEM)0x1)
PHAPPAPI
PPH_LAYOUT_ITEM
NTAPI
PhAddPropPageLayoutItem(
_In_ HWND WindowHandle,
_In_ HWND Handle,
_In_ PPH_LAYOUT_ITEM ParentItem,
_In_ ULONG Anchor
);
PHAPPAPI
VOID
NTAPI
PhDoPropPageLayout(
_In_ HWND WindowHandle
);
FORCEINLINE
PPH_LAYOUT_ITEM
PhBeginPropPageLayout(
_In_ HWND hwndDlg,
_In_ PPH_PROCESS_PROPPAGECONTEXT PropPageContext
)
{
if (!PropPageContext->LayoutInitialized)
{
return PhAddPropPageLayoutItem(
hwndDlg,
hwndDlg,
PH_PROP_PAGE_TAB_CONTROL_PARENT,
PH_ANCHOR_ALL | PH_LAYOUT_FORCE_INVALIDATE
);
}
else
{
return NULL;
}
}
FORCEINLINE
VOID
PhEndPropPageLayout(
_In_ HWND hwndDlg,
_In_ PPH_PROCESS_PROPPAGECONTEXT PropPageContext
)
{
PhDoPropPageLayout(hwndDlg);
PropPageContext->LayoutInitialized = TRUE;
}
PHAPPAPI
VOID
NTAPI
PhShowProcessProperties(
_In_ PPH_PROCESS_PROPCONTEXT Context
);
// end_phapppub
#endif