Commit Graph

16869 Commits

Author SHA1 Message Date
copilot-swe-agent[bot] 3209a4ce6d Improve CodeQL scan coverage and analysis reliability
Co-authored-by: dmex <1306177+dmex@users.noreply.github.com>
2026-10-02 10:15:08 +00:00
dmex e7fffcc8ee Improve UI theming and search control behavior
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.
2026-10-02 13:27:30 +10:00
dmex 66f0dda526 Refresh project files and build config 2026-10-02 12:20:22 +10:00
dmex bd808cf810 Refine PEView file loading and UI
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.
2026-10-02 07:43:07 +10:00
dmex 26dfa9c978 Update prpsh.c 2026-10-02 07:38:38 +10:00
dmex 2695f4f8bc Update richprp.c 2026-10-02 07:37:47 +10:00
dmex 56d75f7d9c Update strings.c 2026-10-02 07:32:14 +10:00
dmex 025db3a0ec Fix UI init and token diagnostics
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.
2026-10-01 23:49:16 +10:00
dmex a2af60d47c Clip choose-page dialog painting
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.
2026-10-01 23:30:16 +10:00
dmex 1add68f167 Use atomic ordering for provider state
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.
2026-10-01 16:16:29 +10:00
dmex af94e934ec Update nativetoken.c 2026-10-01 16:07:33 +10:00
dmex b34e422327 Update native.c 2026-10-01 16:07:06 +10:00
dmex 85d525e8e5 Annotate queued lock fast paths
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.
2026-10-01 16:06:39 +10:00
dmex 6e2679c0d2 Vectorize image coherency comparisons
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.
2026-10-01 16:04:58 +10:00
Johnny Shaw d3a4b1b663 kph restore symbol cab archiving 2026-09-30 18:35:24 -06:00
Johnny Shaw f2e5c1b02b kph update dyndata 2026-09-30 11:46:14 -06:00
dmex f69721ace3 Improve PEView CLR previews and fuzzy hashes 2026-09-30 02:17:32 +10:00
dmex 01121d96fa Update nativeprocess.c 2026-09-30 01:48:33 +10:00
dmex 66e276b763 Improve phlib API compatibility and utilities
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.
2026-09-30 00:45:00 +10:00
dmex 9fcc24e52d Add SBOM, VEX, and build tooling updates 2026-09-29 21:02:02 +10:00
Johnny Shaw e1d55ba12e kph maintain informer client count 2026-09-28 15:28:29 -06:00
Johnny Shaw 3377da397d kph rework driver unload protection 2026-09-28 15:10:58 -06:00
Johnny Shaw a5332b70a6 kph ringbuff lost wakeup fix 2026-09-28 14:18:50 -06:00
dmex 86302b792e Update .gitignore 2026-09-28 21:44:38 +10:00
dmex 818a2fa099 Update .gitattributes 2026-09-28 21:44:34 +10:00
dmex ef5ddba8c9 Update guisup.h 2026-09-28 16:47:43 +10:00
Johnny Shaw 1487bbf6ea kph update dyndata 2026-09-25 22:19:26 -06:00
Johnny Shaw b6dea2fa44 kph seh guard fo name extract 2026-09-25 22:08:57 -06:00
dmex f62275da85 Update Plugins.props 2026-09-26 05:23:02 +10:00
dmex 932b1da291 Update phnt.vcxitems.filters 2026-09-26 05:17:05 +10:00
dmex 511abd7e1d Update winsta.h 2026-09-26 05:16:45 +10:00
dmex fc1e11aaa8 Update ntpnpapi.h 2026-09-26 05:15:44 +10:00
dmex f523e54c76 Update ntpfapi.h 2026-09-26 05:14:46 +10:00
dmex 396bcb3efe Fix util dialog lifetimes and shell checks 2026-09-26 05:13:09 +10:00
dmex 4febf2c894 Store settings as stable pointers in hashtable
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.
2026-09-26 05:09:50 +10:00
dmex c5b13687d9 Track actual provider run elapsed time
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.
2026-09-26 05:08:14 +10:00
dmex 8bc969aa9f Unify DOS/NTSTATUS mapping in error.c 2026-09-26 05:04:34 +10:00
dmex c622a18432 Exclude PDBs from HLK 2026 packaging
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.
2026-09-26 05:04:01 +10:00
dmex b456812a9d Handle more wait analysis syscalls
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.
2026-09-25 15:44:19 +10:00
dmex 6118164962 Add process action progress dialogs
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.
2026-09-25 15:43:32 +10:00
dmex 6fdcdc7bf5 Improve phlib helpers and annotations
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.
2026-09-25 15:31:30 +10:00
dmex 3122b90d91 Undefine format buffer helper macros
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.
2026-09-25 15:19:25 +10:00
dmex 162da2d30a Add custom subitem drawing to ExtLV
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.
2026-09-25 15:19:05 +10:00
dmex 76b9cad56d Improve window selection targeting and add popup shadows
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.
2026-09-25 15:00:02 +10:00
dmex 62b7b77a65 Add safe zeroed heap allocation helpers
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.
2026-09-25 10:14:51 +10:00
dmex 580cf4d471 Avoid alloc when parsing app data attribute 2026-09-25 10:13:50 +10:00
dmex 7eb7a165fe Add SD helpers and Processor Utility statistics
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).
2026-09-25 09:53:48 +10:00
dmex 5e42fb5062 Expand CLR metadata mapping APIs
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.
2026-09-25 05:38:43 +10:00
dmex a168bb2275 Update sync.c 2026-09-25 05:34:48 +10:00
dmex 5113d3ce73 Avoid exceptions from service helpers and add group index
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.
2026-09-25 05:34:19 +10:00