Hello there,
after my DLL is injected via EasyHook I am starting a new thread in my DLL in order to open a form window in it. When I close WoW the thread still seems to be running as the wow.exe process is still in the task manager.
Is it possible to catch some kind of event in C# in order to stop the thread and clean up after yourself while a certain process (in this case wow) is closing?
EDIT: Even if I just Form.ShowDialog() without starting a new thread sometimes the wow.exe process is still running if I close the form first and then the dialog. If I close wow first then sometimes the form closes too and everything is fine but sometimes the form just hangs not responding anymore.
Can someone please tell me a clean way for dealing with this behavior in C#?