I crete a CBT hook in a 3rd party app. It works well for a while but then stops working. The app is not crashing, the hook simply stops working.
What are possible reasons for that?
Printable View
I crete a CBT hook in a 3rd party app. It works well for a while but then stops working. The app is not crashing, the hook simply stops working.
What are possible reasons for that?
Reading the cbt hook docs...
1) if you are specifying a dwThreadId, the thread can go away in the target application.
2) You need to continue to pump messages in your app. If the window processing the hook messages in your app hangs, processing will stop. You need to keep this in mind with whatever you are doing to process the hook messages. That is to say the processing needs to be fast amd if it is not, it will hang the window.