SetWindowsHookEx returns 0 when compiling for the .NET 4.0 framework in 32bit machines

后端 未结 4 911
情话喂你
情话喂你 2020-12-16 20:38

I\'m trying to set a low level windows keyboard hook to grab three keys pressed even if the application is not in focus. To do this I\'m calling SetWindowsHookEx as

4条回答
  •  旧巷少年郎
    2020-12-16 21:07

    Solved it by targeting each platform separately. Configured VS to compile both a Win32 and a Win64 version and deploying on x86 and x64 machines their corresponding binary.

    The Win32 or x86 runs on both 32bit and 64bit machines.

提交回复
热议问题