From eec8f43f151bb54593a30cf4520017dc2fa33632 Mon Sep 17 00:00:00 2001 From: Easley Date: Tue, 22 Jul 2025 11:37:52 +0800 Subject: [PATCH] Use Environment.ProcessPath instead of Process.GetCurrentProcess().ProcessName --- .../src/Shared/MS/Win32/ManagedWndProcTracker.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/ManagedWndProcTracker.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/ManagedWndProcTracker.cs index 56c86f47158..cf3926a2b97 100644 --- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/ManagedWndProcTracker.cs +++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Win32/ManagedWndProcTracker.cs @@ -203,7 +203,7 @@ internal static void LogStartHWND(IntPtr hwnd, string fromWhere) { string msg = String.Format("BEGIN: {0:X} -- Setting DWP, process = {1} ({2}) {3}", hwnd, - System.Diagnostics.Process.GetCurrentProcess().ProcessName, + Path.GetFileNameWithoutExtension(Environment.ProcessPath), fromWhere, System.Environment.NewLine); @@ -214,7 +214,7 @@ internal static void LogFinishHWND(IntPtr hwnd, string fromWhere) { string msg = String.Format("END: {0:X} -- Setting DWP, process = {1} ({2}) {3}", hwnd, - System.Diagnostics.Process.GetCurrentProcess().ProcessName, + Path.GetFileNameWithoutExtension(Environment.ProcessPath), fromWhere, System.Environment.NewLine);