Results 1 to 3 of 3

Thread: System-Wide Hook - Example? (WH_CBT)

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2004
    Location
    Home
    Posts
    85

    System-Wide Hook - Example? (WH_CBT)

    Do you think anyone could give me a System-Wide hook example? (Like a WH_CBT)

    I already know how to implement WH_Keyboard_LL and WH_Mouse_LL since these do not require DLL injection, but all the other do via the SetWindowsHookEx. (I think it is because they are LowLevel that it allows for no DLL, would have been nice if MS did this for every hook)

    I could attempt to code the DLL in C++ but I dont know too much about it, and feel somewhat insecure about building a dll that is going to be injected into every process that has the posibility of failing to properly work. So I am wondering if anyone has any good examples, or knows of sites with good examples that will allow the code to be managed in the VB application itself, or in a VB6 DLL (modified of course since vb6 only supports ActiveX by default).

    I want to avoid having to recompile a new C++ dll everytime I need to change the code slightly to handle a different window message.

    So can anyone help, give any tips, or point to any sites?

    Thanks.

    -Alt

  2. #2
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    Re: System-Wide Hook - Example? (WH_CBT)

    Yes, the best thing is to use moeur's ocx control and the dll in your vb program. i use it personaly and rocking.

    But not sure it support WH_CBT. Any way have a look at it.

    http://www.vbforums.com/showthread.php?t=322261

    The attachments contain Documentation, examples, compiled dll and the ocx file that are need to distribute with your project. Just add the ActiveX control by browsing to the ocx file and set it's properties. thats all.
    Last edited by Fazi; Jan 8th, 2008 at 02:31 AM.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2004
    Location
    Home
    Posts
    85

    Re: System-Wide Hook - Example? (WH_CBT)

    Well I guess it is a good start, although I see it does not support CBT.

    I will keep looking around though.

Posting Permissions

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



Click Here to Expand Forum to Full Width