C# Low-Level Keyboard Hook Not Working

后端 未结 1 1585
忘掉有多难
忘掉有多难 2020-12-10 08:40

This is the code for my keyhooking class, but it doesn\'t work. I was wondering if someone can tell me why? I\'m instansiating it in another Console application. The debug m

相关标签:
1条回答
  • 2020-12-10 09:04

    Are you calling Application.Run in your Main function?

    The standard Console thread doesn't have a message loop, which is required for hooks to work properly, Application.Run takes care of that.

    0 讨论(0)
提交回复
热议问题