ImGui's example implementation that's used here causes a dependency on XINPUT_1.4.DLL. This version of xinput is not available on Windows 7 and earlier systems, which causes twinhook to error out due to the missing DLL if you're not on Windows 8 or later. An easy fix is making the example use an xinput version that's available on older systems:
imgui_impl_win32.cpp:150:
#pragma comment(lib, "xinput")
change to:
#pragma comment(lib, "xinput9_1_0")
Though, it's probably better to remove the dependency entirely, since I think it's only there because the ImGui example uses it, and twinhook does not actually require xinput at all.