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. Check user activity ( mouse - keyb ) but not as spyware

Check user activity ( mouse - keyb ) but not as spyware

Scheduled Pinned Locked Moved C / C++ / MFC
question
7 Posts 3 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.
  • P Offline
    P Offline
    Pavel Sokolov
    wrote on last edited by
    #1

    I need to check the activity of the user, to detect when the user is outa here. I need it to set away mode in software. But I don't want to hook all messages like spy software. is there any way to detect the ser activity ? Screen saevr detection is not an good way. Pavel Sokolov http://crea70r.photosight.ru

    D 1 Reply Last reply
    0
    • P Pavel Sokolov

      I need to check the activity of the user, to detect when the user is outa here. I need it to set away mode in software. But I don't want to hook all messages like spy software. is there any way to detect the ser activity ? Screen saevr detection is not an good way. Pavel Sokolov http://crea70r.photosight.ru

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      How about GetLastInputInfo()?


      "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

      P 1 Reply Last reply
      0
      • D David Crow

        How about GetLastInputInfo()?


        "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

        P Offline
        P Offline
        Pavel Sokolov
        wrote on last edited by
        #3

        It's very good, but "Windows 95/98/Me: Unsupported." I understand that support of these systems is almost stopped, but my customers have all range of systems. Maybe I will emulate this function for Win9X - Anyway thank you very much. Pavel Sokolov

        D 1 Reply Last reply
        0
        • P Pavel Sokolov

          It's very good, but "Windows 95/98/Me: Unsupported." I understand that support of these systems is almost stopped, but my customers have all range of systems. Maybe I will emulate this function for Win9X - Anyway thank you very much. Pavel Sokolov

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          Pavel Sokolov wrote: Maybe I will emulate this function for Win9X See here.


          "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

          P B 2 Replies Last reply
          0
          • D David Crow

            Pavel Sokolov wrote: Maybe I will emulate this function for Win9X See here.


            "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

            P Offline
            P Offline
            Pavel Sokolov
            wrote on last edited by
            #5

            Thank you! Just found it ;) Pavel Sokolov

            1 Reply Last reply
            0
            • D David Crow

              Pavel Sokolov wrote: Maybe I will emulate this function for Win9X See here.


              "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

              B Offline
              B Offline
              Blake Miller
              wrote on last edited by
              #6

              I read that article and he puts the hook handler handles and counter into shared memory: #pragma data_seg (".IdleUI") // any name you like HHOOK g_hHookKbd = NULL; HHOOK g_hHookMouse = NULL; DWORD g_dwLastInputTick = 0; #pragma data_seg () Why is that? Doesn't that mean that only one thread of a single process can use the hook handler in this DLL? Why aren't those data at least process-specific so multiple applications could have used the functions in the DLL? I recently made a mouse hook handler and I did NOT put anything like this in the shared data segment and it works fine. Do you think that was something specific for the Windows 9X support?

              D 1 Reply Last reply
              0
              • B Blake Miller

                I read that article and he puts the hook handler handles and counter into shared memory: #pragma data_seg (".IdleUI") // any name you like HHOOK g_hHookKbd = NULL; HHOOK g_hHookMouse = NULL; DWORD g_dwLastInputTick = 0; #pragma data_seg () Why is that? Doesn't that mean that only one thread of a single process can use the hook handler in this DLL? Why aren't those data at least process-specific so multiple applications could have used the functions in the DLL? I recently made a mouse hook handler and I did NOT put anything like this in the shared data segment and it works fine. Do you think that was something specific for the Windows 9X support?

                D Offline
                D Offline
                David Crow
                wrote on last edited by
                #7

                Blake Miller wrote: Why aren't those data at least process-specific so multiple applications could have used the functions in the DLL? That would defeat the purpose of checking for idleness. If these variables were not marked as shared, each process that used the DLL would get its own copy of the variables, thus idle in one process might not be idle in another process.


                "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

                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