Force SetWinEventHook to be called from main thread

后端 未结 1 1185
终归单人心
终归单人心 2021-01-28 16:49

I\'m trying to register some object-level WinEvents hooks on new created processes but as the official documentation says :

For out-of-context events, the

相关标签:
1条回答
  • 2021-01-28 17:38

    Have had the same problem. Use Invoke method from any form:

                this.Invoke(new MethodInvoker(() => StartEventListener()));
    

    Regards

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