Is it possible to detect when a low-level keyboard hook has been automatically disconnected by Windows?

后端 未结 4 1499
半阙折子戏
半阙折子戏 2020-12-31 12:27

I am working on a program that uses keyboard hooks. However, when the PC that the program is running on is just slightly overloaded, it causes Windows to disconnect the hook

4条回答
  •  爱一瞬间的悲伤
    2020-12-31 12:38

    I think there are some "bad-performance" code in your hook . that's the reason why makes slightly overload .

    "it causes Windows to disconnect the hook from the program"

    Does any error raise in your hook and you don't handle it ?

    AFAIK, Windows wouldn't disconnect the hook if it works well by itself.

提交回复
热议问题