dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: CBT Hook stops working after a while

  1. #1
    Join Date
    Jan 2019
    Posts
    1

    CBT Hook stops working after a while

    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?

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    12,986

    Re: CBT Hook stops working after a while

    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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)