Commit Graph

46 Commits

Author SHA1 Message Date
dmex 26dfa9c978 Update prpsh.c 2026-10-02 07:38:38 +10:00
dmex 15ec45a121 Update copyright year 2026-07-01 01:43:30 +10:00
dmex 6a11529cc1 Refactor DPI/scalable settings and add MI support 2026-05-05 20:32:46 +10:00
dmex 9467d5f646 Improve DPI handling, icon scaling, metrics (#2894) 2026-05-02 09:13:06 +10:00
dmex a6443d07c0 Remove global PhSystemDpi, PhSmallIconSize, PhLargeIconSize
Eliminate the main-window-DPI globals that bleed across dialogs on
secondary monitors. Window-aware code now passes its own DPI:

- Delete PhSystemDpi, PhSmallIconSize, PhLargeIconSize and
  PhGuiSupportUpdateSystemMetrics; remove the mainwnd.c invocation
  on WM_DPICHANGED.
- PhGetApplicationIcon and PhGetStockApplicationIcon now require a
  WindowDpi parameter; PhGetApplicationIconEx is folded into
  PhGetApplicationIcon. PhGetStockApplicationIcon keeps the shared
  icon contract via a 4-slot DPI-keyed cache so multiple monitors
  coexist without thrash.
- All ~50 callers updated to source DPI from their owning window
  (PhGetWindowDpi for hwnd-bearing call sites; PhGetTaskbarDpi for
  the tray icon; PhGetSystemDpi for window-class registration and
  parentless task dialogs).
- PhSetApplicationWindowIcon now thin-wraps PhSetApplicationWindowIconEx
  with PhGetWindowDpi(hwnd), so the 63 legacy call sites get
  per-window-DPI icons without per-site edits.
- srvprv.c and mainwnd.c read PhProcessImageListWindowDpi instead
  of PhSystemDpi/PhSmallIconSize.X for service and process icons.
2026-04-26 22:49:05 +10:00
dmex 7ff04762e2 Fix bounds, safety checks, and sort types
- Add SysInfoMinimumGraphHeight and SysInfoScrollEnabled settings.
- Remove redundant TreeNew_NodesStructured calls to avoid extra re-structuring.
- Fix off-by-one checks on hybridProcessorTypeList (use >=).
- Add null/empty checks before indexing directory lists in CLR metadata handling.
- Use PhShowStatusHR and correct failure logic when CLR table enumeration fails.
- Replace mutable PVOID sortFunctions arrays with CONST _CoreCrtSecureSearchSortCompareFunction and use the correct function pointer type for sortFunction in several peview tree callbacks.
- Replace SetWindowLongPtr reset with PhSetWindowProcedure for prop sheet cleanup.
- Change dwCountElems type to ULONG in pdb printing.
2026-04-11 00:57:41 +10:00
dmex 5423ff7cfb Merge dev branch fixes (#2680) 2025-09-07 05:06:34 +10:00
dmex bc210f1711 Fix window sizes, positions and DPI scaling 2025-03-08 08:10:22 +11:00
dmex ced3ee6c75 Update prpsh.c 2025-03-07 19:55:34 +11:00
dmex e62698e864 Update prpsh.c 2024-12-25 23:06:13 +11:00
dmex f8757ab345 Update to the latest SDK 2024-12-01 16:17:11 +11:00
Dart Vanya 504d941e18 Object Manager Plus (#2197)
* Implement properties support for Object Manager

- Standard System Informer handle properties window for Windows objects (including Directories).
- Add support for missing object types: Device, EventPair, Timer, Semaphore, FilterConnectionPort
- Add target link info for Symbolic links
- Fix Directory handles leaking

* Enhanced Object Manager

- Add Windows Object tab to properties window: object attributes and creation time.
- Add GeneralCallbackHandlePropertiesWindowPreOpen, calls on WM_INITDIALOG and allows plugins to customize general handle properties tab.
-- Display real handles count and hide irrelevant access entry (EtHandlePropertiesWindowPreOpen).
- Add Symbolic Link Target column
- Enhanced navigation to symlink: focus to target in ListView.

* Fix bug

* Center properties window to ObjMgr window

* Defied WinObj: search, statusbar, refresh

- Implements search using standard SI searchbox: searches all 3 columns (name, type, symlink)
- Status bar (pseudo) with fullpath to selected object (can copy on righclick menu), current directory object count
- Refresh button - full rebuild of tree and current dir list
- Get object address using KSI (previous commit)

* Fix memory leaks and violations + other improvements

- I finally understand how PH memory management works and fixed (hope) horrible previous code.
- Fixed WM_KEYDOWN forwarding (both for PH and plugins), broken by 5bf7f29
- F5 - refresh, filter will be reapplied after refresh
- Autosizing of Name column on window resizing. Plugin properties window position will not overwrite generic handle propertines window position setting.

* Fix directory security bug

* Fix directory security bug

* Speedup search

* Show File info for Device and FilterConnectionPort

* Fix pool table auto refresh

Broken by 0c0c938

* Minor refresh fixes

* Add target resolving for Device and ALPC port

- Renamed Symbolic Link Target column to Target
- Implemented (experimental) asynchronous resolver for Device and ALPC port targets.
-- Resolving Device driver target. Added menu Go to device driver
-- Resolving ALPC server process target. Added menu Go to server process
- Rewritten navigaton to symbolic links (and device drivers)

* Add target resolving for Mutant, fix search

- Improve resolver. Added mutant client owner to target and menu Go to thread...
- Improve filter: it now stay when changing directory. If selected entry match it stay selected and visible when performing search.
- Tri-state column sort now saved and loaded from settings (ObjectManagerWindowListSort). Sort now works correctly on directory or filter change.
- Enter - open properties, Shift+Enter - open security, Shift+Dblclk on symlink opens its properties.

* Create resolver thread by NtCreateThreadEx

* Support for open symlink target in explorer

* Show Job process list in target column

* Fix TriState sort, add "Reset sort" context menu

* Add CpuPartition type support and icons for more types

- Add icon for Job, Semaphore, FilterConnectionPort, CpuPartition

* Fix open of Device object in root directory

* Add MemoryPartition icon

* New Object Handles page in properties

- Old Windows Object page entries moved to general page in "Basic information" block. Windows Object replaced with Handles page.
- Menu - Go to process... supported
- Now opens real ALPC port object using new method (thx to https://github.com/zodiacon/ObjectExplorer)
- Show additional handles for ALPC Port, File, Key (match by object name). Extra entries will be highlight with ColorInheritHandles)

* [SI] Advanced options - add menu Reset

- Fix dark theme for new choose dialog

* Add PhOpenDevice. ObjMgr Plus FINAL

- My first attempt in kernel programming. Add PhOpenDevice -> KphOpenDevice. Open Device object handle and optional Device Driver handle.
- Propertines - Device driver info: show topmost and lowest drivers in stack
- Directory list: allow multiselect, Ctrl+A, Ctrl+C support. Menu Copy Full Name (for list and tree).
- [Theme] ListVew: fix text readability for hot and selected colored items.
TreeNew:  significantly improve visibility of selected item.

* Fix build

* Fixed Ctrl+K to search box in PE VIew

* Open more object types when driver is disabled

* Support for multiple non-modal object properties windows

- Change PhShowHandlePropertiesModal -> PhShowHandlePropertiesPlugin. Add GeneralCallbackHandlePropertiesUninitializing
- Save and load properties window position to/from ObjectManagerPropertiesWindowPosition setting
- Resolving of Driver Image into Target column. Show Driver Image in properties.

* Add KphOpenObjectByTypeIndex

- [Experimental]. Can open any object types like Callback, Type, etc.
- New icons for Callback, KeyedEvent, Type, Semaphore

* Handles page: add menu - properties, menu - close

- Replace PID column with Attributes. Highlight entries with color corresponding to attribute
- Save last selected directory to ObjectManagerLastPath
- Set properties window icon to listview
 object type icon. Add timer icon

* Show extended Type information in properties (works also without KSI)

* Fixed closing modeless property sheet from taskbar

- Add WindowStation icon, additional type info in Target
- Add WindowStation visibility info in properties (ET general, for all handle dialogs).

* Update SDK

* [ET] Add Desktops page to WindowStation properties

- [ET] Show Desktop information in general properties page
- General prop sheet - hide OK button, rename Cancel -> Close. Suppress closing dialog by Enter press

* Improve object handles enumeration without KSI

- Added found handles counts: Total, By address, By name/By type
- Show all handles of same type as Type object on its Handles page

* General improve of resolver speed via worker queue

- Resolve PDO name for Device if driver name cannot be resolved.

* Fix theme for plugins' pages trees

* Fix bug

* Show Original name in Object prop -> Handles -> Prop window

* WindowStation - Desktops page - add menu - Security

* Bring back OK button in service properties

- Show Device target in format: [driver_upper] [->] [driver_low]
- New menu: Go to upper driver, Go to lower driver

* Bring back OK button in service properties

- Show Device target in format: [driver_upper] [->] [driver_lower]
- New menu: Go to upper driver, Go to lower driver

* Theme fixes and enhancements

- Advanced options menu Reset added

* Full DarkMode support for TaskDialog

Credits to https://github.com/SFTRS/DarkTaskDialog
- Highlighting and Graph colors: menu - Reset added
- Fix drawing of disabled ListView in dark theme
- SysLink theme support (call PhInitializeSysLinkTheme to apply to control)

* Minor fixes

- Removed ListView subclass
- Add options: EnableThemeAnimation (default 1), EnableThemeNativeButtons (default 0)

* Security page CHECKLIST_ACLUI checks theme support

* Transit from PhShow(Error|Warning|Information) to PhShow(Error|Warning|Information)2

* Public PhThemeWindowDrawButton: tristate checkbox, radio, multiline

- Fix the annoying white border what remained from the previous active control in CHECKLIST_ACLUI
- ExtendedServices: MessageBox to TaskDialog transit

* Better ListView theme (OpenNcThemeData hook)

* New SysLink coloring method via IAT hook

- Remove PhInitializeSysLinkTheme

* Small fixes

* Requested changes

* Requested changes

* Fix SysLink theme support on Windows 10

- TaskDialog theme on Windows 10 currently unsupported...

* Transition to PhQuerySymbolicLinkObject

- Fix SymbolicLink target in handle properties

* Transit to new driver APIs

- Object Handles tab: added support for changing handle attributes
- ET plugin extensions now available for Driver, Device, Type (globally for any handle properties windows)

* rebase filter APIs

* new KphQueryInformationObject KphObjectAttributesInformation

- Extract information from more kernel objects using new method (ex. \PowerPort, \Win32kCrossSessionGlobals)
- Retrieve extra object attributes from OBJECT_HEADER.Flags via driver
- Show additional Driver info: Service Name, Size, Start Address, Flags

---------

Co-authored-by: dmex <dmex04@gmail.com>
Co-authored-by: Johnny Shaw <johnny.shaw@live.com>
2024-11-14 19:41:31 -07:00
dmex de6d1c9c11 Update to latest SDK 2024-09-09 07:33:45 +10:00
dmex 8bfe86b43d Add ImageListSetIconSize (partially fixes #1751) 2023-06-10 10:36:22 +10:00
dmex 9b0b69cc39 peview: Fix dark theme support 2023-02-27 16:57:44 +11:00
dmex ec15269546 Fix imagelist flags and some DPI issues 2022-09-24 02:43:25 +10:00
dmex 6aa33bacb0 Actually fix regression querying non-client metrics after DPI changes 2022-09-20 18:38:39 +10:00
dmex 61a12d186f Fix regression querying non-client metrics 2022-09-20 18:08:30 +10:00
henrypp 5744c9cba4 Per Monitor V2 DPI aware support (thanks to henrypp!) (#1347) 2022-09-16 00:08:12 +10:00
Johnny Shaw c6e44b2fea Update copyright and license (#1256) 2022-06-13 20:33:49 -06:00
dmex 38a9d60e6d peview: Add new UI, Add new customization, Update everything 2021-05-21 11:10:09 +10:00
dmex 788690c421 peview: Fix warnings, Add ProdID versions for Win7 2020-09-11 23:43:37 +10:00
dmex 335a6b56a8 peview: Fix default theme 2020-07-29 18:05:52 +10:00
dmex 7403eda8b7 peview: Update general tab page layout, Add inital options window 2020-07-27 20:25:56 +10:00
dmex cf3c464a91 peview: Add dark theme support 2020-07-27 19:46:53 +10:00
dmex 72c31641f0 peview: Add missing resources 2019-08-07 07:44:58 +10:00
dmex a4e36ed62f peview: Add options button 2019-08-07 07:37:35 +10:00
dmex 3903e25714 peview: Remove unused win10 sets support 2019-02-17 04:18:56 +01:00
dmex fd5a31226e Improve macro usage 2019-02-17 04:14:42 +01:00
dmex 8c1eb5d5b5 peview: Fix window icon 2018-08-15 21:01:22 +10:00
dmex bb6bc8cbd3 Readability improvements 2018-05-03 04:03:48 +10:00
dmex 1885cb18ad Add helper macros 2018-04-28 07:09:30 +10:00
dmex fe1e5d08ec Enable RS5 window Sets tab behavior, Add new EnableExperimentalWindowStyle setting for disabling Sets behavior 2018-04-19 12:06:44 +10:00
dmex 89bb60b5a5 Fix commit a6572ab 2018-02-05 05:03:14 +11:00
dmex a6572abf89 Revert commit 6a02c5b0 2018-02-05 04:00:58 +11:00
dmex b80c126937 Fix build 2018-02-04 08:31:03 +11:00
dmex 1fd80ebcc8 Improve ImageBaseAddress handling, Fix bootstrap resource lookup (1/2) 2017-07-03 01:57:44 +10:00
dmex 79ff2ba71b peview: Add settings support for all tabs, Move settings support from main into phlib 2017-05-08 01:17:55 +10:00
dmex 7f2524d9b4 Tidy up some stuff 2017-05-05 19:24:31 +10:00
dmex 40850030e6 Fix token properties highlighting, Update handles tab layout, Fix peview typo 2017-04-26 15:42:21 +10:00
dmex 6bc394eda2 peview: Improve propsheet layout 2017-04-26 12:28:52 +10:00
dmex 269b89cc4b * Fix last commit 2017-02-12 02:23:54 +11:00
dmex 6a02c5b02f Update window procedure callbacks 2017-02-12 02:09:07 +11:00
dmex 5284dfb6c1 peview: Fix format specifier, Fix incorect type name, Improve IMAGE_CFG_ENTRY type 2017-01-30 01:34:27 +11:00
dmex f0517b31c8 peview: Check binaries for valid CFG data (patch by lucasg), Fix incorrect type names 2017-01-30 00:47:22 +11:00
dmex c9478f3ef2 Peview resize (#102)
Add window resize support to peview
2017-01-29 13:20:54 +11:00