Closed GoogleCodeExporter closed 8 years ago
Okey, found the culprit, disabled right now:
CODE:
void SubClass()
{
IntPtr hWnd = System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle;
NewWindowProc = new WindowProc(MyWindowProc);
DefWindowProc = SetWindowLongPtr(hWnd, GWL_WNDPROC, Marshal.GetFunctionPointerForDelegate(NewWindowProc));
}
void UnSubClass()
{
IntPtr hWnd = System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle;
DefWindowProc = SetWindowLongPtr(hWnd, GWL_WNDPROC, DefWindowProc);
DefWindowProc = IntPtr.Zero;
}
int MyWindowProc(System.IntPtr hWnd, int msg, int wParam, int lParam)
{
if (msg == WM_ACTIVATEAPP)
{
//disable keyboard hook if app is inactive
// wParam=1 when activating, 0 when desactivating
hook.IsEnabled = (wParam == 1);
}
return CallWindowProc(DefWindowProc, hWnd, msg, wParam, lParam);
}
For some reasone, this SubClass. Makes or forwards the RefreshRate SucideForm
Messages. The End Result, CallWndProc is probably forwarding Messages to a
Disposed SucideForm.
Current Fix:
Commented Calls to SubClass end UnSubClass in the code.... Working fine...
Original comment by maximo.p...@nutzcode.com
on 22 Jun 2013 at 12:07
Cool, will take a look at this soon
Original comment by werndly...@gmail.com
on 28 Jun 2013 at 12:00
https://github.com/japanesemediamanager/animeplugin3/issues/12
Original comment by werndly...@gmail.com
on 20 Aug 2014 at 12:27
Original issue reported on code.google.com by
maximo.p...@nutzcode.com
on 21 Jun 2013 at 10:41