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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. how to capture mouse movement and click in windows service

how to capture mouse movement and click in windows service

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorial
3 Posts 3 Posters 8 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.
  • S Offline
    S Offline
    Shkuratov U
    wrote on last edited by
    #1

    :(( it doesn't work setwindowsHookEx(), Getkeystate() and GetCursorPos(). please help me.

    L Richard DeemingR 2 Replies Last reply
    0
    • S Shkuratov U

      :(( it doesn't work setwindowsHookEx(), Getkeystate() and GetCursorPos(). please help me.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Windows service applications do not have consoles so have no access to input or output devices.

      1 Reply Last reply
      0
      • S Shkuratov U

        :(( it doesn't work setwindowsHookEx(), Getkeystate() and GetCursorPos(). please help me.

        Richard DeemingR Offline
        Richard DeemingR Offline
        Richard Deeming
        wrote on last edited by
        #3

        Windows services don't run in the context of a user's desktop. At any point whilst the service is running, there could be zero, one, or many users logged in to the computer, each with their own desktop. You need to use a different solution. For example, you can use the Windows Task Scheduler to start an application when any user logs in. That application will have access to the user's desktop.


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

        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