Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. NTService and Hooks

NTService and Hooks

Scheduled Pinned Locked Moved C / C++ / MFC
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    FlorianS
    wrote on last edited by
    #1

    Is it possible to add a hook to keyboard from a services I want to add the hook when the service is starting and remove the hook when the service is stop. I tried but the hook can not be installed. Thanks Florian

    J 1 Reply Last reply
    0
    • F FlorianS

      Is it possible to add a hook to keyboard from a services I want to add the hook when the service is starting and remove the hook when the service is stop. I tried but the hook can not be installed. Thanks Florian

      J Offline
      J Offline
      Joan M
      wrote on last edited by
      #2

      Yes you can, the only thing that you must consider is that a system wide keyboard hook must be placed inside a DLL. Then you should create a DLL that contains the hook (the callback function) and remember that the service must have a mesage pump. If you have more questions or if I have not been so clear, (or if I've completely missed the shot) don't mind to ask again. Hope this helps...

      https://www.robotecnik.com freelance robots, PLC and CNC programmer.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups