Comodo firewall
[quote=“jules”]
Looking through the MS docs again, I guess that the warning might be avoided if it uses a different hook type and is more specific about the thread that it affects, e.g. by changing this line in juce_VST_Wrapper.cpp:
mouseWheelHook = SetWindowsHookEx (7 /*WH_MOUSE*/, mouseWheelHookCallback,
(HINSTANCE) PlatformUtilities::getCurrentModuleInstanceHandle(),
GetCurrentThreadId());
…but I’ve no way of testing that. And changing the WH_MOUSE_LL to a WH_MOUSE hook may not work as well. Can’t think of anything else though, other than removing the hook and not handling the mouse wheel properly.[/quote]
I tested the above code. It works fine, as long as you only want the parameter to increase in value. :mrgreen: Moving the mouse wheel in either direction causes the parameter to increment upwards.
I’ll test other code changes for this if you have more ideas. For now, telling the customer to make the required changes to their firewall seems like an acceptable solution.
Sean Costello
Yeah, I hadn’t actually tried that last attempt! Here’s a cleaned up version:
[code] LRESULT CALLBACK mouseWheelHookCallback (int nCode, WPARAM wParam, LPARAM lParam)
{
if (nCode >= 0 && wParam == WM_MOUSEWHEEL)
{
const MOUSEHOOKSTRUCTEX& hs = (MOUSEHOOKSTRUCTEX) lParam;
Component* const comp = Desktop::getInstance().findComponentAt (Point<int> (hs.pt.x,
hs.pt.y));
if (comp != nullptr && comp->getWindowHandle() != 0)
return PostMessage ((HWND) comp->getWindowHandle(), WM_MOUSEWHEEL,
hs.mouseData & 0xffff0000, (hs.pt.x & 0xffff) | (hs.pt.y << 16));
}
return CallNextHookEx (mouseWheelHook, nCode, wParam, lParam);
}
void registerMouseWheelHook()
{
if (mouseHookUsers++ == 0)
mouseWheelHook = SetWindowsHookEx (WH_MOUSE, mouseWheelHookCallback,
(HINSTANCE) PlatformUtilities::getCurrentModuleInstanceHandle(),
GetCurrentThreadId());
}
[/code]
