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. Windows API
  4. setcursorPos mouse_event as administrator.

setcursorPos mouse_event as administrator.

Scheduled Pinned Locked Moved Windows API
question
3 Posts 2 Posters 11 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.
  • J Offline
    J Offline
    jamescaunt
    wrote on last edited by
    #1

    hi, i need to run my app with administrator priviledges, however i have noticed that when run as admin ::SetCursorPos and mouse_event dont work. when run as a normal user they both work as expected. keybd_event works either in admin or normal user mode. anyone know why this is? thanks

    L 1 Reply Last reply
    0
    • J jamescaunt

      hi, i need to run my app with administrator priviledges, however i have noticed that when run as admin ::SetCursorPos and mouse_event dont work. when run as a normal user they both work as expected. keybd_event works either in admin or normal user mode. anyone know why this is? thanks

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

      There must be something else going on in your code. I have just tested this on a small program and it works exactly the same as normal or admin user. If this was a problem then much of Windows would not be working.

      One of these days I'm going to think of a really clever signature.

      J 1 Reply Last reply
      0
      • L Lost User

        There must be something else going on in your code. I have just tested this on a small program and it works exactly the same as normal or admin user. If this was a problem then much of Windows would not be working.

        One of these days I'm going to think of a really clever signature.

        J Offline
        J Offline
        jamescaunt
        wrote on last edited by
        #3

        ok thanks mate. you were of course correct. if anyone cares the problem was i was hooking cbtproc to record mouse events and llkeyboard for keyboard events.this works in user mode but in admin mode HCBTPROC wasnt getting recorded. i swithced it to llmousehook and now its all good. thanks for your help

        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