mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-11 04:55:39 +02:00
catch exception in WinEventProc()
This commit is contained in:
parent
db6ca09f65
commit
185b34268c
1 changed files with 12 additions and 0 deletions
|
@ -1513,6 +1513,18 @@ namespace PersistentWindows.Common
|
|||
}
|
||||
|
||||
private void WinEventProc(IntPtr hWinEventHook, User32Events eventType, IntPtr hwnd, int idObject, int idChild, uint dwEventThread, uint dwmsEventTime)
|
||||
{
|
||||
try
|
||||
{
|
||||
WinEventProcCore(hWinEventHook, eventType, hwnd, idObject, idChild, dwEventThread, dwmsEventTime);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
private void WinEventProcCore(IntPtr hWinEventHook, User32Events eventType, IntPtr hwnd, int idObject, int idChild, uint dwEventThread, uint dwmsEventTime)
|
||||
{
|
||||
if (!initialized)
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue