devpack / vmware-synaptics-touchpad-scroll

Use Synaptics Touchpad Scroll in VMware Guest
66 stars 18 forks source link

Doesn't work with KVM VMware (vmware-kvm.exe) #6

Open saravanabalagi opened 8 years ago

saravanabalagi commented 8 years ago

I tried my best to make it work, but.... I replaced the window class names in vmware_scroll_start.cpp by seeing what window class the vmware-kvm would have, using spyxx.exe

#include <windows.h>
#include <sstream>
#include "..\hook\hook.h"

using namespace std;

int CALLBACK WinMain(
    _In_  HINSTANCE hInstance,
    _In_  HINSTANCE hPrevInstance,
    _In_  LPSTR lpCmdLine,
    _In_  int nCmdShow
    )
{
    HWND phwnd = FindWindowEx(NULL, NULL, L"VMware.vmkvm.Frame", NULL);
    HWND hwnd = phwnd;
    auto res = hwnd ? !InjectDll(hwnd) : 2;
    wstringstream wss;
    wss << "vmware_scroll_start result: " << res;
    MessageBox(NULL, wss.str().data(), L"", MB_OK | MB_ICONASTERISK);
    return res;
}

after lot of experimentation, the above code successfully binded it within kvm, but with a huge flaw: two-finger-scroll stopped working in host and so was not accessible in guest too; that said, other two finger actions like pinch-zoom-in-out worked in both host and the guest.

Tried restarting SynTPEnh.exe and no use: I didn't get my two finger scroll back. I hope a small change made to this code would make it work for kvm :) Help me

saravanabalagi commented 8 years ago

Here's everything Andrew and I did: Stackexchange Chat. No idea what causes ceasing two finger scrolls on host