This changeset overhauls several UI infrastructure paths: it adds richer column drag/drop visuals, expands the search box with fuzzy matching and match-range APIs, and refactors theme handling (including Explorer-style palette support, buffered/non-client paint cleanup, and new theme file utilities). It also hardens core behavior with many reliability fixes, such as bounded HTTP download buffering, safer process/service enumeration and handle ownership updates, improved window/context lifecycle handling, DPI/layout fixes, and broader consistency updates across dialog/list-view drawing and helper APIs.
Improve PEView's file open path by requesting write-attributes when available, falling back to read-only access, and disabling timestamp updates on the opened file. The update also aligns TreeNew row heights and icon sizing with the list-based pages, preloads sidebar icons, simplifies CLR table population, and cleans up a few shared declarations and helper calls.
This change moves main-window setup to WM_CREATE to avoid invalid initial layouts, improves dialog focus and window-placement restoration, and includes a wide set of Win32/UI correctness fixes across the app. It also adds thread-stack and Wow64 safety handling, improves token details (authority/RID and elevated-privilege highlighting), and broadens the low-level documentation comments. The update also adjusts a few build settings in CustomBuildTool to improve runtime behavior.
Use the dialog DC clip box when drawing the choose-new-page footer and background, and skip painting when there is no visible region. This avoids overpainting outside the invalidated area and makes the custom themed drawing behave correctly.
The provider thread state and run-id reads now use acquire semantics, while state writes use release semantics to prevent stale reads during start/stop/boost transitions. The defer-delete path also relies on the interlocked list push's ordering instead of an extra explicit barrier. This keeps the synchronization correct and avoids redundant memory-ordering operations.
Add SAL lock-state assumptions to queued lock acquire, try-acquire, and release fast paths in `queuedlock.h`. This teaches static analysis that the inline interlocked operations really acquire, hold, and release the lock, reducing false positives without changing runtime behavior.
Add a relocation-based skip index and span calculation to avoid per-byte callback checks when using `PhpImgCoherencySkip`, then compare eligible ranges with AVX-512/AVX2/SSE (falling back to scalar). The inspect loop now preserves existing skip and fault semantics by retrying faulting vector blocks byte-by-byte, and the new relocation index storage is initialized and freed with the coherency context.
This change updates phlib with broader native API compatibility shims, new CRC32/CRC32C tables, and safer utility helpers. It also fixes a number of synchronization, formatting, environment, and process-creation edge cases, adds correlation-vector support, hardens SID conversion and image-resource loading, and cleans up several Windows compatibility fixes across the library.
Switch the settings hashtable to store `PPH_SETTING` entries instead of inline `PH_SETTING` values so cached setting pointers remain valid when the table grows. Updated hash/equality, lookup, and enumeration paths to dereference pointer entries consistently via a small helper.
`PhAddSetting` now heap-allocates each setting for process-lifetime storage and cleans up on duplicate insertion failure to avoid leaks.
Store the performance-counter span between provider runs and expose helpers to read it in raw ticks or milliseconds. This lets callers calculate rates from the real elapsed time instead of the nominal interval, which improves accuracy when providers are boosted, delayed, or paused.
The refreshed Windows Hardware Lab Kit (HLK) available starting February 2026 for Windows 11, version 25H2, Windows Server 2025, and Windows 11, version 24H2 will introduce a new check during HLK packaging.
Improve thread wait analysis in `anawait.c` by recognizing Win32k CoreMessaging completion drains and I/O completion port waits. This adds clearer messages for `NtUserDrainThreadCoreMessagingCompletions*` and `NtRemoveIoCompletion*` in both passive wait analysis and stack-based analysis.
Refactor the service-only progress dialog into a generic action progress dialog that can format names and rerun actions through phsvc for different item types. Use it for process terminate, suspend, and resume tree operations when the process progress dialog setting is enabled, including recursive descendant collection and self-action safeguards.
Improve phlib utility correctness and API contracts across GUI, memory, math, and SIMD support. This updates `PhSendMessageTimeout` to return `NTSTATUS`, fixes pointer subtraction and tick/time macros, adds null guards around image list helpers, and corrects a debug rectangle comparison.
The change also expands public helper coverage with heap, image-directory, 128-bit math, delta-clamping, and SIMD utility declarations, while adding SAL/NTAPI annotations so callers get clearer success/failure and nullability guarantees.
Clean up the `ENSURE_BUFFER`, `OK_BUFFER`, and `ADVANCE_BUFFER` helper macros in `phlib/format.c` after using `format_i.h`. This prevents macro leakage and avoids accidental redefinition or reuse outside the intended formatting code paths.
Extend the extended list-view custom draw path with a subitem draw callback. The control now stores a `PPH_EXTLV_DRAW_SUBITEM` handler, opts into `CDRF_NOTIFYSUBITEMDRAW` when present, and skips default rendering when the callback handles a subitem. A new `ELVM_SETSUBITEMDRAWFUNCTION` message wires the callback into the control.
Reworked `phlib/directdraw.cpp` to use DIB-based rendering paths and remove unnecessary screen-DC dependencies in bitmap/icon and snapshot code. Window selection logic now skips cloaked windows, improves snapshot hit-testing by enumerating visible top-level/child windows, and tightens window class registration/creation handling (including proper instance/cbSize setup and atom checks). This also adds a new layered popup shadow system (`PhCreate/Update/DestroyWindowShadow` and affinity support) that draws DPI-scaled rounded soft shadows for popup menus on modern Windows where system drop shadows are no longer reliably applied.
Introduce `PhAllocateHeap` and `PhReAllocateExSafe` in `phlib/basesup.c` to provide heap allocation paths with explicit `NTSTATUS` handling and zero-initialization support. The debug-heap path now also honors `HEAP_ZERO_MEMORY`, keeping allocation behavior consistent between debug and normal builds.
Extend phnative with new native APIs for security descriptor and processor statistics handling. This adds self-relative SD conversion helpers and introduces per-processor information queries plus utility/performance delta/statistics calculations (including multi-group support and Windows-version-aware distribution parsing).
Move CLR metadata schema and P/Invoke flag definitions into the public header, add helpers for resolving table names, strings, blobs, GUIDs, tokens, attributes, assembly metadata, and P/Invoke maps, and introduce standalone Portable PDB parsing and source lookup support.
Switch service buffer allocations in `phlib/svcsup.c` to `PhAllocateSafe`/`PhAllocateZeroSafe` with explicit `STATUS_NO_MEMORY` handling to avoid exception-based failures. Add `PhGetServiceGroupOrderIndex` to resolve a service’s load-order group index from `HKLM\...\ServiceGroupOrder\List` with proper REG_MULTI_SZ validation. Also update `PhWaitForServiceStatus` to use `PhQueryWaitTime`, compute a fixed deadline, and compare wait hints in consistent timeout units.