Reported by maximo.piva@nutzcode.com, Jun 21, 2013
The form is used by Mediaportal RefreshRate system and it's called 'SuicideForm'
Step to reproduce:
Enable Dynamic Refresh Rate on Media Portal 1.4.0
Play 2 o 3 movies that have different refresh rate (Ex 24fps)
Looking at the keyboard hook, on the sources right now.
Jun 21, 2013 maximo.piva
Okey, found the culprit, disabled right now:
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...
Reported by maximo.piva@nutzcode.com, Jun 21, 2013
The form is used by Mediaportal RefreshRate system and it's called 'SuicideForm'
Step to reproduce:
Looking at the keyboard hook, on the sources right now.
Jun 21, 2013 maximo.piva
Okey, found the culprit, disabled right now:
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...