InvalidOperationException: 进程已退出,因此无法获得所请求的信息。 StackTrace: 在 System.Diagnostics.Process.EnsureState(State state) 在 System.Diagnostics.Process.get_ProcessName() 在 DynamicClass.MyApplication.GetWindowProcessName(IntPtr hWnd) 在 DynamicClass.MyApplication.EventCallback(IntPtr hWinEventHook, UInt32 iEvent, IntPtr hWnd, Int32 idObject, Int32 idChild, UInt32 dwEventThread, UInt32 dwmsEventTime)